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

Class _Molecule

object --+
         |
        _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.
 
_getAtomIterator(self)
 
_getMoleculeResidueIterator(self)
 
__int__(self)
Return an integer rep - the molecule number.
 
__str__(self)
str(x)
 
getAtomList(self)
Return a list of atom indices corresponding to this molecule.
 
extractStructure(self, copy_props=False)
Return a new Structure containing only this molecule.
 
applyStyle(self, atoms=3, bonds=3)
Applies the given display styles to the atoms and bonds of the molecule.

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

Properties [hide private]
  atom
Returns an atom iterator for all atoms in the molecule.
  residue
Returns residue iterator for all residues in the molecule.
  number
Returns the molecule number of this molecule.

Inherited from object: __class__

Method Details [hide private]

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

 

Initialize the Molecule object.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

extractStructure(self, copy_props=False)

 

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

applyStyle(self, atoms=3, bonds=3)

 

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)

Property Details [hide private]

atom

Returns an atom iterator for all atoms in the molecule.

Get Method:
_getAtomIterator(self)

residue

Returns residue iterator for all residues in the molecule.

Get Method:
_getMoleculeResidueIterator(self)

number

Returns the molecule number of this molecule.

Get Method:
__int__(self) - Return an integer rep - the molecule number.