Skip to content

pKa

pKa workflow - predict acid/base dissociation constants.

pKaMicrostate dataclass

pKaMicrostate(
    atom_index: int,
    pka: float,
    smiles: str | None = None,
    delta_g: float | None = None,
    uncertainty: float | None = None,
)

Microstate from a pKa calculation.

Available fields depend on the pKa method used. 3D structure-based methods (aimnet2_wagen2024, gxtb_wagen2026) populate delta_g. SMILES-based methods (chemprop_nevolianis2025, starling) populate smiles; chemprop_nevolianis2025 also populates uncertainty.

Parameters:

Name Type Description Default
atom_index int

Index of the protonation site atom.

required
pka float

Predicted pKa value.

required
smiles str | None

SMILES of the microstate (SMILES-based methods only).

None
delta_g float | None

Free energy of (de)protonation in kcal/mol (3D structure-based methods only).

None
uncertainty float | None

Prediction uncertainty (chemprop_nevolianis2025 only).

None

pKaResult dataclass

pKaResult(
    workflow_data: dict[str, Any],
    workflow_type: str,
    workflow_uuid: str,
    complete: bool = True,
)

Bases: WorkflowResult

Result from a pKa workflow.

strongest_acid property

strongest_acid: float | None

Strongest acidic site pKa value.

strongest_base property

strongest_base: float | None

Strongest basic site pKa value.

conjugate_acids property

conjugate_acids: list[pKaMicrostate]

List of conjugate acid microstates with pKa values.

conjugate_bases property

conjugate_bases: list[pKaMicrostate]

List of conjugate base microstates with pKa values.

structures property

structures: list[Calculation]

Optimized structure calculations (lazily fetched).

Only available for 3D structure-based methods (aimnet2_wagen2024, gxtb_wagen2026).

.. note:: Makes one API call per structure on first access. Results are cached. Call clear_cache() to refresh.

Raises:

Type Description
ValueError

If method is SMILES-based (chemprop_nevolianis2025, starling).

submit_pka_workflow

submit_pka_workflow(
    initial_molecule: StructureInput | SMILES,
    pka_range: tuple[int, int] = (2, 12),
    method: Literal[
        "aimnet2_wagen2024",
        "gxtb_wagen2026",
        "chemprop_nevolianis2025",
        "starling",
    ] = "gxtb_wagen2026",
    solvent: SolventInput = "water",
    deprotonate_elements: list[int] | None = None,
    protonate_elements: list[int] | None = None,
    mode: Mode = Mode.CAREFUL,
    name: str = "pKa Workflow",
    folder_uuid: str | None = None,
    folder: Folder | None = None,
    max_credits: int | None = None,
    webhook_url: str | None = None,
    is_draft: bool = False,
) -> Workflow

Submits a pKa workflow to the API.

Parameters:

Name Type Description Default
initial_molecule StructureInput | SMILES

Molecule to calculate pKa for. Accepts Molecule, stjames.Molecule, RDKit Mol, dict, or SMILES string.

required
pka_range tuple[int, int]

Range of pKa values to calculate.

(2, 12)
method Literal['aimnet2_wagen2024', 'gxtb_wagen2026', 'chemprop_nevolianis2025', 'starling']

Algorithm used to compute pKa values: - aimnet2_wagen2024: AIMNet2-based; requires 3D structure; water only. - gxtb_wagen2026: g-xTB-based; requires 3D structure; water only; full periodic table. - chemprop_nevolianis2025: Chemprop-based; requires SMILES; several solvents supported. - starling: SMILES-based; water only.

'gxtb_wagen2026'
solvent SolventInput

Solvent in which pKa values will be computed.

'water'
deprotonate_elements list[int] | None

Elements to deprotonate (atomic numbers).

None
protonate_elements list[int] | None

Elements to protonate (atomic numbers).

None
mode Mode

Mode to run the calculation in.

CAREFUL
name str

Name of the workflow.

'pKa Workflow'
folder_uuid str | None

UUID of the folder to place the workflow in.

None
folder Folder | None

Folder object to store the workflow in.

None
max_credits int | None

Maximum number of credits to use for the workflow.

None
webhook_url str | None

URL that Rowan will POST to when the workflow completes.

None
is_draft bool

If True, submit the workflow as a draft without starting execution.

False

Returns:

Type Description
Workflow

Workflow object representing the submitted workflow.

Raises:

Type Description
ValueError

If method/input type mismatch, or chemprop used with protonate_elements.

requests.HTTPError

if the request to the API fails.