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¶
- property probe_name¶
- property probe_mols¶
- 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 moreSpots
.- __init__(box_size: Tuple[float, float, float], center: Tuple[float, float, float], grid_spacing: Tuple[float, float, float])¶
- add_spot(spot: schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot)¶
Spot
must have the same grid_spacing
- property volume: float¶
- score(func) int ¶
This function is how to treat occupancy value of overlapping grid points. :param func: can be either
np.mean
,np.max
ornp.sum
ornp.min
- get_probes_structure(hotspot_id=None, log=False) schrodinger.structure._structure.Structure ¶
- write_mae(filename: str)¶
Write probe CTs that correspond to this hotspot.
- write_cns(filename: str, crop_size: Optional[float] = None, func: Callable = <function sum>)¶
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.
The sigma values for each grid point will be reduced by
func
- schrodinger.application.desmond.mxmd.mxmd_cleanup.read_checkpoint_file(chkpt_file: Union[pathlib.Path, str]) Optional[schrodinger.application.desmond.cmj.Engine] ¶
Read multisim checkpoint file. :param chkpt_file: Checkpoint file name.
- Returns
Engine object:
- Raise
ValueError if the checkpoint file could not be read.
- schrodinger.application.desmond.mxmd.mxmd_cleanup.get_stage(job: schrodinger.application.desmond.cmj.Engine, stage_name: str) Tuple[Optional[int], Optional[str]] ¶
Return the index of stage with name stage_name.
- Parameters
job – The checkpoint file object.
- Returns
Index of stage_name or None if not found. Job directory or None if not found.
- 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: Optional[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: Optional[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_cns_mae_files() List[str] ¶
Write CNS and Maestro files for each probe type.
- Returns
List of cns files for each probe
- write_hotspot_files() Tuple[List[str], List[str], List[str]] ¶
Write CNS files and return a list of cns and mae filenames with comments about hotspot details.
- check_ligand_overlap(hotspots: List[schrodinger.application.desmond.mxmd.mxmd_cleanup.Hotspot])¶
- set_ref_ct()¶
Read one of the output structures and extract the original input coordinates.
- 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)¶