schrodinger.application.desmond.kinetics.utils module

schrodinger.application.desmond.kinetics.utils.find_ligand_sites(st: schrodinger.structure._structure.Structure, asl: str, nsites: int, sampling: int = 1000) List[int]

Find a nsites atoms which are furthest away from each other on a provided small molecule. These atoms (sites) are then used in distance calculations.

schrodinger.application.desmond.kinetics.utils.find_protein_sites(st: schrodinger.structure._structure.Structure, asl: str, area_cutoff: float = 40.0) List[int]

Find solvent exposed protein residues which will be used to check if the ligand is still bound to the protein. Returns a list of C-alpha atoms indices of such residues.

schrodinger.application.desmond.kinetics.utils.plot_descriptors(rmsd: numpy.array, mindist: numpy.array, endpoints: Tuple[Optional[int], Optional[int]], rmsd_limits: Tuple[float, float], mindist_limits: Tuple[float, float])

Plot descriptors from a RAMD trajectory

schrodinger.application.desmond.kinetics.utils.extract_reactive_path(cms_filename: str, asl_receptor: str, asl_ligand: str, rmsd_on: float, rmsd_off: float, mindist_on: float, mindist_off: float, strict: bool, pad_traj_start: int = 0, max_traj_frames: int = 2000, debug: bool = False) List[str]

Reactive path is equivelent is a the unbinding path of the ligand

Parameters
  • rmsd_on – value to start recording ligand detachment cutoff

  • rmsd_off – value to stop recording ligand detachment cutoff, this value should be larger than rmsd_on

  • mindist_on – minimal distance between receptor and ligand to start recording ligand detachment cutoff

  • mindist_off – minimal distance between receptor and ligand to stop recording ligand detachment cutoff. This value should be larger than rmsd_on

  • strict – mindist_off and rmsd_off must be both satisfied for reactive trajectory extraction

  • pad_traj_start – number of initial trajectory frames to prepend to the reactive trajectory frames

  • max_traj_frames – maximum number of frames to load. If trajectory contains more frames than this value, then we will slice the trajectory such that the specified number of frames is used in the downstream analysis

Returns

a list of filenames to be saved in the analsysis stage of the workflow

schrodinger.application.desmond.kinetics.utils.path_reduce(rmsd_matrix: numpy.array, nwaypoints: int) Tuple[List[int], float]

TODO: refactor this function not to use global variables

schrodinger.application.desmond.kinetics.utils.calc_tension(rmsd_matrix: numpy.array, ivec: Optional[List[int]] = None) float
schrodinger.application.desmond.kinetics.utils.path_rmsd_matrix(sts: List[schrodinger.structure._structure.Structure], rmsd_atoms: List[int]) numpy.array

calculate 2d RMSD of the ligands on prealigned structures

schrodinger.application.desmond.kinetics.utils.path_optimize(current_guess: List[int], rmsd_matrix: numpy.array, step: float) List[int]

Provided that you already have a rough path (init.mae) you can now optimize it, whiere the best set of available frames can be used. :return ” a list with frame IDs, which will be used to extract the path

schrodinger.application.desmond.kinetics.utils.path_satisfies_mindist(sts: List[schrodinger.structure._structure.Structure], asl_receptor: str, asl_ligand: str, mindist_off: float) bool

Evaluate if the provided path satisfies the mindist criteria

schrodinger.application.desmond.kinetics.utils.trj2sts(cms_model: cms.Cms, tr: List[traj.Frame], path_frames: Optional[List[int]] = None) List[schrodinger.structure._structure.Structure]

Convert trajectory frames to to structure objects. path_frames is a list of frames to convert to structures.

schrodinger.application.desmond.kinetics.utils.path_smooth(sts: List[schrodinger.structure._structure.Structure], atoms_receptor: List[int], atoms_ligand: List[int]) List[schrodinger.structure._structure.Structure]

As final path optimization step, we will shuffle each waypoint towards or away from its neightbors such that RMSD between all the waypoints is equal. This approach is using a string-like method to optimize the distances between each waypoint. :return : a new optimized path

schrodinger.application.desmond.kinetics.utils.reduce_and_optimize_path(asl_receptor: str, asl_ligand: str, nwaypoints: int, mindist_off: float, debug: bool = False) List[str]
Parameters

nwaypoints – the number of snapshots/waypoints in the unbinding path to generate

Returns

a list of filenames to be saved in the analysis stage

schrodinger.application.desmond.kinetics.utils.setup_ramd_system(asl_receptor: str, asl_ligand: str, cms_filename: str, ligand_rmsd_cutoff: float, debug: bool = False) Optional[Cms]

Measure Ligand RMSD and determine if its suitable for downstream RAMD Calculation. Setup subsequent RAMD systems.

Returns

CMS file if the ligand does not unbinds during the relaxation stage (ligand RMSD is less than ligand_rmsd_cutoff). If it does unbinds then we return None.

schrodinger.application.desmond.kinetics.utils.cluster_unbinding_paths(paths: List[List[schrodinger.structure._structure.Structure]], asl_receptor: str, asl_ligand: str, use_weights: bool, max_iter: int) Tuple[List[Tuple[int, int, int]], List[int]]

Given a list of paths, cluster them using AffinityPropogation methon. Return information about the clusters as well as their centroids.

Returns

for each cluster return a (size, centroid, label) tuple and a “paths label” path label is a cluster all paths belong in.

schrodinger.application.desmond.kinetics.utils.get_unbinding_pathway(paths_labels: List[int], cluster_info: List[Tuple[int, int, int]], unbound_labels: Optional[List[bool]] = None) List[List[schrodinger.structure._structure.Structure]]

Using the clustering information, write the centroid unbinding paths. If the first N clusters have the the same number of members then we will return N centroids for these clusters.

Parameters
  • cluster_info – a list that contatins (size, center, label) of clusters

  • unbound_labels – use these labels to overwrite the centroids to to return. Here we will suppliment centroid information to prioritize unbound paths that meet MinDist criteria (MINDIST_GOOD_PROP in the first waypoint of the path should be set to True)