schrodinger.application.matsci.desconfig module

MSJ configuration tools for working with Desmond.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.matsci.desconfig.BARRIER_INFO

alias of schrodinger.application.matsci.desconfig.BarrierInfo

class schrodinger.application.matsci.desconfig.BarrierHeader(model)

Bases: object

Get header for the barrier based on the model property

__init__(model)

Instantiate the class to get for the barrier based on the model property

Parameters

model (cms.Cms) – model containing barrier information. Barrier information must be present in _raw_fsys_ct to be accessed.

extractBarrierInfoFromModel()

Extract barrier information from model

getImpermeableBarrierInfo()

Return barrier information for impermeable barrier

Returns

namedtuple containing barrier information

Return type

collections.namedtuple

getSemipermeableBarrierInfo()

Return barrier information for semipermeable barrier

Returns

namedtuple containing barrier information

Return type

collections.namedtuple

getBarrierTerm()

Return barrier term

Returns

barrier force term

Return type

sea.Map

getImpermeableTerm()

Return barrier term for impermeable barrier

Returns

barrier force term

Return type

sea.Map

getSemipermeableTerm()

Return barrier term for semipermeable barrier

Returns

barrier force term

Return type

sea.Map

schrodinger.application.matsci.desconfig.get_task_stage(extra_task_text='', check_cg=None, check_infinite=None, msj_string_header='', remove_com_motion=None)

Get desmond task stage.

Parameters
  • extra_task_text (str) – Additional text to place in the task stage. Ignored if task_stage=False.

  • check_cg (schrodinger.structure.Structure) – Check the given structure to see if it is coarse-grained. If it is, add the typical headers for the appropriate coarse-grained structure type. Note that the interplay between extra_task_test and the headers used for coarse-grained structures is uncertain and left to the caller to determine if the results are acceptable if both are used. Ignored if task_stage=False.

  • check_infinite (schrodinger.structure.Structure) – Check the given structure to see if it is infinite. If it is, add the typical headers for the infinite systems. Ignored if task_stage=False.

  • msj_string_header (when extra_task_text is empty, use this string as the header of the output msj) – str

  • remove_com_motion (bool) – None - default behavior, add remove_com_motion only to infinite atomic systems, if True add plugin to msj regardless. If False don’t add remove_com_plugin

Return type

str

Returns

Task stage

schrodinger.application.matsci.desconfig.create_msj(stringers, filename=None, task_stage=True, extra_task_text='', check_cg=None, check_infinite=None, msj_string_header='', remove_com_motion=None)

Write a Desmond .msj file based on the supplied stringers

Parameters
  • filename (str) – If given, write the msj string to this path

  • stringers (list of MSJStringer objects) – Each item of the list is the MSJStringer for a single stage. The stages will be written in list order

  • task_stage (bool) – Whether the traditional desmond auto task stage should be written before the stages in stringers

  • extra_task_text (str) – Additional text to place in the task stage. Ignored if task_stage=False.

  • check_cg (schrodinger.structure.Structure) – Check the given structure to see if it is coarse-grained. If it is, add the typical headers for the appropriate coarse-grained structure type. Note that the interplay between extra_task_test and the headers used for coarse-grained structures is uncertain and left to the caller to determine if the results are acceptable if both are used. Ignored if task_stage=False.

  • check_infinite (schrodinger.structure.Structure) – Check the given structure to see if it is infinite. If it is, add the typical headers for the infinite systems. Ignored if task_stage=False.

  • msj_string_header (when extra_task_text is empty, use this string as the header of the output msj) – str

  • remove_com_motion (bool) – None - default behavior, add remove_com_motion only to infinite atomic systems, if True add plugin to msj regardless. If False don’t add remove_com_plugin

Return type

str

Returns

The string that was written to the file

class schrodinger.application.matsci.desconfig.MSJStringer(stype, last=False, use_base=True, **kwargs)

Bases: object

