schrodinger.application.desmond.stage.utils module¶
- schrodinger.application.desmond.stage.utils.check_cms_file(fname)¶
- schrodinger.application.desmond.stage.utils.check_box_size(model, msj_content, return_params=False)¶
Check that the model box is big enough for desmond to run.
- Parameters
model (cms.Cms or structure.Structure) – Desmond model or structure. For structure chorus properties must be set
msj_content (str) – Contents of the simulate block (X in simulate {X}). Or for the concatenate: concatenate {simulate = [{X}]} Only some parameters are used to determine r_lazy: temp, ensemble, etc. see gconfig.msj2cfg
return_params (bool) – If True, return also adjusted box and r_lazy
- Return type
bool or tuple
- Returns
True or False if box is big enough. If return_params=True, also return adjusted box size and r_lazy
- Raises
ValueError – If msj is concatenate stage (checked with is_concat)
- schrodinger.application.desmond.stage.utils.run_stage_method_in_parallel(method)¶
Decorator to run a stage method in parallel. The first argument to the method must be a list, which will be split into
cmj.ENGINE.maxjob
jobs. If the first argument contains a single element, or maxjob is 1, then the method is called directly.The decorated method must return a list of results. It must NOT alter the stage state in any way, because the stage state is not propagated back.
- Raises
RuntimeError – If the subprocess did not run successfully.
- class schrodinger.application.desmond.stage.utils.SystemBuilder(*arg, **kwarg)¶
Bases:
schrodinger.application.desmond.cmj.StageBase
- NAME = 'system_builder'¶
- SOLVENT = {'SPC': 'spc.box.mae', 'SPCE': 'spce.box.mae', 'SPCFW': 'spcfw.box.mae', 'TIP3P': 'tip3p.box.mae', 'TIP4P': 'tip4p.box.mae', 'TIP4P2005': 'tip4p2005.box.mae', 'TIP4PD': 'tip4pd.box.mae', 'TIP4PEW': 'tip4pew.box.mae', 'TIP5P': 'tip5p.box.mae'}¶
- SB_CMD = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/utilities/system_builder'¶
- PARAM = <schrodinger.utils.sea.sea.Map object>¶
- static merge_restrain(model: schrodinger.application.desmond.cms.Cms, param: schrodinger.utils.sea.sea.Map, new_restr: List[schrodinger.application.desmond.cms.RestrainGroupContainer], old_restr: List[schrodinger.application.desmond.cms.RestrainGroupContainer])¶
Create restrain arrays/objects corresponding to the settings in
param
and merge them intonew_restr
. If the ‘ref’ or ‘reference_pos’ field ofparam
equals ‘retain’, the reference positions from any matching restraints inold_restr
are copied to the created restrain objects before they are merged intonew_restr
. :param model: the input cms model. It is not modified. :param param: The restrain parameters. ‘atom’, ‘fc’ or ‘force_constant’, ‘ref’ or ‘reference_position’, and ‘sigma’ are allowed :param new_restr: The collection of restrains that the new restrains will be merged into. :param old_restr: The collection of restrains to pull any corresponding reference positions from if ‘ref’ or ‘reference_position’ field == ‘retain’.
- CROSS_LINK = {}¶
- static gen_restraint(model, setting, job)¶
Generates restraints.
- static set_restrain(model: schrodinger.application.desmond.cms.Cms, setting: Union[schrodinger.utils.sea.sea.List, schrodinger.utils.sea.sea.Map], permanent_restr: Optional[List[schrodinger.application.desmond.cms.RestrainGroupContainer]] = None, job=None)¶
Set ffio_restrain block in cms model given the ‘restrain’ setting and any existing permanent restraints :param model: the cms model to add restraints to :param setting: the ‘restrain’ setting, as a sea.Map. :param permanent_restr: any optional ‘permanent’ restrain that is passed along with the job object and persists throughout the workflow. It can :param job: the job object
- static merge_atom_group(model, group_key)¶
- static set_atom_group(model, group, permanent_group=None)¶
- __init__(*arg, **kwarg)¶
- crunch()¶
- hook_captured_successful_job(job)¶