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.
|
__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. |
|
|
Iterate over all atoms. Also allows 1-based indexed access to the
atoms.
- Decorators:
|
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.
|