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

Class _Molecule

_AtomCollection --+
                  |
                 _Molecule

A class used to return molecule information when iterating over molecules in a Structure object.

Important methods include extractStructure and getAtomList. The atom attribute can be used to iterate over all atoms in the molecule, and the number of atoms can be determined via len(molecule.atom).

The residue iterator allows for iteration over residues of the molecule, returning _Residue instances.

Instance Methods [hide private]
 
__init__(self, st, molnum, atoms)
Initialize the Molecule object.
 
_getMoleculeResidueIterator(self)
 
__int__(self)
Return an integer rep - the molecule number.
 
__str__(self)
 
applyStyle(self, atoms=ATOM_BALLNSTICK, bonds=BOND_BALLNSTICK)
Applies the given display styles to the atoms and bonds of the molecule.

Inherited from _AtomCollection: __len__, atom, extractStructure, getAtomList

Class Variables [hide private]
  residue = property(_getMoleculeResidueIterator, doc= "Returns ...
  number = property(__int__, doc= "Returns the molecule number o...
Method Details [hide private]

__init__(self, st, molnum, atoms)
(Constructor)

 

Initialize the Molecule object.

Overrides: _AtomCollection.__init__

applyStyle(self, atoms=ATOM_BALLNSTICK, bonds=BOND_BALLNSTICK)

 

Applies the given display styles to the atoms and bonds of the molecule.

Parameters:
  • atoms (int) - display style for atoms given by structure module constants ATOM_NOSTYLE, ATOM_CIRCLE, ATOM_CPK, ATOM_BALLNSTICK. Default is ATOM_BALLNSTICK.
  • atoms (int) - display style for bonds given by structure module constants BOND_NOSTYLE, BOND_WIRE, BOND_TUBE, BOND_BALLNSTICK. Default is BOND_BALLNSTICK.
  • bonds (int)

Class Variable Details [hide private]

residue

Value:
property(_getMoleculeResidueIterator, doc= "Returns residue iterator f\
or all residues in the molecule.")

number

Value:
property(__int__, doc= "Returns the molecule number of this molecule."\
)