schrodinger.application.desmond.mxmd.mxmd_cleanup module

A post-simulation clean-up script for Mixed Solvent (MxMD) workflow. This script extracts the occupancy data for all co-solvent subjob and combines them into occupancy maps. It then clusters and identifies Hotspots from these maps.

As an output, a Maestro Project file (.prjzip) and a ‘results’ directory are written. The directory contains CNS maps for all co-solvent probes and a Maestro structure of the last snapshots for all co-solvent subjob. The command should be run from the base directory of the mixed solvent job.

schrodinger.application.desmond.mxmd.mxmd_cleanup.set_isosurface(pt: schrodinger.project.project.Project, cns_file: str, row_index: int, cutoff: float, color: tuple, surf_name: str, surf_comment: str)

When writing a project table, this function will setup all isosurface properties.

class schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot(*, grid_points: Set[Tuple[float, float, float]], grid: numpy.ndarray, probe_name: str, grid_spacing: Tuple[float, float, float], probe_mols: Set[schrodinger.structure._structure._Molecule])

Bases: object

Occupancy map for each probe is clustered and discretized into separate occupancy clusters called ‘Spots’. Each Spot object contains the grid’s coordinates, their occupancy values and the probe CTs.

__init__(*, grid_points: Set[Tuple[float, float, float]], grid: numpy.ndarray, probe_name: str, grid_spacing: Tuple[float, float, float], probe_mols: Set[schrodinger.structure._structure._Molecule])
property volume: float
property probe_name: str
property probe_mols: Set[schrodinger.structure._structure._Molecule]
property score: float
class schrodinger.application.desmond.mxmd.mxmd_cleanup.Hotspot(box_size: Tuple[float, float, float], center: Tuple[float, float, float], grid_spacing: Tuple[float, float, float])

Bases: object

A Hotspot refers to a collection of grid points, occupied by two or more Spots.

__init__(box_size: Tuple[float, float, float], center: Tuple[float, float, float], grid_spacing: Tuple[float, float, float])
Parameters
  • box_size – The X,Y,Z box size, in which the grid is defined, in Å

  • center – The X,Y,Z coordinates of the center of the box, in Å

  • grid_spacing – The X,Y,Z spacing of the grid, in Å

add_spot(spot: schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot)

spot must have the same grid_spacing

property volume: float
property name: str
set_rank(rank: int)
property score: int

Calculate the score of the hotspot by summing the sigma values.

get_probes_structure(verbose=False) schrodinger.structure._structure.Structure
write_mae(filename: str)

Write probe CTs that correspond to this hotspot.

write_cns(filename: str, crop_size: float = None)

Write hotspot grid to cns format.

Parameters

crop_size – to reduce the size of he CNS files that is written, crop the grid to specified size.

schrodinger.application.desmond.mxmd.mxmd_cleanup.split_into_spots(probe_name: str, probe_data: numpy.array, probe_mols: List[schrodinger.structure._structure._Molecule], grid_spacing: Tuple[float, float, float], grid_center: Tuple[float, float, float], box_size: Tuple[float, float, float], sigma: float, cluster_cutoff: float) List[schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot]

Given an occupancy grid for a single probe, cluster these points and create Spot objects from them.

class schrodinger.application.desmond.mxmd.mxmd_cleanup.CleanUp(chkpt_file: str, sigma: float = 20.0, cluster_cutoff: float = 3.0, ligand_xyz: numpy.array = None)

Bases: object

Class for cleaning up mixed solvent subjobs.

__init__(chkpt_file: str, sigma: float = 20.0, cluster_cutoff: float = 3.0, ligand_xyz: numpy.array = None)
run()

Run the cleanup workflow.

get_subjob_names() List[str]
Returns

A list of subjob names.

create_results_directory()

Create directory in which all data results will be written to.

read_archive_data()

Copy CNS and raw file from the subjob analysis’ stage.

gen_normgrid_data()

Generate normalized occupancy data

write_probe_files() Tuple[List[str], List[str]]

Write CNS and Maestro files for each probe type.

Returns

Two list of cns and mae files for each probe type

write_hotspot_files() Tuple[List[str], List[str]]

Write CNS and MAE files corresponding to each Hotspot.

Returns

Two list of cns and mae files for each hotspot

check_ligand_overlap(hotspots: List[schrodinger.application.desmond.mxmd.mxmd_cleanup.Hotspot])
get_ref_receptor() schrodinger.structure._structure.Structure

Read one of the output structures and extract the original input coordinates, which are used as reference coordinates.

write_ref_receptor()

Write input receptor reference coordinates into a predefined location.

write_maestro_project()

Write a maestro prj table containing a summary of the results.

prepare_ct(ct: schrodinger.structure._structure.Structure, probe: str = '')

Change structure title and remove trajectory and hierarchy info.

Parameters
  • ct – Structure to modify.

  • probe – If specified, the name of the probe. Otherwise use the jobname. This is the default.

schrodinger.application.desmond.mxmd.mxmd_cleanup.parse_cmd(cmdline: List[str]) argparse.Namespace
schrodinger.application.desmond.mxmd.mxmd_cleanup.main(cmdline=None)