extract_atoms(cms_model,
selector,
tr,
format=' maestro ' ,
is_subsystem=False)
|
|
A generator to extract the specified atoms from the trajectory.
- Parameters:
cms_model (schrodinger.structure.Structure) - This must be consistent with the trajectory tr .
selector (str or a callable) - If the value is a str , it must a valid ASL
expression consistent with cms_model . The expression
will be repeatedly applied to each frame, which means that the
selected atoms may differ from frame to frame. If the value is an
callable, which should take a CMS model as the argument and
return a list of selected atom indices.
tr (list of traj.Frame objects) - Trajectory
format (str ) - Currently, we support only "maestro" (or
"mae" in short) and None . If it's
"maestro", this function will return a schrodinger.structure.Structure object for the
subsystem, or it will return a traj.Frame object for the subsystem.
is_subsystem (bool ) -
-
If true, this function will extract the specified subsystem
from the trajectory. It's important to understand what we
mean by "subsystem", for this, refer to the
docstring of the topo.extract_subsystem function.
-
If false, this function will extract an arbitrary set of
atoms as specified by
selector .
- Returns: A tuple. The first element is a schrodinger.structure.Structure object if
format="maestro" , or a traj.Frame object if format=None The
second element is the corresponding aids
|