Package schrodinger :: Module structure :: Class _AtomCollection
[hide private]
[frames] | no frames]

Class _AtomCollection

A set of atoms, usually comprising a subset of the total atoms in a Structure. Initialize using a structure and an iterable of current atom indices.

Important methods include extractStructure and getAtomList. Use the atom attribute to iterate over all contained atoms. 1-based indexed access to the atoms is also possible using atom (e.g. atom[1] gets the first atom in the _AtomCollection). The number of atoms can be determined via len(self.atom) or len(self).

Intended as a base class for _Ring, _Molecule, and _Chain.

Instance Methods [hide private]
 
__init__(self, st, atoms)
 
atom(self)
Iterate over all atoms.
 
__len__(self)
Returns number of atoms.
 
getAtomList(self)
Return a list of atom indices.
 
extractStructure(self, copy_props=False)
Return a new Structure containing only the atoms associated with this substructure.
Method Details [hide private]

atom(self)

 

Iterate over all atoms. Also allows 1-based indexed access to the atoms.

Decorators:
  • @property

extractStructure(self, copy_props=False)

 

Return a new Structure containing only the atoms associated with this substructure. Structure properties, including the title, are inherited only if copy_props is set to True.