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

Class _ResidueIterator

object --+
         |
        _ResidueIterator

Residue iterator. Each Structure, Chain and Molecule will have one of these.

Instance Methods [hide private]
 
__init__(self, st, atoms, sort=True, connectivity_sort=False)
Residue iterator constructor.
 
__len__(self)
Number of residues in this st, chain, or molecule.
 
__iter__(self)
Iterate over residues in this st, chain, or molecule.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, st, atoms, sort=True, connectivity_sort=False)
(Constructor)

 

Residue iterator constructor.

Parameters:
  • st (Structure) - The Structure that the atoms list belongs to.
  • atoms (A list of _StructureAtoms.) - An atom iterator from which to select residues, e.g. chain.atom.
  • sort (bool) - If False, the residues will be returned in the order they are listed in the structure. If True, they will be sorted according to (chain, resnum, inscode, atom index).
  • connectivity_sort (bool) - If True, residues are sorted according to N->C order. A given chain of connectivity will be sorted will be sorted contiguously, but the order of several different chains or unconnected residues is undefined. Modifying the connectivity of CT during iteration will also produce undefined results.
Overrides: object.__init__