Skip to content

MacropKa

MacropKa workflow - predict macroscopic pKa values.

MacropKaMicrostate dataclass

MacropKaMicrostate(smiles: str, energy: float, charge: int)

A microstate from a macropKa calculation.

MacropKaValue dataclass

MacropKaValue(
    initial_charge: int, final_charge: int, pka: float
)

A macroscopic pKa value.

MacropKaResult dataclass

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

Bases: WorkflowResult

Result from a macropKa workflow.

isoelectric_point property

isoelectric_point: float | None

Isoelectric point (pH units).

solvation_energy property

solvation_energy: float | None

Solvation energy (kcal/mol).

kpuu_probability property

kpuu_probability: float | None

Probability that Kpuu >= 0.3.

microstates property

microstates: list[MacropKaMicrostate]

All microstates.

pka_values property

pka_values: list[MacropKaValue]

Macroscopic pKa values.

microstate_weights_by_ph property

microstate_weights_by_ph: list[tuple[float, list[float]]]

Microstate weights by pH as (pH, weights) pairs.

Each weights list corresponds to the microstates in the same order as the microstates property.

logd_by_ph property

logd_by_ph: list[tuple[float, float]]

Distribution constant by pH as (pH, logD) pairs.

aqueous_solubility_by_ph property

aqueous_solubility_by_ph: list[tuple[float, float]]

Aqueous solubility by pH as (pH, log(S)/L) pairs.

submit_macropka_workflow

submit_macropka_workflow(
    initial_smiles: SMILES,
    min_pH: int = 0,
    max_pH: int = 14,
    min_charge: int = -2,
    max_charge: int = 2,
    compute_solvation_energy: bool = False,
    compute_aqueous_solubility: bool = True,
    name: str = "Macropka 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 macropKa workflow to the API.

Parameters:

Name Type Description Default
initial_smiles SMILES

Molecule to calculate macroscopic pKa values for. Accepts a SMILES string or any molecule type (RowanMolecule, stjames.Molecule, RDKit Mol, or dict). The molecule must have a SMILES string associated with it, as macropKa models are 2D/SMILES-based and do not use 3D coordinates.

required
min_pH int

Minimum pH to use in the macropka workflow.

0
max_pH int

Maximum pH to use in the macropka workflow.

14
min_charge int

Minimum charge to use in the macropka workflow.

-2
max_charge int

Maximum charge to use in the macropka workflow.

2
compute_solvation_energy bool

Whether to compute the solvation energy.

False
compute_aqueous_solubility bool

Whether to compute aqueous solubility for each pH.

True
name str

Name of the workflow.

'Macropka Workflow'
folder_uuid str | None

UUID of the folder to store 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 the molecule has no SMILES associated with it.

requests.HTTPError

if the request to the API fails.