Class Com
object --+
|
GeomAnalyzerBase --+
|
CenterOf --+
|
Com
- Known Subclasses:
-
Class for computing averaged position weighted by atomic mass, under the
periodic boundary condition.
Basic usage:
ana = Com(msys_model, cms_model, gids=[1, 23, 34, 5, 6])
results = analyze(tr, ana)
where C{tr} is a trajectory, and C{results} contain a C{list} of unwrapped
centers of mass as C{floats}, one C{float} for each frame. If
return_unwrapped_atompos is C{True}, C{results} contain a list of 2-tuples:
(unwrapped-center-of-mass, [unwrapped-positions-of-involved-atoms]), and
each 2-tuple in the list corresponds to a trajectory frame.
|
__init__(self,
msys_model,
cms_model,
asl=None,
gids=None,
return_unwrapped_atompos=False)
@type msys_model: C{msys.System}
@type cms_model: C{schrodinger.structure.Structure}
@type asl: C{str}
@param asl: ASL expression to specify the atom selection
@type gids: C{list} of C{int}s
@param gids: GIDs of atoms
@param return_unwrapped_atompos: if C{False}, return the unwrapped
center. |
|
|
Inherited from GeomAnalyzerBase :
__call__
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
__init__(self,
msys_model,
cms_model,
asl=None,
gids=None,
return_unwrapped_atompos=False)
(Constructor)
|
|
@type msys_model: C{msys.System}
@type cms_model: C{schrodinger.structure.Structure}
@type asl: C{str}
@param asl: ASL expression to specify the atom selection
@type gids: C{list} of C{int}s
@param gids: GIDs of atoms
@param return_unwrapped_atompos: if C{False}, return the unwrapped
center. Otherwise return both unwrapped
center and the unwrapped positions of
the selected atoms.
Both L{msys_model} and L{cms_model} must be previously obtained through
the L{read_cms} function. They both should have the same atom
coordinates and the same simulation box matrix. L{cms_model} is used to
obtain atom GIDs from ASL selection. L{msys_model} is used to retrieve
atom attribute from GIDs.
Either L{asl} or L{gids} must be specified, but not both.
- Parameters:
return_unwrapped_atompos - if False , return the unwrapped center. Otherwise
return both unwrapped center and the unwrapped positions of the
selected atoms.
- Overrides:
object.__init__
|