Skip to content

Covalent Inhibitor Scan

Beta: This workflow is in beta. Its interface and behavior may change.

Submit a prepared protein–ligand complex, its ligand reactant SMILES, and required rowan.CovalentInhibitorScanSettings. The prepared structure must contain explicit hydrogens and the intended protonation and connectivity. Use residue identifiers and atom names from that structure to select the ligand, reactive region, and coordinates.

import rowan

cysteine = rowan.ResidueRef("polymer", "A", "A.25")
ligand = rowan.ResidueRef("non_polymer", "A.300")
bond = rowan.ScanSettings(
    coordinate=rowan.DistanceCoordinate(
        atoms=(rowan.ResidueAtomRef(cysteine, "SG"), rowan.ResidueAtomRef(ligand, "C27"))
    ),
    start=1.6,
    stop=4.6,
    num=31,
    force_constant=100,
)
region = [
    rowan.ResidueRef("polymer", "A", f"A.{number}")
    for number in (18, 19, 20, 23, 24, 25, 26, 27, 160, 161, 162, 163, 164, 182, 183, 184, 185)
]
settings = rowan.CovalentInhibitorScanSettings(
    ligand=ligand, reactive_region=[*region, ligand], scan_coordinates=[bond]
)
protein = rowan.upload_protein("Prepared cathepsin K/S2", "prepared-cathepsin-k.pdb")
workflow = rowan.submit_covalent_inhibitor_scan_workflow(
    protein=protein,
    reactant_smiles="Cn1cnc2cnc(C#N)nc21",
    settings=settings,
    is_draft=True,
)

These selections describe the prepared cathepsin K/S2 example; adapt them to your structure. Preparation and choosing a chemically appropriate reactive region remain caller responsibilities. Call workflow.submit_draft() and then workflow.result() to run and retrieve results. The executable examples/covalent_inhibitor_scan.py also demonstrates a second coordinate with rowan.LinearCombinationCoordinate.

result.windows follows the submitted grid order. Each window contains its grid index, centers, mean coordinates, sample count, optional reactive-region molecule, and optional full-system DCD reference. Molecules are shared rowan.StJamesMolecule models; use rowan.Molecule.from_stjames for SDK molecule helpers.

result.surface contains bin edges, flattened free energies, effective sample counts, uncertainty, and outside probability. Its axes are ascending, with the last axis varying fastest, even when the submitted grid descends. Free energies and uncertainties are in kcal/mol. Missing cells remain None; the whole surface can be None when analysis is unavailable. Barrier extraction and convergence assessment are user analysis. Additional MD restraints remain in the reported surface; only umbrella biases are removed.

Use result.resolved_setup, result.surface_diagnostics, and result.messages to inspect atom mappings and sampling diagnostics. result.data retains the raw result; use workflow.fetch_latest().data for failed or incompatible workflows.

Retrieve the shared solvated topology with result.get_topology(). Download its structure with topology.download_structure(workflow_uuid=result.workflow_uuid). result.download_trajectory_files([0, 2], path="trajectories") downloads selected DCDs using positions in result.windows, not the windows' multidimensional index values. Requested order is preserved; selecting a window without a saved DCD raises an error. Trajectories require API support for covalent window downloads.

Covalent reaction free-energy surfaces from ML/MM umbrella sampling.

CovalentInhibitorScanResult dataclass

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

Bases: WorkflowResult

Reaction-coordinate windows, free-energy surface, and sampling diagnostics.

settings property

settings: CovalentInhibitorScanSettings

Submitted reactive region, scan coordinates, and simulation settings.

resolved_setup property

resolved_setup: ResolvedScanSetup | None

Input atom mappings, capped bonds, and reactive-region charge and spin.

windows property

windows: list[UmbrellaWindowResult]

Window results in submitted grid order, including snapshots and DCD references.

Each molecule is a rowan.StJamesMolecule, or None. Use rowan.Molecule.from_stjames for SDK molecule helpers.

surface property

surface: FreeEnergySurface | None

Free energies and uncertainties, in kcal/mol.

Flattened arrays follow ascending bin edges, with the last axis varying fastest. Missing cell values remain None.

surface_diagnostics property

surface_diagnostics: SurfaceDiagnostics | None

Exchange counts and MBAR overlap in window-list order.

topology_uuid property

topology_uuid: str | None

UUID of the shared solvated topology in DCD atom order.

messages property

messages: list[Message]

Workflow warnings, errors, and informational messages.

get_topology

get_topology() -> Protein | None

Fetch and cache the full-system topology shared by the window trajectories.

Returns:

Type Description
Protein | None

Topology protein, or None before a topology is saved

download_trajectory_files

download_trajectory_files(window_indices: list[int], path: Path | str | None = None) -> list[Path]

Download full-system DCDs for selected positions in windows.

Parameters:

Name Type Description Default
window_indices list[int]

zero-based positions in the window list, not grid index tuples

required
path Path | str | None

output directory, defaulting to the current directory

None

Returns:

Type Description
list[Path]

Downloaded paths in requested window order

Raises:

Type Description
IndexError

window position is negative or outside the window list

ValueError

selected window has no saved trajectory

HTTPStatusError

API or storage request fails

submit_covalent_inhibitor_scan_workflow

submit_covalent_inhibitor_scan_workflow(protein: Protein | ProteinUUID, reactant_smiles: str, settings: CovalentInhibitorScanSettings, name: str = 'Covalent Inhibitor Scan 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[CovalentInhibitorScanResult]

Submit a covalent reaction free-energy scan in a prepared protein–ligand complex.

Warning

This workflow is in beta. Its interface and behavior may change.

One or two distance coordinates, including weighted distance combinations, define the umbrella grid. Atom references use residue identifiers and input atom names. The caller supplies explicit hydrogens and the intended protonation and connectivity.

Parameters:

Name Type Description Default
protein Protein | ProteinUUID

prepared protein–ligand complex, as a UUID or Protein object

required
reactant_smiles str

ligand reactant SMILES matching the intended protonation and connectivity

required
settings CovalentInhibitorScanSettings

ligand selection, reactive region, scan coordinates, and simulation settings

required
name str

name of the workflow

'Covalent Inhibitor Scan Workflow'
folder_uuid str | None

UUID of the folder to place the workflow in

None
folder Folder | None

destination folder

None
max_credits int | None

maximum credits for the workflow

None
webhook_url str | None

URL that Rowan will POST to when the workflow completes

None
is_draft bool

save as a draft without starting execution

False

Returns:

Type Description
Workflow[CovalentInhibitorScanResult]

Submitted workflow with typed surface results

Raises:

Type Description
ValueError

both folder arguments are supplied, or the shared schema rejects the inputs

HTTPStatusError

request to the API fails