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)[source]¶
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])[source]¶
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])[source]¶
- 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])[source]¶
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])[source]¶
- add_spot(spot: schrodinger.application.desmond.mxmd.mxmd_cleanup.Spot)[source]¶
Spot
must have the same grid_spacing
- property volume: float¶
- score(func) int [source]¶
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 [source]¶
- write_cns(filename: str, crop_size: Optional[float] = None, func: Callable = <function sum>)[source]¶
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] [source]¶
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]] [source]¶
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] [source]¶
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)[source]¶
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)[source]¶
- write_cns_mae_files() List[str] [source]¶
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]] [source]¶
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])[source]¶
- prepare_ct(ct: schrodinger.structure._structure.Structure, probe: str = '')[source]¶
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.