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: project.Project, cns_file: str, row_index: int, cutoff: float, color: int, surf_name: str, surf_comment: str)¶
-
class
schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot(*, grid_points: Set[Tuple[float, float, float]], grid: numpy.ndarray, probe: str, grid_spacing: Tuple[float, float, float])¶ Bases:
objectOccupancy map for each probe is clustered and discretized into separate occupancy clusters called ‘Spots’. Each Spot object contains the grid’s coordinates and their occupancy values.
-
__init__(*, grid_points: Set[Tuple[float, float, float]], grid: numpy.ndarray, probe: str, grid_spacing: Tuple[float, float, float])¶ Initialize self. See help(type(self)) for accurate signature.
-
volume¶
-
-
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:
objectA ‘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])¶ Initialize self. See help(type(self)) for accurate signature.
-
add_spot(spot: schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot)¶ spotmust have the same grid_spacing
-
volume¶
-
score(func) → int¶ This function is how to treat occupancy value of overlapping grid points.
Parameters: func – can be either np.mean,np.maxornp.sumornp.min
-
write_cns(filename: str, func: Callable = <function sum>)¶ Write hotspot grid to cns format. 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, probe_data: numpy.core.multiarray.array, grid_spacing: 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=3.0)¶ Bases:
objectClass for cleaning up mixed solvent subjobs.
-
__init__(chkpt_file: str, sigma: float = 20.0, cluster_cutoff=3.0)¶ Initialize self. See help(type(self)) for accurate signature.
-
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_cns_hotspot_files() → Tuple[List[str], List[str]]¶ Write cns files and return a list of cns filenames with comments about hotspot volumes.
-
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, probe: str = '')¶ Change structure title and remove trajectory 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)¶