schrodinger.application.matsci.order_parameter_mod module

Utilities for order parameter analysis.

Copyright Schrodinger, LLC. All rights reserved.

exception schrodinger.application.matsci.order_parameter_mod.AslException

Bases: exceptions.Exception

class schrodinger.application.matsci.order_parameter_mod.Descriptor(name, group=None, asl=None, atype=None, smarts=None)

Bases: object

Manage a descriptor.

ASL_KWARG = 'asl'
ATYPE_KWARG = 'atype'
DIPOLE = 'dipole'
GROUP_KWARG = 'group'
MOMENT_OF_INERTIA = 'moment_of_inertia'
SMARTS_KWARG = 'smarts'
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_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'>, 'SMARTS_unique_pair': <class 'schrodinger.application.matsci.order_parameter_mod.UniqueSmartsDirector'>}
getDescriptor(msys_obj, cms_obj)

Get the descriptor.

Parameters:
Return type:

schrodinger.application.desmond.packages.analysis._CompositeAnalyzer

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
class schrodinger.application.matsci.order_parameter_mod.DipoleDirector(msys_obj, cms_obj, asl)

Bases: schrodinger.application.desmond.packages.analysis.DipoleDirector

Manage a dipole director.

class schrodinger.application.matsci.order_parameter_mod.Director(vec)

Bases: schrodinger.application.desmond.packages.analysis.GeomAnalyzerBase

Manage a director.

class schrodinger.application.matsci.order_parameter_mod.MomentOfInertiaDirector(msys_obj, cms_obj, asl)

Bases: schrodinger.application.desmond.packages.analysis.MomentOfInertiaDirector

Manage a moment of inertia director.

class schrodinger.application.matsci.order_parameter_mod.OrderParameter(cms_file, director_abc_coeffs, descriptors_file, logger=None)

Bases: object

Manage order parameter analysis.

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:

Director

Returns:

the unit director vector object

run()

Run the order parameter analysis.

class schrodinger.application.matsci.order_parameter_mod.SmartsDirector(msys_obj, cms_obj, 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

exception schrodinger.application.matsci.order_parameter_mod.SmartsException

Bases: exceptions.Exception

class schrodinger.application.matsci.order_parameter_mod.UniqueSmartsDirector(msys_obj, cms_obj, asl, smarts)

Bases: schrodinger.application.desmond.packages.analysis.SmartsDirector

Manage a unique 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

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
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