Skip to content

Analogue Docking

Analogue docking workflow - dock analogues using a template ligand.

AnalogueDockingResult dataclass

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

Bases: WorkflowResult

Result from an analogue-docking workflow.

analogue_scores property

analogue_scores: dict[str, list[DockingScore]]

Docking scores for each analogue SMILES.

best_poses property

best_poses: dict[str, Molecule]

Best docked pose per analogue, keyed by SMILES.

Fetches the final geometry from each analogue's top-scoring pose. Analogues with no successful poses are excluded. When analogue_names were supplied at submission, each pose's name is set to the analogue name, so poses can be re-keyed by name (e.g. {p.name: p for p in ...}).

Returns:

Type Description
dict[str, Molecule]

Dictionary mapping SMILES to docked Molecule with 3D coordinates.

get_pose

get_pose(smiles: str, index: int = 0) -> Calculation

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

Parameters:

Name Type Description Default
smiles str

SMILES string of the analogue.

required
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
KeyError

If the SMILES is not found.

IndexError

If index is out of range.

ValueError

If the pose has no UUID.

get_poses

get_poses(smiles: str) -> list[Calculation]

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

Parameters:

Name Type Description Default
smiles str

SMILES string of the analogue.

required

Returns:

Type Description
list[Calculation]

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

Raises:

Type Description
KeyError

If the SMILES is not found.

get_complex

get_complex(smiles: str, index: int = 0) -> Protein

Fetch a protein-ligand complex structure for a specific analogue.

Parameters:

Name Type Description Default
smiles str

SMILES string of the analogue.

required
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
KeyError

If the SMILES is not found.

IndexError

If index is out of range.

ValueError

If the complex has no structure UUID.

get_complexes

get_complexes(smiles: str) -> list[Protein]

Fetch all protein-ligand complex structures for a specific analogue.

Parameters:

Name Type Description Default
smiles str

SMILES string of the analogue.

required

Returns:

Type Description
list[Protein]

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

Raises:

Type Description
KeyError

If the SMILES is not found.

submit_analogue_docking_workflow

submit_analogue_docking_workflow(
    analogues: list[str],
    initial_molecule: StructureInput,
    protein: Protein | ProteinUUID,
    analogue_names: list[str] | None = None,
    scoring_function: Literal["vina", "vinardo"] = "vinardo",
    exhaustiveness: int = 8,
    max_poses: int = 4,
    num_conformers_per_analogue: int = 100,
    require_posebusters: bool = False,
    run_local_optimization: bool = False,
    name: str = "Analogue 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 an analogue-docking workflow to the API.

Parameters:

Name Type Description Default
analogues list[str]

SMILES strings to dock.

required
initial_molecule StructureInput

Template to which to align molecules to.

required
protein Protein | ProteinUUID

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

required
analogue_names list[str] | None

Names parallel to analogues. When provided, each docked pose's Molecule.name is set to its analogue name (see best_poses), and must be the same length as analogues. If omitted, poses are identified by SMILES.

None
scoring_function Literal['vina', 'vinardo']

Docking scoring function: "vina" or "vinardo".

'vinardo'
exhaustiveness int

How many times Vina attempts to find a pose for each conformer.

8
max_poses int

Maximum number of poses generated per input conformer.

4
num_conformers_per_analogue int

Maximum number of conformers to generate per analogue.

100
require_posebusters bool

Filter conformers based on PoseBusters validity before docking.

False
run_local_optimization bool

Whether to run a local opt in docking pocket or just score.

False
name str

Name of the workflow.

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

Raises:

Type Description
requests.HTTPError

if the request to the API fails.