schrodinger.application.desmond.stage.simulate module

schrodinger.application.desmond.stage.simulate.concatenate_and_backup(text_fname)
schrodinger.application.desmond.stage.simulate.backup_trajectories(fname)
schrodinger.application.desmond.stage.simulate.concatenate_trajectories(trajectories)

Concatenate a list of previously backed-up trajectory files (or dirs) with the respective current ones.

Parameters

trajectories (list[str]) – A list of file names. Each name should have the suffix of either “_trj.previous” or “.xtc.previous”. Elements without such a suffix will be ignored without error. These are the names of the backed-up trajectories. The current trajectories should have the same basenames, but not required to be of the same format as the previous ones’. This means we can concatenate a DTR trajectory with a XTC trajectory. The final (complete) trajectories will be in the same formats as the current ones’.

class schrodinger.application.desmond.stage.simulate.SimulateBase(*arg, **kwarg)

Bases: schrodinger.application.desmond.cmj.StageBase

A stage that can launch desmond simulations.

RESTARTABLE = True
DESMOND_CMD = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/desmond'
CFG_SIM_NAME = 'mdsim'
parameter_string = '\n    DATA = {\n    jobname    = "$MAINJOBNAME_$STAGENO$[_lambda$LAMBDA$]"\n    dir        = "$[$JOBPREFIX/$]$[$PREFIX/$]$MAINJOBNAME_$STAGENO$[_lambda$LAMBDA$]"\n    host       = "$SUBHOST"\n    fep.type = small_molecule\n    jin_file   = []\n    jin_must_transfer_file= []\n    jout       = ""\n    cfg_file   = ""\n    window     = ?\n    atom_group = none\n    restraints.new = []\n    restraints.existing = ignore\n    print_restraint = false\n    print_expected_memory = false\n    jlaunch_opt= [""]\n    }\n\n    VALIDATE = {\n    host = {type = str range = [1 10000000000]}\n    fep.type = {type = enum range = [prm_protein_binding prm_ligand_binding prm_thermostability prm_stability protein_selectivity covalent_ligand small_molecule metalloprotein ligand_selectivity absolute_binding solubility]}\n    cfg_file = {type = str range = [0 10000000000]}\n    jin_file = [\n       {type = str range = [0 10000000000]}\n       {type = list size = 0\n        elem = {type = str range = [0 10000000000]}}\n    ]\n    jin_must_transfer_file = {type = list size = 0 elem = {type = str range = [0 10000000000]}}\n    jout = [\n       {type = str range = [0 10000000000]}\n       {type = list size = 0\n        elem = {type = str range = [0 10000000000]}}\n    ]\n    window = [\n       {type = none}\n       {type = int0 _check = check_iwindow}\n       {type = list size = 0 elem = {type = int0 _check = check_iwindow}}\n    ]\n    atom_group = [\n       {type = enum range = [retain none]}\n       {atom  = {type = str range = [0 10000000000]}\n        name  = {type = str range = [0 10000000000]}\n        index = {type = int range = [0 255]}\n       }\n       {type = list size = 0\n        elem = {atom  = {type = str range = [0 10000000000]}\n                name  = {type = str range = [0 10000000000]}\n                index = {type = int range = [0 7]}\n               }\n       }\n    ]\n    restraints.existing = {type = enum range = [retain ignore ignore_posre]}\n    restraints.new = [ {type = list}\n                       {_skip = all}\n    ]\n    print_restraint = {type = bool}\n    print_expected_memory = {type = bool}\n    jlaunch_opt.black_list = ["!append!" "-exec" "-PROCS" "-in" "-c" "-overwrite"]\n    }\n    '
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*arg, **kwarg)
migrate_param(param: schrodinger.utils.sea.sea.Map)

The Berendsen method is no longer supported (it was CPU only). If we encounter it we automatically change it to Langevin, which was the behavior before it was removed via the gpu effect_if param. :param param: a param corresponding to this stage class to migrate

prestage()
crunch()
restart_subjobs(jobs)

Subclass should override this if it supports subjob restarting.

hook_captured_successful_job(job)
capture(job)
pack_stage(force=False)
class schrodinger.application.desmond.stage.simulate.RemovesInitialGCMCSolvent(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.SimulateBase

Any stage that actually does simulation should inherit from this class. Only vrun-type stages, which rely on the consistency of the previous stage’s trajectory and the cms model for the current stage, should derive from SimulateBase instead.

class schrodinger.application.desmond.stage.simulate.GCMCCapable(*args, **kwargs)

Bases: schrodinger.application.desmond.stage.simulate.RemovesInitialGCMCSolvent

An extension to SimulateBase that allows adding a GCMC plugin to the desmond simulation. Subclasses of this class become ‘GCMC-capable’. If no ‘gcmc’ block is passed to the class’s config block, this class behaves exactly as SimulateBase.

PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*args, **kwargs)
check_param()

