Skip to content

Protein preparation

Protein preparation workflow - prepare protein structures for simulation.

ProteinPreparationResult dataclass

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

Bases: WorkflowResult

Result from a protein-preparation workflow.

prepared_protein_uuid property

prepared_protein_uuid: ProteinUUID | None

UUID of the prepared protein structure.

get_prepared_protein

get_prepared_protein() -> Protein

Fetch the prepared protein structure.

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

Returns:

Type Description
Protein

prepared Protein object

Raises:

Type Description
ValueError

if the workflow has not produced a prepared protein

submit_protein_preparation_workflow

submit_protein_preparation_workflow(
    protein: Protein | ProteinUUID,
    add_missing_method: Literal["boltz_2", "pdbfixer"]
    | None = "boltz_2",
    cap_residues: Literal["ace_nme", "terminal_templates"]
    | None = "ace_nme",
    protonation_method: Literal[
        "openmm", "protonate_utils", "propka_3"
    ] = "openmm",
    pH: float = 7.4,
    retain_protonation: bool = True,
    retain_non_polymer: dict[str | int, str | None]
    | None = _DEFAULT_RETAIN_NON_POLYMER,
    name: str = "Protein Preparation 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

Submit a protein-preparation workflow to the API.

Full protein preparation can take around ten minutes, depending on the structure and settings. For a faster PDBFixer/OpenMM-only path, use Protein.prepare().

Parameters:

Name Type Description Default
protein Protein | ProteinUUID

protein to prepare, as a UUID or Protein object

required
add_missing_method Literal['boltz_2', 'pdbfixer'] | None

method for adding missing atoms and residues before protonation; None skips this step

'boltz_2'
cap_residues Literal['ace_nme', 'terminal_templates'] | None

terminal-residue capping method; "ace_nme" requires an add-missing method and is incompatible with "protonate_utils"; None disables capping

'ace_nme'
protonation_method Literal['openmm', 'protonate_utils', 'propka_3']

method for adding hydrogens

'openmm'
pH float

pH used to determine protonation states

7.4
retain_protonation bool

whether to retain existing protonation states

True
retain_non_polymer dict[str | int, str | None] | None

non-polymer residues to retain, keyed by residue name or 0-based residue index. Values are SMILES strings used for parameterization. Known ions and waters may map to None; other residues require a SMILES string. None removes all non-polymer residues.

_DEFAULT_RETAIN_NON_POLYMER
name str

name of the workflow

'Protein Preparation 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 settings are incompatible or a retained residue mapping is invalid

requests.HTTPError

if the request to the API fails