Package schrodinger :: Package trajectory :: Module atomselection
[hide private]
[frames] | no frames]

Module atomselection

A group of classes to help select atoms from trajectory frames.

The selection of atoms can be done by atom index (FrameIndexSelection), Atom Selection Language (FrameAslSelection), and slice specification (FrameSliceSelection). In addition, the select_component function can be used to create a selection based on component names.

Although there is not currently a parent class, all AtomSelection classes implement a common interface that consists of the following methods:

The getArraySelection() method is provided since numpy arrays allow non-index based methods (e.g. slices).

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  __metaclass__
type(object) -> the object's type type(name, bases, dict) -> a new type
  _AtomSelection
A general class for ASL expression support.
  FrameIndexSelection
A class that defines a static set of indices to be selected from all frames.
  FrameAslSelection
A class for selecting atoms from frames in a given simulation using ASL.
  FrameSliceSelection
A class for efficiently selecting a range of atoms.
Functions [hide private]
 
combine_slice(slice_list)
Return a new slice object if the provided slice objects can be concatenated.
 
select_component(cms_struct, comp_list)
Return a selection based on the component names.
Variables [hide private]
  _mmasl = Initializer([mm.mmasl_initialize], [mm.mmasl_terminate])
Function Details [hide private]

combine_slice(slice_list)

 

Return a new slice object if the provided slice objects can be concatenated. Otherwise, return a sequence of integers representing a combination of slice ranges. Note that any duplicated indices are removed from the sequence.

select_component(cms_struct, comp_list)

 

Return a selection based on the component names. If selected indices can be converted to a slice, a FrameSliceSelection instance will be returned. Otherwise, return FrameIndexSelection.