See super for details. This subclass implementation checks if the gcmc block was passed in by the user to determine if this stage needs to do gcmc-functionality.

class schrodinger.application.desmond.stage.simulate.Simulate(*args, **kwargs)

Bases: schrodinger.application.desmond.stage.simulate.GCMCCapable

This class defines the GCMC-capable simulate stage, which can be thought of as the basic simulate stage, and is what the user will get when they use the name simulate. This is just a thin wrapper to associate the name ‘simulate’ with a corresponding class, even though it is otherwise identical to GCMCCapable. Edits to basic simulate functionality should be made to SimulateBase, not here. This class should be subclassed if GCMC support is needed, otherwise subclass SimulateBase

NAME = 'simulate'
class schrodinger.application.desmond.stage.simulate.ReplicaExchange(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.Simulate

NAME = 'replica_exchange'
CFG_SIM_NAME = 'remd'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*arg, **kwarg)
hook_captured_successful_job(job)
restart_subjobs(jobs)

Subclass should override this if it supports subjob restarting.

class schrodinger.application.desmond.stage.simulate.LambdaHopping(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.ReplicaExchange

NAME = 'lambda_hopping'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*arg, **kwarg)
crunch()
restart_subjobs(jobs)

Subclass should override this if it supports subjob restarting.

hook_captured_successful_job(job)
class schrodinger.application.desmond.stage.simulate.DesmondExtend(*args, **kwargs)

Bases: schrodinger.application.desmond.cmj.StageBase

Extend a simulate phase if requested by the user.

This stage is included in every FEP job, even those that are not extensions. However, it does not do anything unless the user includes a nonzero added_time parameter as input. In this case, the job is restarted from the simulate stage, continuing where the simulation left off.

Variables

should_restart_extend (bool) – if the previous stage failed, restart it rather than extending

NAME = 'desmond_extend'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*args, **kwargs)
crunch()

This is where jobs of this stage are created. This function should be overriden by the subclass.

restart_subjobs(jobs)

Subclass should override this if it supports subjob restarting.

class schrodinger.application.desmond.stage.simulate.VrunBase(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.SimulateBase

PARAM = <schrodinger.utils.sea.sea.Map object>
class schrodinger.application.desmond.stage.simulate.Vrun(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.VrunBase

NAME = 'vrun'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*arg, **kwarg)
crunch()
class schrodinger.application.desmond.stage.simulate.FepVrun(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.VrunBase

NAME = 'fep_vrun'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*arg, **kwarg)
crunch()
hook_captured_successful_job(job)
class schrodinger.application.desmond.stage.simulate.ConcatParam(ark={}, parent=None)

Bases: schrodinger.utils.sea.sea.Map

update(ark=None, file=None, tag={})

Updates this ‘Map’ object with the given ‘ark’ or with the given ‘file’.

Parameters
  • file – If ‘file’ is not None, it must be the name of a file in the ark file format. If ‘file’ is given, the ‘ark’ parameter will be ignored.

  • ark – ark can be a string or a dict or a ‘Map’ object. Or ark can be list of the previous objects.

class schrodinger.application.desmond.stage.simulate.Concatenate(*args, **kwargs)

Bases: schrodinger.application.desmond.stage.simulate.Simulate

NAME = 'concatenate'
PARAM = <schrodinger.utils.sea.sea.Map object>
__init__(*args, **kwargs)
property param
check_param()

See super for details. This subclass implementation checks if the gcmc block was passed in by the user to determine if this stage needs to do gcmc-functionality.

migrate_param(param: schrodinger.utils.sea.sea.Map)

The Berendsen method is no longer supported (it was CPU only). If we encounter it we automatically change it to Langevin, which was the behavior before it was removed via the gpu effect_if param. :param param: a param corresponding to this stage class to migrate

class schrodinger.application.desmond.stage.simulate.ReInit(*arg, **kwarg)

Bases: schrodinger.application.desmond.stage.simulate.SimulateBase

NAME = 'reinit'
PARAM = <schrodinger.utils.sea.sea.Map object>
collect_inputfile() [<class 'str'>]

Called from cmj.collect_inputfile() during startup. :return: List of input file names.

crunch()