Protein MD
Protein MD workflow - molecular dynamics simulations for proteins.
ProteinMDTrajectory
dataclass
ProteinMDTrajectory(
uuid: str,
sasa: list[float | None],
polar_sasa: list[float | None],
isotropic_radius_of_gyration: list[float],
cluster_centroid_indices: list[int],
cluster_indices_by_frame: list[int],
)
Results from a single protein-MD trajectory replicate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uuid
|
str
|
UUID of the trajectory calculation. |
required |
sasa
|
list[float | None]
|
Solvent-accessible surface area per analyzed frame (populated when analysis_interval_ps is set). |
required |
polar_sasa
|
list[float | None]
|
Polar solvent-accessible surface area per analyzed frame (populated when analysis_interval_ps is set). |
required |
isotropic_radius_of_gyration
|
list[float]
|
Radius of gyration per analyzed frame. |
required |
cluster_centroid_indices
|
list[int]
|
Frame indices of the cluster centroids (populated when clustering is set). |
required |
cluster_indices_by_frame
|
list[int]
|
Cluster assignment for each frame (populated when clustering is set). |
required |
ProteinMDResult
dataclass
ProteinMDResult(
workflow_data: dict[str, Any],
workflow_type: str,
workflow_uuid: str,
complete: bool = True,
)
Bases: WorkflowResult
Result from a Protein Molecular Dynamics (MD) workflow.
trajectories
property
Per-replicate trajectory results (SASA, radius of gyration, cluster assignments).
minimized_protein_uuid
property
UUID of the energy-minimized protein structure.
get_minimized_protein
Fetch the energy-minimized protein structure.
.. note:: Makes one API call on first access. Results are cached. Call clear_cache() to refresh.
Returns:
| Type | Description |
|---|---|
Protein | None
|
Protein object or None if not available. |
get_atom_distances
Fetch interatomic distances over the trajectory for specified atom pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
atom_pairs
|
list[tuple[int, int]]
|
List of (atom_i, atom_j) index pairs (0-indexed). |
required |
replicate
|
int
|
Trajectory replicate index (default 0). |
0
|
Returns:
| Type | Description |
|---|---|
list[list[float]]
|
List of distance arrays, one per pair, over all frames (Angstrom). |
Raises:
| Type | Description |
|---|---|
HTTPError
|
If the API request fails. |
download_trajectories
download_trajectories(
replicates: list[int],
name: str | None = None,
path: Path | str | None = None,
) -> Path
Download DCD trajectory files for specified replicates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
replicates
|
list[int]
|
List of replicate indices to download. |
required |
name
|
str | None
|
Custom name for the tar.gz file (without extension). |
None
|
path
|
Path | str | None
|
Directory to save the file to. Defaults to current directory. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the downloaded tar.gz file. |
Raises:
| Type | Description |
|---|---|
HTTPError
|
If the API request fails. |
submit_protein_md_workflow
submit_protein_md_workflow(
protein: Protein | ProteinUUID,
num_trajectories: int = 4,
equilibration_time_ns: float = 1,
simulation_time_ns: float = 10,
temperature: float = 300,
pressure_atm: float = 1.0,
langevin_timescale_ps: float = 1.0,
timestep_fs: float = 2,
constrain_hydrogens: bool = True,
nonbonded_cutoff: float = 8.0,
ionic_strength_M: float = 0.0,
water_buffer: float = 10.0,
save_solvent: bool = False,
num_solvent_to_save: int | None = None,
binder: Binder | None = None,
protein_restraint_cutoff: float | None = None,
protein_restraint_constant: float = 100,
analysis_interval_ps: float | None = None,
clustering: KMeansClusteringSettings
| GreedyClusteringSettings
| None = None,
validate_forcefield: bool = True,
name: str = "Protein MD 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 Protein Molecular Dynamics (MD) workflow to the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
protein
|
Protein | ProteinUUID
|
holo protein on which MD will be run. Can be input as a UUID or a Protein object. |
required |
num_trajectories
|
int
|
Number of trajectories to run. |
4
|
equilibration_time_ns
|
float
|
how long to equilibrate trajectories for, in ns |
1
|
simulation_time_ns
|
float
|
how long to run trajectories for, in ns |
10
|
temperature
|
float
|
temperature, in K |
300
|
pressure_atm
|
float
|
pressure, in atm |
1.0
|
langevin_timescale_ps
|
float
|
timescale for the Langevin integrator, in ps^-1 |
1.0
|
timestep_fs
|
float
|
timestep, in femtoseconds |
2
|
constrain_hydrogens
|
bool
|
whether or not to use SHAKE to freeze bonds to hydrogen |
True
|
nonbonded_cutoff
|
float
|
nonbonded cutoff for particle-mesh Ewald, in A |
8.0
|
ionic_strength_M
|
float
|
ionic strength of the solution, in M (molar) |
0.0
|
water_buffer
|
float
|
amount of water to add around the protein, in A |
10.0
|
save_solvent
|
bool
|
whether solvent should be saved |
False
|
num_solvent_to_save
|
int | None
|
keep this many solvent molecules nearest the binder, or all if None; only meaningful when save_solvent is True and a binder is present |
None
|
binder
|
Binder | None
|
optional binder specification (protein chains and/or small molecules). When set, per-frame MM/GBSA scores are computed against the whole binder. Per-frame binder RMSD is populated only when the binder is a single component (one small molecule → heavy-atom RMSD; one binder chain → backbone N/CA/C/O RMSD); it is empty for multi-molecule, multi-chain, or combined chain+molecule binders. |
None
|
protein_restraint_cutoff
|
float | None
|
cutoff distance from the binder past which Cα atoms are harmonically restrained, in Å; None disables restraints |
None
|
protein_restraint_constant
|
float
|
force constant for Cα backbone restraints, in kcal/mol/Ų |
100
|
analysis_interval_ps
|
float | None
|
Interval at which to compute per-frame SASA and polar SASA, in ps. None disables those analyses. |
None
|
clustering
|
KMeansClusteringSettings | GreedyClusteringSettings | None
|
How to cluster trajectory frames. None disables clustering; pass a KMeansClusteringSettings (num_clusters) or GreedyClusteringSettings (cutoff_angstrom). |
None
|
validate_forcefield
|
bool
|
if True (default), validate the protein forcefield compatibility before submitting. Raises an error early if the protein cannot be parameterized or has clashing residues. Binder small molecules are skipped, whether given by residue name or by index, since they are parameterized from their SMILES rather than the protein forcefield; cofactors, metals, and glycans outside the binder are still validated. |
True
|
name
|
str
|
Name of the workflow. |
'Protein MD 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 |
|---|---|
requests.HTTPError
|
if the request to the API fails. |