schrodinger.application.desmond.packages.energygroup module¶
-
exception
schrodinger.application.desmond.packages.energygroup.
EnergyGroupError
¶ Bases:
Exception
-
__cause__
¶ exception cause
-
__class__
¶ alias of
builtins.type
-
__context__
¶ exception context
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__weakref__': <attribute '__weakref__' of 'EnergyGroupError' objects>, '__doc__': None})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
()¶
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__
¶
-
__traceback__
¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
schrodinger.application.desmond.packages.energygroup.
EnergyGroupBase
¶ Bases:
object
Its subclasses work with
EnergyFacade
to perform energy group calculations.The subclass instance should have the following public attributes: -
key
: immutable and iterable. It is used as the key to retrievecalculation result from cache inEnergyFacade
kwargs
:dict
. It is the keyword arguments forget_energies
.
Its roles include: - store and validate the parameters - retrieve result from the cache in
EnergyFacade
-
getResult
(result)¶ Retrieve and format the result from the cache in
EnergyFacade
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n Its subclasses work with `EnergyFacade` to perform energy group calculations.\n\n The subclass instance should have the following public attributes:\n - `key`: immutable and iterable. It is used as the key to retrieve\n calculation result from cache in `EnergyFacade`\n - `kwargs`: `dict`. It is the keyword arguments for `get_energies`.\n\n Its roles include:\n - store and validate the parameters\n - retrieve result from the cache in `EnergyFacade`\n ', 'getResult': <function EnergyGroupBase.getResult>, '__dict__': <attribute '__dict__' of 'EnergyGroupBase' objects>, '__weakref__': <attribute '__weakref__' of 'EnergyGroupBase' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
class
schrodinger.application.desmond.packages.energygroup.
Energy
(_, molecule_number, type, type2)¶ Bases:
schrodinger.application.desmond.packages.energygroup.EnergyGroupBase
Analyzer for energy group calculation with single molecule selection. The pre-defined energy groups are (see COMPONENT_LIST)
- Selected molecule
- All atoms - group 1, 3, 4, 5
- Solute atoms - group 1
- Membrane atoms - group 1
- Solvent atoms - group 1
-
TYPE_MAP
= {'Angle': 'angle', 'Bond': 'stretch', 'Coulomb': 'elec', 'Torsion': 'dihedral', 'Total': 'Total', 'vdW': 'vdw'}¶
-
COMPONENT_LIST
= ['Self', 'Other', 'Solute', 'Membrane', 'Solvent']¶
-
__init__
(_, molecule_number, type, type2)¶ Parameters: - _ – it is a place holder for cms_model
- molecule_number (
int
) – index of the molecule - type (
str
) – pre-defined energy type, see TYPE_MAP - type2 (
str
) – pre-defined atom group, see COMPONENT_LIST
-
getResult
(result)¶ Returns: frame-by-frame result of the type
energy (see TYPE_MAP) of the atom grouptype2
(see COMPONENT_LIST)Return type: a list
of `float`s
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n Analyzer for energy group calculation with single molecule selection. The\n pre-defined energy groups are (see COMPONENT_LIST)\n 1. Selected molecule\n 2. All atoms - group 1, 3, 4, 5\n 3. Solute atoms - group 1\n 4. Membrane atoms - group 1\n 5. Solvent atoms - group 1\n ', 'TYPE_MAP': {'Coulomb': 'elec', 'vdW': 'vdw', 'Bond': 'stretch', 'Angle': 'angle', 'Torsion': 'dihedral', 'Total': 'Total'}, 'COMPONENT_LIST': ['Self', 'Other', 'Solute', 'Membrane', 'Solvent'], '__init__': <function Energy.__init__>, 'getResult': <function Energy.getResult>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
class
schrodinger.application.desmond.packages.energygroup.
InteractionEnergy
(_, asl1, asl2)¶ Bases:
schrodinger.application.desmond.packages.energygroup.EnergyGroupBase
Analyzer for interaction energy group calculation.
-
__init__
(_, asl1, asl2)¶ Parameters: - asl1 (
str
) – atom selection for group 1 - asl2 (
str
) – atom selection for group 2
- asl1 (
-
getResult
(result)¶ Returns: frame-by-frame result of the electric and van der Walls energies (both non-bonded and pair) between the two groups Return type: a list
of `tuple`s. Each tuple contains two `float`s
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n Analyzer for interaction energy group calculation.\n ', '__init__': <function InteractionEnergy.__init__>, 'getResult': <function InteractionEnergy.getResult>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
schrodinger.application.desmond.packages.energygroup.
Bulk
(cms_model, type)¶ Bases:
schrodinger.application.desmond.packages.energygroup.EnergyGroupBase
Analyzer for material science energy group calculation
-
MAX_GROUPS
= 870¶
-
OPTIONS
= {'DENSITY', 'PRESSURE_TENSOR', 'COHES_E', 'SOL_PARAM', 'SPECIFIC_HEAT', 'VOLUME', 'HEAT_VAP', 'INTRA_E', 'TOTAL_E'}¶
-
__init__
(cms_model, type)¶ Initialize self. See help(type(self)) for accurate signature.
-
getResult
(result)¶ Retrieve and format the result from the cache in
EnergyFacade
-
getCfgParams
(cfg_file)¶ Parameters: cfg_file – path to the simulation configuration file
-
parseEnergies
(tmp_dir, num_groups)¶ Parse results of material science energy group calculaiton
Return type: dict
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n Analyzer for material science energy group calculation\n ', 'MAX_GROUPS': 870, 'OPTIONS': {'DENSITY', 'PRESSURE_TENSOR', 'COHES_E', 'SOL_PARAM', 'SPECIFIC_HEAT', 'VOLUME', 'HEAT_VAP', 'INTRA_E', 'TOTAL_E'}, '__init__': <function Bulk.__init__>, 'getResult': <function Bulk.getResult>, 'getCfgParams': <function Bulk.getCfgParams>, '_reduceEnergies': <function Bulk._reduceEnergies>, '_calcSpecHeat': <function Bulk._calcSpecHeat>, '_calcSpecHeatNVE': <function Bulk._calcSpecHeatNVE>, '_getResultsForLastNPercent': <function Bulk._getResultsForLastNPercent>, 'parseEnergies': <function Bulk.parseEnergies>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
schrodinger.application.desmond.packages.energygroup.
SliceParams
(first, interval, last)¶ Bases:
tuple
-
__add__
¶ Return self+value.
-
__class__
¶ alias of
builtins.type
-
__contains__
¶ Return key in self.
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getitem__
¶ Return self[key].
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__iter__
¶ Implement iter(self).
-
__le__
¶ Return self<=value.
-
__len__
¶ Return len(self).
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__mul__
¶ Return self*value.n
-
__ne__
¶ Return self!=value.
-
static
__new__
(_cls, first, interval, last)¶ Create new instance of SliceParams(first, interval, last)
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
()¶ Return a nicely formatted representation string
-
__rmul__
¶ Return self*value.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__slots__
= ()¶
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
count
(value) → integer -- return number of occurrences of value¶
-
first
¶ Alias for field number 0
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
-
interval
¶ Alias for field number 1
-
last
¶ Alias for field number 2
-
-
class
schrodinger.application.desmond.packages.energygroup.
EnergyComponent
¶ Bases:
object
Class for storing different energy components
-
add
(term, val)¶
-
elec
¶
-
vdw
¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n Class for storing different energy components\n ', 'add': <function EnergyComponent.add>, 'elec': <property object>, 'vdw': <property object>, '__dict__': <attribute '__dict__' of 'EnergyComponent' objects>, '__weakref__': <attribute '__weakref__' of 'EnergyComponent' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
schrodinger.application.desmond.packages.energygroup.
temp_dir
()¶
-
schrodinger.application.desmond.packages.energygroup.
get_energies
(sim_cfg, tr_path, cms_model, slicing, mol_num=None, asls=None, groups=None, max_groups=870, parse=<function _parse_energies>)¶ Calculate energies between groups of atoms specified by ASL selections, list of list of AIDs, or molecule number. Note there should be no overlap between any pair of the atom groups.
Parameters: parse (callable) – parser for the energy-group output data file Return type: (c{list} of c{float}s, c{list} of EnergyComponent
)Returns: simulation times, and various energies for each frame See
EnergyFacade
for other arguments
-
class
schrodinger.application.desmond.packages.energygroup.
EnergyFacade
(sim_cfg, tr_path, cms_model, slicing)¶ Bases:
object
A helper class to manage energy group calculations. Different energy group calculations have different input/output formats. All these details are hidden by using this class and the subclasses of
EnergyGroupBase
.To get full control over the energy group calculation, call
get_energies
directly.-
__init__
(sim_cfg, tr_path, cms_model, slicing)¶ Parameters: - sim_cfg (
str
orNone
) – Path to Desmond simulaiton configuration. - tr_path (
str
) – Path to trajectory folder
- sim_cfg (
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.desmond.packages.energygroup', '__doc__': '\n A helper class to manage energy group calculations. Different energy group\n calculations have different input/output formats. All these details are\n hidden by using this class and the subclasses of `EnergyGroupBase`.\n\n To get full control over the energy group calculation, call `get_energies`\n directly.\n ', '__init__': <function EnergyFacade.__init__>, 'get': <function EnergyFacade.get>, '__dict__': <attribute '__dict__' of 'EnergyFacade' objects>, '__weakref__': <attribute '__weakref__' of 'EnergyFacade' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.desmond.packages.energygroup'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
get
(ene)¶
-