schrodinger.application.matsci.order_parameter_mod module¶
Utilities for order parameter analysis.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.matsci.order_parameter_mod.
get_trj_from_cms_file
(cms_file)¶ Return the trajectory from the given .cms file.
Parameters: cms_file (str) – the .cms file (can be a path) Return type: list Returns: contains the trajectory as a list of schrodinger.application.desmond.packages.traj.Frame
-
exception
schrodinger.application.matsci.order_parameter_mod.
AslException
¶ Bases:
Exception
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.matsci.order_parameter_mod.
SmartsException
¶ Bases:
Exception
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
schrodinger.application.matsci.order_parameter_mod.
DipoleDirector
(msys_model, cms_model, asl)¶ Bases:
schrodinger.application.desmond.packages.analysis.DipoleDirector
Manage a dipole director.
-
__init__
(msys_model, cms_model, asl)¶
-
disableDyncalc
()¶ Disable the execution of _dyncalc(). This is used to avoid redundant _precalc() calculations delegated in _dyncalc().
-
isDynamic
()¶
-
-
class
schrodinger.application.matsci.order_parameter_mod.
MomentOfInertiaDirector
(msys_model, cms_model, asl)¶ Bases:
schrodinger.application.desmond.packages.analysis.MomentOfInertiaDirector
Manage a moment of inertia director.
-
__init__
(msys_model, cms_model, asl)¶
-
disableDyncalc
()¶ Disable the execution of _dyncalc(). This is used to avoid redundant _precalc() calculations delegated in _dyncalc().
-
isDynamic
()¶
-
-
class
schrodinger.application.matsci.order_parameter_mod.
UniqueSmartsDirector
(msys_model, cms_model, asl, smarts)¶ Bases:
schrodinger.application.desmond.packages.analysis.SmartsDirector
Manage a unique SMARTS director.
-
__init__
(msys_model, cms_model, asl, smarts)¶ Create an instance.
Parameters: - msys_model (Desmond msys .System) – the msys object (from msys.LoadMAE)
- cms_model (schrodinger.application.desmond.cms.Cms) – the cms object
- asl (str) – the ASL for the descriptor
- smarts (str) – the SMARTS for the descriptor
-
reduce_vec
(n, m)¶ Specify how to reduce the reference director vector, n, and all of the description vectors, m, into an order parameter.
Parameters: - n (numpy.array) – the reference director vector
- m (numpy.array) – the description vectors
Return type: float
Returns: the order parameter
-
disableDyncalc
()¶ Disable the execution of _dyncalc(). This is used to avoid redundant _precalc() calculations delegated in _dyncalc().
-
isDynamic
()¶
-
-
class
schrodinger.application.matsci.order_parameter_mod.
SmartsDirector
(msys_model, cms_model, asl, smarts)¶ Bases:
schrodinger.application.desmond.packages.analysis.SmartsDirector
Manage a SMARTS director.
-
reduce_vec
(n, m)¶ Specify how to reduce the reference director vector, n, and all of the description vectors, m, into an order parameter.
Parameters: - n (numpy.array) – the reference director vector
- m (numpy.array) – the description vectors
Return type: float
Returns: the order parameter
-
__init__
(msys_model, cms_model, asl, smarts)¶
-
disableDyncalc
()¶ Disable the execution of _dyncalc(). This is used to avoid redundant _precalc() calculations delegated in _dyncalc().
-
isDynamic
()¶
-
-
class
schrodinger.application.matsci.order_parameter_mod.
Descriptor
(name, group=None, asl=None, atype=None, smarts=None)¶ Bases:
object
Manage a descriptor.
-
DIPOLE
= 'dipole'¶
-
MOMENT_OF_INERTIA
= 'moment_of_inertia'¶
-
SMARTS_NONUNIQUE_BONDS
= 'SMARTS_nonunique_bonds'¶
-
SMARTS_UNIQUE_PAIR
= 'SMARTS_unique_pair'¶
-
SMARTS_UNIQUE_TRIPLE_NORMAL
= 'SMARTS_unique_triple_normal'¶
-
TYPES_TO_CLASSES
= {'SMARTS_nonunique_bonds': <class 'schrodinger.application.matsci.order_parameter_mod.SmartsDirector'>, 'SMARTS_unique_pair': <class 'schrodinger.application.matsci.order_parameter_mod.UniqueSmartsDirector'>, 'SMARTS_unique_triple_normal': <class 'schrodinger.application.matsci.order_parameter_mod.UniqueSmartsDirector'>, 'dipole': <class 'schrodinger.application.matsci.order_parameter_mod.DipoleDirector'>, 'moment_of_inertia': <class 'schrodinger.application.matsci.order_parameter_mod.MomentOfInertiaDirector'>}¶
-
GROUP_KWARG
= 'group'¶
-
ASL_KWARG
= 'asl'¶
-
ATYPE_KWARG
= 'atype'¶
-
SMARTS_KWARG
= 'smarts'¶
-
__init__
(name, group=None, asl=None, atype=None, smarts=None)¶ Create an instance.
Parameters: - name (str) – the name of the descriptor
- group (str or None) – the group of the descriptor or None if there isn’t one
- asl (str) – the ASL for the descriptor or None if there isn’t one
- atype (str) – the type of descriptor or None if there isn’t one
- smarts (str or None) – the SMARTS for the descriptor or None if there isn’t one
-
getDescriptor
(msys_obj, cms_obj)¶ Get the descriptor.
Parameters: - msys_obj (Desmond msys .System) – the msys object (from msys.LoadMAE)
- cms_obj (schrodinger.application.desmond.cms.Cms) – the cms object
Return type: schrodinger.application.desmond.packages.staf.CompositeDynamicAslAnalyzer
Returns: descriptor subclasses of the given type
-
getFileName
(basename)¶ Return a file name for this descriptor using the given base name.
Parameters: basename (str) – base name to use in naming the file Return type: str Returns: the descriptor file name
-
-
schrodinger.application.matsci.order_parameter_mod.
get_descriptors_from_file
(descriptors_file)¶ Return a list of descriptors from the given descriptors file.
Parameters: descriptors_file (str) – .json file containing specifications for descriptors, i.e. ways to determine vectors used in computing the order parameters with respect to the director, a specification includes information like name, group, ASL, type, and SMARTS (can be a path) Return type: list Returns: contains Descriptor
-
class
schrodinger.application.matsci.order_parameter_mod.
Director
(vec)¶ Bases:
schrodinger.application.desmond.packages.staf.GeomAnalyzerBase
Manage a director.
-
__init__
(vec)¶ Create an instance.
Parameters: vec (numpy.array) – the director vector
-
disableDyncalc
()¶ Disable the execution of _dyncalc(). This is used to avoid redundant _precalc() calculations delegated in _dyncalc().
-
isDynamic
()¶
-
-
class
schrodinger.application.matsci.order_parameter_mod.
OrderParameter
(cms_file, director_abc_coeffs, descriptors_file, logger=None)¶ Bases:
object
Manage order parameter analysis.
-
__init__
(cms_file, director_abc_coeffs, descriptors_file, logger=None)¶ Create an instance.
Parameters: - cms_file (str) – the .cms file for the simulation on which to run the order parameter analysis (can be a path)
- director_abc_coeffs (tuple) – coefficients of the static reference director vector in the lattice vector basis, for example (0, 0, 1) for the c-lattice vector or z-axis of a cubic cell
- descriptors_file (str) – .json file containing specifications for descriptors, i.e. ways to determine vectors used in computing the order parameters with respect to the director, a specification includes information like name, group, ASL, type, and SMARTS (can be a path) (see get_descriptors_from_file for more information)
- logger (logging.Logger or None) – output logger or None if there isn’t one
-
static
getDirector
(cms_obj, director_abc_coeffs)¶ Return the unit director vector object for the given cms (in Angstrom).
Parameters: - cms_obj (schrodinger.application.desmond.cms.Cms) – the cms object
- director_abc_coeffs (tuple) – coefficients of the static reference director vector in the lattice vector basis, for example (0, 0, 1) for the c-lattice vector or z-axis of a cubic cell
Return type: Returns: the unit director vector object
-
run
()¶ Run the order parameter analysis.
-