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

Class TextualStructure

Structure --+
            |
           TextualStructure

A sub-class of Structure for use when reading from a Maestro format file and only the structure-level properties are needed. The actual atom and bond records are not parsed from the file and so can't actually be accessed. The only things possible with this type of Strucure are to access the structure level properties or to write it out unchanged to a file. Attempts to access the atom or bond data, directly or indirectly, will raise an exception.

The only useful way to create a TextualStructure object is via the StructureReader with the 'maestro_text' format.

Instance Methods [hide private]
 
__init__(self, ct, txt)
Initialize the TextualStructure object.
 
__str__(self)
Return the structure object as a text string
 
_getStructureAtomContainer(self)
 
atom(self)
 
_getStructureMoleculeIterator(self)
 
molecule(self)
 
_getStructureChainIterator(self)
 
chain(self)
 
_getStructureResidueIterator(self)
 
residue(self)
 
_getStructureRingIterator(self)
 
ring(self)
 
_getStructureProperty(self)
Redefine the get structure property as read-only
 
write(self, filename, format=None)
Write the structure to a file, overwriting any previous content.
 
append(self, filename, format=None)
Append the structure to the file.
 
putToM2ioFile(self, filehandle)
Used by the Maestro writer - put a single structure to the (already open) filehandle
 
closeBlockIfNecessary(self, filehandle)
Used by the Maestro writer to leave the header block if necessary.

Inherited from Structure: __copy__, __eq__, __getstate__, __int__, __ne__, __repr__, __setstate__, addAtom, addAtoms, addBond, addBonds, adjust, applyStyle, areBound, copy, deleteAtoms, deleteBond, extend, extract, findResidue, find_rings, getBond, getChainAtoms, getMoleculeAtoms, getMovingAtoms, getResidueAtoms, getXYZ, inRing, isEquivalent, measure, merge, retype, setXYZ, update, writeToString

Static Methods [hide private]

Inherited from Structure: read

Class Variables [hide private]
  _doc = ...
  property = property(_getStructureProperty, Structure._setStruc...

Inherited from Structure: atom_total, bond, formal_charge, manage_handle, manual_update, mol_total, title, total_weight

Inherited from Structure (private): _proxy

Method Details [hide private]

__init__(self, ct, txt)
(Constructor)

 

Initialize the TextualStructure object. The Structure handle will usually have no atoms but will have an unrequested data handle associated with it which can be used to access the Structure-level properties. 'txt' should be the full textual representation of the f_m_ct block as read from the Maestro format file.

Overrides: Structure.__init__

atom(self)

 
Overrides: atom

molecule(self)

 
Overrides: molecule

chain(self)

 
Overrides: chain

_getStructureResidueIterator(self)

 
Overrides: Structure._getStructureResidueIterator

residue(self)

 
Overrides: residue

ring(self)

 
Overrides: ring

_getStructureProperty(self)

 

Redefine the get structure property as read-only

Overrides: Structure._getStructureProperty

write(self, filename, format=None)

 

Write the structure to a file, overwriting any previous content. File will only be written to Maestro format.

Overrides: Structure.write

append(self, filename, format=None)

 

Append the structure to the file. File will only be written to Maestro format.

Parameters:
  • format - By default, the file format is determined from the filename suffix, but this can be specified explicitly. Supported option values are one of the PDB, MOL2, SD, MAESTRO, SMILES, SMILESCSV module-level constants.
Overrides: Structure.append

putToM2ioFile(self, filehandle)

 

Used by the Maestro writer - put a single structure to the (already open) filehandle

Overrides: Structure.putToM2ioFile

closeBlockIfNecessary(self, filehandle)

 

Used by the Maestro writer to leave the header block if necessary. For Structure objects this is not needed so it only returns

Overrides: Structure.closeBlockIfNecessary

Class Variable Details [hide private]

_doc

Value:
"""
    Dictionary-like container of structure properties. Keys are string\
s of 
    the form C{type_family_name} as described in the L{PropertyName}
    documentation.

    @note: Unlike the L{Structure.property} dictionary, this dictionar\
y is
...

property

Value:
property(_getStructureProperty, Structure._setStructureProperty, doc= \
_doc)