A base class for setting up the information and generating a string describing that information for a stage in a Desmond MSJ file.

DOT = '_dot_'
MAX_STEPS = 'max_steps'
TIME = 'time'
TEMP = 'temperature'
SEED = 'randomize_velocity.seed'
PRESSURE = 'pressure'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
TIMESTEP = 'timestep'
JOBNAME = 'jobname'
CHECKPOINT = 'checkpt'
DIR = 'dir'
COMPRESS = 'compress'
INTERVAL = 'trajectory_dot_interval'
ENE_INTERVAL = 'eneseq_dot_interval'
ANALYSIS_TYPE = 'analysis_type'
OTHERS = 'othertag'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
SIMULATE = 'simulate'
ANALYSIS = 'matsci_analysis'
SYSBUILD = 'assign_forcefield'
AVE_CELL = 'average_cell'
EN_ANALYSIS = 'analysis'
CONCATENATE = 'concatenate'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
PADDING = '           '
INDENT = '               '
__init__(stype, last=False, use_base=True, **kwargs)

Create a MSJStringer object

Parameters
  • stype (str) – The type of stage this is. Should be one of the class constants MINIMIZE, SIMULATE, SYSBUILD, ANALYSIS, or AVE_CELL

  • last (bool) – Whether the msj lines typically associated with the last stage (dir, compress) should be included

  • use_base (bool) – Whether the base msj lines (jobname, checkpoint) that are common to almost all stages should be included.

All other keyword arguments are turned into lines in the .msj file. Keys that have a ‘.’ in them should have that . replaced with the class constant string DOT (_dot_). For instance to include a line setting trajectory.write_velocity to true, use the keyword argument trajectory_dot_write_velocity=’true’

createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

getTitle()

This function returns a title for the stage describing the main parameters. The default implementation has no title.

Return type

str

Returns

The title for this stage

