Skip to content

Docking

Docking workflow - molecular docking to protein targets.

DockingScore dataclass

DockingScore(
    score: float,
    pose: str | None = None,
    complex_pdb: str | None = None,
    posebusters_valid: bool = False,
    strain: float | None = None,
    rmsd: float | None = None,
    mmgbsa_score: float | None = None,
)

A docking pose with its scores.

Parameters:

Name Type Description Default
score float

Docking score in kcal/mol.

required
mmgbsa_score float | None

MM/GBSA binding free energy estimate in kcal/mol.

None

DockingResult dataclass

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

Bases: WorkflowResult

Result from a docking workflow.

scores property

scores: list[DockingScore]

List of docking scores with poses.

conformers property

conformers: list[str]

UUIDs of optimized conformers.

best_pose property

best_pose: Molecule

Best docked pose as a Molecule with 3D coordinates.

get_pose

get_pose(index: int = 0) -> Calculation

Fetch a docked ligand pose as a calculation with 3D coordinates.

Parameters:

Name Type Description Default
index int

Index of the pose (0-based, ordered by score). Default 0 (best).

0

Returns:

Type Description
Calculation

Calculation containing the docked ligand molecule with 3D coordinates.

Raises:

Type Description
IndexError

If index is out of range.

ValueError

If the pose has no UUID.

get_poses

get_poses() -> list[Calculation]

Fetch all docked ligand poses as calculations with 3D coordinates.

Returns:

Type Description
list[Calculation]

List of Calculations for each pose (ordered by score).

get_complex

get_complex(index: int = 0) -> Protein

Fetch a protein-ligand complex structure.

Parameters:

Name Type Description Default
index int

Index of the pose (0-based, ordered by score). Default 0 (best).

0

Returns:

Type Description
Protein

Protein object with the full protein-ligand complex.

Raises:

Type Description
IndexError

If index is out of range.

ValueError

If the complex has no structure UUID.

get_complexes

get_complexes() -> list[Protein]

Fetch all protein-ligand complex structures.

Returns:

Type Description
list[Protein]

List of Protein objects for each complex (ordered by score).

submit_docking_workflow

submit_docking_workflow(
    protein: Protein | ProteinUUID,
    pocket: list[list[float]],
    initial_molecule: StructureInput,
    docking_settings: VinaSettings | GninaSettings | None = None,
    executable: str | None = None,
    scoring_function: str | None = None,
    exhaustiveness: float | None = None,
    max_poses: int | None = None,
    do_csearch: bool = False,
    do_optimization: bool = False,
    do_pose_refinement: bool = True,
    name: str = "Docking 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 docking workflow to the API.

Parameters:

Name Type Description Default
protein Protein | ProteinUUID

Protein to dock. Can be input as a uuid or a Protein object.

required
pocket list[list[float]]

Binding pocket as [[cx, cy, cz], [sx, sy, sz]] — center (Å) and box size (Å).

required
initial_molecule StructureInput

Initial molecule to be docked.

required
docking_settings VinaSettings | GninaSettings | None

Settings controlling the docking engine, e.g. VinaSettings or GninaSettings (for noncovalent or covalent gnina docking). If provided, the deprecated executable, scoring_function, exhaustiveness, and max_poses are ignored.

None
executable str | None

Deprecated, use docking_settings=VinaSettings(executable=...) instead. Which Vina docking implementation to use.

None
scoring_function str | None

Deprecated, use docking_settings=VinaSettings(scoring_function=...) instead. Which Vina docking scoring function to use.

None
exhaustiveness float | None

Deprecated, use docking_settings=VinaSettings(exhaustiveness=...) instead. Which exhaustiveness to employ.

None
max_poses int | None

Deprecated, use docking_settings=VinaSettings(max_poses=...) instead. Maximum number of poses generated per input conformer.

None
do_csearch bool

Whether to perform a conformational search on the ligand.

False
do_optimization bool

Whether to perform an optimization on the ligand.

False
do_pose_refinement bool

Whether or not to optimize output poses.

True
name str

Name of the workflow.

'Docking 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 docking workflow.

Raises:

Type Description
requests.HTTPError

if the request to the API fails.