schrodinger.application.desmond.packages.restraint.cross_link module¶
Module to generate cross link restraints by analyzing a trajectory.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraint(A=None, B=None, C=None, a=None, b=None, c=None)¶
Bases:
object
- __init__(A=None, B=None, C=None, a=None, b=None, c=None)¶
A
,B
, andC
are indices of the ligand’s atoms, anda
,b
, andc
are of the receptor’s.
- asMsjSetting(fc, sigma, schedule_name, lambda_state, schedule_dihed_name=None)¶
- Parameters
fc (list or tuple with 3 elements) – Force constants of the stretch, the angle, and the dihedral restraints.
sigma (list or tuple with 3 elements) – Sigmas of the stretch, the angle, and the dihedral restraints.
schedule_name (str) – Lambda schedule name of the restraints
lambda_state (int) – Must be either 0 or 1.
0
represent the reference state, whereas1
the mutant state.schedule_dihed_name – Name of the dihed schedule or use
schedule_name
if not set.
- Return type
str
- Returns
Msj settings of the restraints.
- property atoms¶
Returns indices of atoms currently included in this restraint.
- property variance¶
Returns sum of all variances.
- static findBest(model, tr, *, ligand_asl, receptor_asl, r_clone=4, min_angle=10.0, verbose=False, use_bonded_atoms=False) Optional[schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraint] ¶
Examine the trajectory, and find and return the “best” cross-link restraint between the ligand molecule and the receptor molecule. Three atoms from the ligand molecule and three atoms from the receptor molecule will be selected. We denote the three ligand atoms as A, B, and C, the three receptor atoms as a, b, and c. Relative restraints will be applied to the following geometries:
1 stretch restraint: A-a distance
2 angle restraints: BAa and Aab angles
3 dihedral restraints: CBAa, BAab, Aabc dihedral angles
Only the given ligand atoms (
lig_atoms
) will be considered for the ligand atoms of the restraint, whereas all “protein” atoms will be considered for the receptor atoms of the restraint. We use the ASL expression “protein” to find protein atoms. It’s OK if thelig_atoms
is part of the result of that expression.Caveats:
This won’t work if the receptor is NOT a protein.
We assumed that there are at least 3 atoms in the ligand molecule and 3 atoms in the receptor molecule(s).
The “best” criteria are the following:
To satisfy the requirement of Desmond’s midpoint algorithm, all atoms are close to each other (i.e., within a sphere of radius of
r_clone
). This is mainly for the efficiency of the Desmond backend.No ill geometries such as colinear structures
The variance of the restraint is the least.
- Parameters
model (cms.Cms) – Simulation system
tr (list[traj.Frame]) – The trajectory to examine
r_clone (float) – Radius of particle / home box visibility (Desmond’s definition). Its value is half of the real space cutoff distance. We use 4 (Angstroms) as a safe default, assuming the cutoff distance is 8 which is a bit less than the typical value. The exact value doesn’t matter, but it’s better to be less as opposed (to greater) than the actual r_clone used in the simulation.
min_angle (
float
) – Mininum angle (in degrees) away from 0 or 180 degrees.use_bonded_atoms – Set to True to choose ‘ABC’ and ‘abc’ atoms that are bonded together and form an angle. The order of the atoms does not matter, just that they are bonded together. Default of False will not place restrictions on how these atoms are connected.
- Parma ligand_asl
ASL expression to specify candidate ligand atoms for the restraint
- Parma receptor_asl
ASL expression to specify candidate receptor atoms for the restraint
- Return type
- class schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraintCentroid(A=None, B=None, C=None, a=None, b=None, c=None)¶
Bases:
schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraint
Generate restraints using the centroid method. See
findBest
for more details.- property variance¶
Returns sum of all variances.
- static findBest(cms_model: schrodinger.application.desmond.cms.Cms, tr: List[traj.TrajFrame], *, ligand_asl: str, receptor_asl: str, r_clone=9999, min_angle=45.0) Optional[CrossLinkRestraint] ¶
Generate restraints using the centroid of the binding pocket and the ligand as the basis for the restraint candidates. These candidates are then filtered to pick the one that results in the minimal variance for the restraint terms over the input trajectory.
See
CrossLinkRestraint.findBest
for more details.
- __init__(A=None, B=None, C=None, a=None, b=None, c=None)¶
A
,B
, andC
are indices of the ligand’s atoms, anda
,b
, andc
are of the receptor’s.
- asMsjSetting(fc, sigma, schedule_name, lambda_state, schedule_dihed_name=None)¶
- Parameters
fc (list or tuple with 3 elements) – Force constants of the stretch, the angle, and the dihedral restraints.
sigma (list or tuple with 3 elements) – Sigmas of the stretch, the angle, and the dihedral restraints.
schedule_name (str) – Lambda schedule name of the restraints
lambda_state (int) – Must be either 0 or 1.
0
represent the reference state, whereas1
the mutant state.schedule_dihed_name – Name of the dihed schedule or use
schedule_name
if not set.
- Return type
str
- Returns
Msj settings of the restraints.
- property atoms¶
Returns indices of atoms currently included in this restraint.
- class schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraintInteraction(A=None, B=None, C=None, a=None, b=None, c=None)¶
Bases:
schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraint
Generate restraints using the interactions between the receptor and ligand. See
findBest
for more details.- property variance¶
Returns sum of all variances.
- static findBest(msys_model: msys.System, cms_model: schrodinger.application.desmond.cms.Cms, tr: List[traj.TrajFrame], *, ligand_asl: str, receptor_asl: str, min_angle=45.0, freq_cutoff=0.5, max_variance=9999, max_dist_variance=16.0, num_traj_segments=3) Optional[CrossLinkRestraint] ¶
Uses the protein-ligand interactions to determine the cross link restraints. These interactions include hydrogen bonds and salt bridge interactions. The candidates are considered by picking the ones with the most consistent interactions throughout the input trajectory. Then the candidates are filtered based on the sum of the variance for all terms, and the A-a distance variance. Then the candidates are filtered to pick the one that results in the minimal overall variance.
See
CrossLinkRestraint.findBest
for more details.- Parameters
freq_cutoff – Interactions must be present at least this fraction of the trajectory to be considered for the restraint. The default is 0.5.
max_variance – The maximum variance to allow the interaction to be used as the restraint. The default is 9999 (mixed units).
max_dist_variance – The maximum variance to allow for the A-a distance. Default is 4.0**2 (in Angstrom**2).
num_traj_segments – Split the trajectory into
num_traj_segments
segments for the analysis.
- __init__(A=None, B=None, C=None, a=None, b=None, c=None)¶
A
,B
, andC
are indices of the ligand’s atoms, anda
,b
, andc
are of the receptor’s.
- asMsjSetting(fc, sigma, schedule_name, lambda_state, schedule_dihed_name=None)¶
- Parameters
fc (list or tuple with 3 elements) – Force constants of the stretch, the angle, and the dihedral restraints.
sigma (list or tuple with 3 elements) – Sigmas of the stretch, the angle, and the dihedral restraints.
schedule_name (str) – Lambda schedule name of the restraints
lambda_state (int) – Must be either 0 or 1.
0
represent the reference state, whereas1
the mutant state.schedule_dihed_name – Name of the dihed schedule or use
schedule_name
if not set.
- Return type
str
- Returns
Msj settings of the restraints.
- property atoms¶
Returns indices of atoms currently included in this restraint.
- class schrodinger.application.desmond.packages.restraint.cross_link.FragmentLinkingRestraint(A: int, B: int, a: int, b: int, Aa: float, BAa: float, Aab: float)¶
Bases:
object
- __init__(A: int, B: int, a: int, b: int, Aa: float, BAa: float, Aab: float)¶
Container for the stretch restraint Aa and the angle restraints BAa and Aab. The parameters
A
B
a
andb
are the atom indicies for the restraints.- Parameters
Aa – Value for the stretch restraint in Angstrom.
BAa – Value for the first angle restraint in degrees.
Aab – Value for the second angle restraint in degrees.
- asMsjSetting(fc, sigma, schedule_name, lambda_state, atom_asl_dict)¶
- Parameters
fc (list or tuple with 2 elements) – Force constants of the stretch and the angle restraints.
sigma (list or tuple with 2 elements) – Sigmas of the stretch and the angle restraints.
schedule_name (str) – Lambda schedule name of the restraints
lambda_state (int) – Must be 0, 1 or None.
0
means to apply the restraints to the reference state, whereas1
means to apply the restraints to the mutant state.None
means to use regular nonalchemical restraints, which are fixed regardless of lambda.atom_asl_dict (dict) – If not None, specify the atom names ‘A’, ‘B’, ‘a’, ‘b’, as the keys and the corresponding restraint asl as the values. Default of None means to use the atom numbers as the asl.
- Return type
str
- Returns
Msj settings of the restraints.
- classmethod findRestraint(ct, fragment0_asl, fragment1_asl) schrodinger.application.desmond.packages.restraint.cross_link.FragmentLinkingRestraint ¶
Given a structure and the fragment0_asl/fragment1_asl asls, find the restraint that
minimizes the distance for the stretch term between fragments
maximizes the distance between the stretch term atom, and the atom used for the angle term within each fragment.
- schrodinger.application.desmond.packages.restraint.cross_link.gen_cross_link_restraint(model, tr, *, ligand_asl, receptor_asl, r_clone=4, min_angle=10.0, use_bonded_atoms=False) schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraint ¶
A cross-link restraint comprises one stretch restraint, two angle restraints, and three dihedral restraints between two molecules, which typically are the ligand and the receptor. A cross link restraint will completely restrain the relative distance and orientation of the two molecules.
N.B.: A cross link restraint requires to identify three atoms from the receptor (denoted as a, b, and c), and three from the ligand (denoted as A, B, and C). If any of the two molecules are too small to not even have three non-terminal atoms, this function will NOT work, and a
RuntimeError
exception will be raised. Also the ligand atoms and the receptor atoms should NOT have overlaps, otherwise aRuntimeError
exception will be raised.- Parameters
tr (
list
oftraj.Frame
) – A MD simulation trajectory that we will analyze to find out the optimal 6 atoms and the equilibrium values for the cross-link restraint.use_bonded_atoms – See
CrossLinkRestraint.findBest
for information on this parameter.
- Parma ligand_asl
ASL expression to specify candidate ligand atoms for the restraint
- Parma receptor_asl
ASL expression to specify candidate receptor atoms for the restraint
- Return type
- schrodinger.application.desmond.packages.restraint.cross_link.gen_cross_link_restraint_centroid(model: schrodinger.application.desmond.cms.Cms, tr: List[traj.TrajFrame], *, ligand_asl: str, receptor_asl: str, min_angle=45.0) schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraintCentroid ¶
Generate cross link restraints using the centroid method. See
gen_cross_link_restraint
for more detail.
- schrodinger.application.desmond.packages.restraint.cross_link.gen_cross_link_restraint_interaction(msys_model: msys.System, model: schrodinger.application.desmond.cms.Cms, tr: List[traj.TrajFrame], *, ligand_asl: str, receptor_asl: str, min_angle=45.0) schrodinger.application.desmond.packages.restraint.cross_link.CrossLinkRestraintInteraction ¶
Generate cross link restraints looking at hydrogen bonds and salt bridges to determine the atoms to use for the restraint. See
gen_cross_link_restraint
for more detail.- Parameters
msys_model – Msys model used to analyze the trajectory.
- Raises
RuntimeError – If the input asls or structures are invalid.
CrossLinkGenerationError – If a suitable restraint could not be generated.