class schrodinger.application.matsci.desconfig.AveCellMSJStringer(**kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for post average cell stage.

PERCENT_TO_AVG = 'percent_to_avg'
__init__(**kwargs)

Create a MSJStringer object

Parameters
  • stype (str) – The type of stage this is. Should be one of the class constants MINIMIZE, SIMULATE, SYSBUILD, ANALYSIS, or AVE_CELL

  • last (bool) – Whether the msj lines typically associated with the last stage (dir, compress) should be included

  • use_base (bool) – Whether the base msj lines (jobname, checkpoint) that are common to almost all stages should be included.

All other keyword arguments are turned into lines in the .msj file. Keys that have a ‘.’ in them should have that . replaced with the class constant string DOT (_dot_). For instance to include a line setting trajectory.write_velocity to true, use the keyword argument trajectory_dot_write_velocity=’true’

getTitle()

This function returns a title for the stage describing the main parameters. The default implementation has no title.

Return type

str

Returns

The title for this stage

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

class schrodinger.application.matsci.desconfig.AnalysisMSJStringer(**kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for the analysis stage.

__init__(**kwargs)

Create a MSJStringer object

Parameters
  • stype (str) – The type of stage this is. Should be one of the class constants MINIMIZE, SIMULATE, SYSBUILD, ANALYSIS, or AVE_CELL

  • last (bool) – Whether the msj lines typically associated with the last stage (dir, compress) should be included

  • use_base (bool) – Whether the base msj lines (jobname, checkpoint) that are common to almost all stages should be included.

All other keyword arguments are turned into lines in the .msj file. Keys that have a ‘.’ in them should have that . replaced with the class constant string DOT (_dot_). For instance to include a line setting trajectory.write_velocity to true, use the keyword argument trajectory_dot_write_velocity=’true’

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

getTitle()

This function returns a title for the stage describing the main parameters. The default implementation has no title.

Return type

str

Returns

The title for this stage

class schrodinger.application.matsci.desconfig.MDMSJStringer(time=None, temp=None, pressure=None, random_seed=None, ensemble='NPT', method=None, timestep=None, last=False, **kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for Molecular Dynamics stages

__init__(time=None, temp=None, pressure=None, random_seed=None, ensemble='NPT', method=None, timestep=None, last=False, **kwargs)

Create a MDMSJStringer object

Any keyword that does not have a value supplied will use the default Desmond value for MD simulations.

Parameters
  • time (float) – Time in picoseconds

  • temp (float) – Temperature in Kelvin

  • pressure (float) – The pressure in bar

  • random_seed (int) – The seed for the random number generator

  • ensemble (str) – Valid Desmond ensemble such as NPT, NVT

  • method (str) – Valid Desmond ensemble method such as NH, Berendson, Langevin

  • timestep (int or float or str or list) – The timestep in picoseconds. If a string, will be treated as a float if it converts to float without error, otherwise it is used directly so must be in the proper [ x y z ] format used in .msj and .cfg files. If float or int, a string of the following format will be generated [ timestep timestep timestep * 3. ] If a list, the items will be converted to a string list of [ x y z ]

  • last (bool) – Whether the msj lines typically associated with the last stage (dir, compress) should be included

All other keyword arguments are turned into lines in the .msj file. See parent class for additional information.

getTitle()

Return a title for the stage describing the main parameters.

Return type

str

Returns

The title for this stage

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

class schrodinger.application.matsci.desconfig.MSAnalysisMSJStringer(analysis_type=None, **kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for MS MD Analysis stages

__init__(analysis_type=None, **kwargs)

Create a MSAnalysisMSJStringer object

Any keyword that does not have a value supplied will use the default Desmond value for MD simulations.

Parameters

analysis_type (str) – A string in the form of [ property property ] that lists the properties to be computed in the analysis.

All other keyword arguments are turned into lines in the .msj file. See parent class for additional information.

getTitle()

Return a title for the stage describing the main parameters.

Return type

str

Returns

The title for this stage

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

class schrodinger.application.matsci.desconfig.BrownieMSJStringer(time=100.0, temp=10.0, ensemble='NVT', timestep='[ 0.001 0.001 0.003 ]', delta_max=0.1, btau=None, ttau=None, **kwargs)

Bases: schrodinger.application.matsci.desconfig.MDMSJStringer

An MSJStringer class for Brownie stages

__init__(time=100.0, temp=10.0, ensemble='NVT', timestep='[ 0.001 0.001 0.003 ]', delta_max=0.1, btau=None, ttau=None, **kwargs)

Create a BrownieMSJStringer object

Desmond config does not have a specific set of defaults for Brownie stages, so the defaults are supplied here for all keywords.

Parameters
  • delta_max (float) – The value of delta_max

  • btau (float) – The value of the barostat tau

  • ttau (float) – The value of the thermostat tau

See parent class for additional information.

getTitle()

Return a title for the stage describing the main parameters.

Return type

str

Returns

The title for this stage

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

class schrodinger.application.matsci.desconfig.SysbuildMSJStringer(forcefield='OPLS_2005', compress='""', **kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for building systems

__init__(forcefield='OPLS_2005', compress='""', **kwargs)

Create a SysbuildMSJStringer object

Parameters

forcefield (str) – The forcefield to use

All other keyword arguments are turned into lines in the .msj file. See parent class for additional information.

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

formLine(key, value)

Create the line that should go in the .msj file for this key.

Subclasses should use this function to create custom strings for specific key values

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

getTitle()

This function returns a title for the stage describing the main parameters. The default implementation has no title.

Return type

str

Returns

The title for this stage

class schrodinger.application.matsci.desconfig.ConcatMSJStringer(**kwargs)

Bases: schrodinger.application.matsci.desconfig.MSJStringer

An MSJStringer class for the concatenate stage.

STAGES = 'stages'
__init__(**kwargs)

Create a MSJStringer object

Parameters
  • stype (str) – The type of stage this is. Should be one of the class constants MINIMIZE, SIMULATE, SYSBUILD, ANALYSIS, or AVE_CELL

  • last (bool) – Whether the msj lines typically associated with the last stage (dir, compress) should be included

  • use_base (bool) – Whether the base msj lines (jobname, checkpoint) that are common to almost all stages should be included.

All other keyword arguments are turned into lines in the .msj file. Keys that have a ‘.’ in them should have that . replaced with the class constant string DOT (_dot_). For instance to include a line setting trajectory.write_velocity to true, use the keyword argument trajectory_dot_write_velocity=’true’

formLine(key, value)

Create the line that should go in the .msj file for the ‘stages’ key. Parent function creates strings for all other keys.

Parameters
  • key (str) – Typically, the string before the key = value pair on an msj line.

  • value (str) – Typically, the string after the key = value pair on an msj line.

Return type

str

Returns

The line (or lines) to put in the .msj file for this key/value pair

ANALYSIS = 'matsci_analysis'
ANALYSIS_TYPE = 'analysis_type'
AVE_CELL = 'average_cell'
CHECKPOINT = 'checkpt'
COMPRESS = 'compress'
CONCATENATE = 'concatenate'
DIR = 'dir'
DOT = '_dot_'
ENE_INTERVAL = 'eneseq_dot_interval'
ENSEMBLE = 'ensemble'
ENSEMBLE_CLASS = 'ensemble.class'
ENSEMBLE_METHOD = 'ensemble.method'
EN_ANALYSIS = 'analysis'
INDENT = '               '
INTERVAL = 'trajectory_dot_interval'
ISOTROPY = 'backend_dot_integrator_dot_pressure_dot_isotropy'
JOBNAME = 'jobname'
KNOWN_LINES = {'analysis_type', 'checkpt', 'compress', 'dir', 'ensemble', 'ensemble.class', 'ensemble.method', 'jobname', 'max_steps', 'othertag', 'pressure', 'randomize_velocity.seed', 'temperature', 'time', 'timestep', 'trajectory_dot_interval'}
LINE_ORDER = ['max_steps', 'analysis_type', 'time', 'timestep', 'ensemble', 'ensemble.class', 'ensemble.method', 'temperature', 'pressure', 'trajectory_dot_interval', 'randomize_velocity.seed', 'othertag', 'jobname', 'dir', 'compress', 'checkpt']
MAX_STEPS = 'max_steps'
MSJ_BASE = {'checkpt': 'no', 'jobname': '"$MASTERJOBNAME"'}
MSJ_LAST = {'compress': '""', 'dir': '"."'}
OTHERS = 'othertag'
PADDING = '           '
PRESSURE = 'pressure'
RANDOMIZE_VEL = 'randomize_velocity_dot_first'
SEED = 'randomize_velocity.seed'
SETTINGS = {'analysis': None, 'assign_forcefield': None, 'average_cell': None, 'concatenate': None, 'matsci_analysis': None, 'simulate': <schrodinger.utils.sea.sea.Map object>}
SIMULATE = 'simulate'
SYSBUILD = 'assign_forcefield'
TEMP = 'temperature'
TIME = 'time'
TIMESTEP = 'timestep'
TRJ_WRITE_VEL = 'trajectory_dot_write_velocity'
createString(concatenate=False)

Create and return the string that represents this stage in the .msj file

Parameters

concatenate (bool) – If True enable concatenate mode. In this mode, stage type is not printed

Return type

str

Returns

The msj string representing this stage

getTitle()

This function returns a title for the stage describing the main parameters. The default implementation has no title.

Return type

str

Returns

The title for this stage

schrodinger.application.matsci.desconfig.get_materials_relaxation_stringers(temp=300.0, compress_last=True, pressure_isotropy='anisotropic')

Get a list of Stringer objects that reproduce the Materials Relaxation protocol

Parameters
  • temp (float) – The temperature for the last of the three stages

  • compress_last (bool) – If true, compress the last stage - the trajectory will not be available except as part of the tgz file. If False, the last stage will not be compressed and the trajectory will be available.

  • pressure_isotropy (str) – Barostat coupling between x, y, and z.

Return type

list

Returns

Each item of the list is a stage in the Materials Relaxation protocol

schrodinger.application.matsci.desconfig.get_semicrystalline_relaxation1_stringers(temp=300.0, compress_last=True, pressure_isotropy='anisotropic')

Get a list of Stringer objects that reproduce first Semi-Crystalline protocol

Parameters
  • temp (float) – The temperature for the last of the three stages

  • compress_last (bool) – If true, compress the last stage - the trajectory will not be available except as part of the tgz file. If False, the last stage will not be compressed and the trajectory will be available.

  • pressure_isotropy (str) – Barostat coupling between x, y, and z.

Return type

list

Returns

Each item of the list is a stage in the first Semi-Crysatlline relaxation protocol

schrodinger.application.matsci.desconfig.get_semicrystalline_relaxation2_stringers(temp=300.0, compress_last=True, pressure_isotropy='anisotropic')

Get a list of Stringer objects that reproduce second Semi-Crystalline Relaxation protocol

Parameters
  • temp (float) – The temperature for the last of the three stages

  • compress_last (bool) – If true, compress the last stage - the trajectory will not be available except as part of the tgz file. If False, the last stage will not be compressed and the trajectory will be available.

  • pressure_isotropy (str) – Barostat coupling between x, y, and z.

Return type

list

Returns

Each item of the list is a stage in the second Semi-Crysatlline relaxation protocol

schrodinger.application.matsci.desconfig.get_compressive_relaxation_stringers(temp=300.0, compress_last=True, pressure_isotropy='anisotropic')

Get a list of Stringer objects that reproduce the compressive relaxation protocol

Parameters
  • temp (float) – The temperature for the last of the three stages

  • compress_last (bool) – If true, compress the last stage - the trajectory will not be available except as part of the tgz file. If False, the last stage will not be compressed and the trajectory will be available.

  • pressure_isotropy (str) – Barostat coupling between x, y, and z.

Return type

list

Returns

Each item of the list is a stage in the compressive Relaxation protocol

schrodinger.application.matsci.desconfig.get_ladder_polymer_relaxation_stringers(pressure=1.01325, timestep=0.001)

Get a list of Stringer objects that reproduce the ladder polymer relaxation protocol (larsen relaxation protocol).

Parameters
  • pressure (float) – maximum value of pressue

  • timestep (int or float or str or list) – The timestep in picoseconds.

Return type

list

Returns

Each item of the list is a stage in the Larsen Relaxation protocol

schrodinger.application.matsci.desconfig.get_cfg_names_from_msj(path=None, data=None)

An iterator that yields the index, stage map and cfg file name for each stage in the given data that has a cfg file associated with it

Parameters
  • path (str) – The path to the msj file. Either this or data must be given

  • data (schrodinger.utils.sea.Map) – The data for all stages. Either this or data must be given.

Return type

int, schrodinger.utils.sea.Map, str

Returns

(The stage index, the Map containing the stage data, and the name of the CFG file for that stage)

schrodinger.application.matsci.desconfig.verify_cfg_files_exist(path)

Verify that the cfg files referenced in an msj file are present

Parameters

path (str) – The path to the msj file. cfg files will be searched for in the same directory.

Return type

list

Returns

Each item of the list is a name of a required cfg file

Raises

FileNotFoundError – If any of the cfg files do not exist in the same directory

schrodinger.application.matsci.desconfig.copy_msj_and_cfg(path, destination_dir='.')

Copy the specified msj file and any associated cfg files into the given directory

Parameters
  • path (str) – The path to the msj file

  • destination_dir (str) – The directory to copy the files to

Return type

list

Returns

Each item of the list is the name (not path) of a file that was copied, including the msj and any cfg files

Raises

FileNotFoundError – If any of the files are not found