Package schrodinger :: Package application :: Package desmond :: Package packages :: Module analysis :: Class OrderParameter
[hide private]
[frames] | no frames]

Class OrderParameter

      object --+    
               |    
GeomAnalyzerBase --+
                   |
                  OrderParameter


Given the director (local or global), and the descriptor (local or global),
calculate the order parameter <P2> for each frame
    S = 1/N sum_i ((3 * (n dot m_i)^2 -1) / 2)
Where n is the director vector and m is the descriptor vector.
For example, n is the z axis and m is the electric dipole moment.

Typical usage includes
    Director            Descriptor          result
    Axis                Lipid               avg over carbon type
    Axis                Smarts              avg over bond type
    Axis                Dipole              avg over molecule
    SystemDipole        Dipole              avg over molecule
    Dipole              Smarts              avg over bond type

To extend its functionality, implement to the L{GeomAnalyzerBase} interface
and provide the reduction rule as callable.

Instance Methods [hide private]
 
__init__(self, vec1, vec2, reducer)
@param vec1: a L{GeomAnalyzerBase} that computes director @param vec2: a L{GeomAnalyzerBase} that computes descriptor @type reducer: a callable that reduces the results of C{vec1} and C{vec2} to order parameter for each frame
 
_precalc(self, calc)
 
_postcalc(self, *args)

Inherited from GeomAnalyzerBase: __call__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from GeomAnalyzerBase (private): _get_sites, _sites2gids

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, vec1, vec2, reducer)
(Constructor)

 

@param   vec1: a L{GeomAnalyzerBase} that computes director
@param   vec2: a L{GeomAnalyzerBase} that computes descriptor
@type reducer: a callable that reduces the results of C{vec1} and
               C{vec2} to order parameter for each frame

Typically both director and descriptor return Nx3 vectors for each
frame, where N depends on the context. In this case, one should make
sure that the orders of these vectors match. For example, if both
director and descriptor give one vector per molecule, then the
implementation should guarantee the molecule orders are the same in
vec1() and vec2().

For axis director which returns 1x3 vector, reduction with descriptor
is taken care of by numpy broadcasting. For more complicated cases
where director and descriptor have incompatible dimensions, the user
needs to provide special-purpose reduce function, see
L{SmartsDirector.reduce_vec} for example.

Overrides: object.__init__

_precalc(self, calc)

 
Overrides: GeomAnalyzerBase._precalc
(inherited documentation)

_postcalc(self, *args)

 
Overrides: GeomAnalyzerBase._postcalc
(inherited documentation)