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

Class CenterOf

      object --+    
               |    
GeomAnalyzerBase --+
                   |
                  CenterOf

N.B.: The calculated center is an unwrapped coordinate.

Instance Methods [hide private]
 
__init__(self, gids, weights)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_precalc(self, calc)
 
_calcCircMean(self, calc, pbc)
@rtype: L{numpy.ndarray} of C{float}s @return: Circular mean as 1x3 array
 
_postcalc(self, calc, pbc, fr)
Result is (center, unwrapped-positions), where the first element is the unwrapped center, and the second element is a list of unwrapped positions of the selected atoms.

Inherited from GeomAnalyzerBase: __call__

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, gids, weights)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • weights (list of floats, or None)
  • gids (list of ints)
Overrides: object.__init__

_precalc(self, calc)

 
Parameters:
Overrides: GeomAnalyzerBase._precalc

_calcCircMean(self, calc, pbc)

 

@rtype: L{numpy.ndarray} of C{float}s
@return: Circular mean as 1x3 array

coordinate transformation: cartesian = triclinic * pbc.box
                           (x, y, z) = (a, b, c) * pbc.box
The calculation involves three steps:
1. Compute the approximate centroid using the circular mean
2. Unwrap all points with respect to the approximate centroid
3. Compute the weighted geometric center the usual way
Details of the circular mean algorithm can be found at U{wiki page<https://en.wikipedia.org/wiki/Center_of_mass#Systems_with_periodic_boundary_conditions>}

_postcalc(self, calc, pbc, fr)

 

Result is (center, unwrapped-positions), where the first element is the unwrapped center, and the second element is a list of unwrapped positions of the selected atoms.

Overrides: GeomAnalyzerBase._postcalc