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

Class PDBWriter

                 object --+    
                          |    
_ReaderWriterContextManager --+
                              |
                             PDBWriter

A class for writing PDB-formatted files. Only one structure can be written to a PDB file. While this class overs no speed increase over the Structure.write() method, it provides more options.

Instance Methods [hide private]
 
__init__(self, filename, reorder_by_sequence=False, first_occ=False)
Initialize needed mmlibs and open the file 'filename'.
 
write(self, ct)
Write the provided structure to the PDB file.
 
append(self, ct)
Alias to the write() method (for consistency with the other *Writer classes).
 
close(self)
Does nothing.

Inherited from _ReaderWriterContextManager: __enter__, __exit__

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, filename, reorder_by_sequence=False, first_occ=False)
(Constructor)

 

Initialize needed mmlibs and open the file 'filename'.

Note that the file will not be completely written until it is
explicitly closed or the object is garbage collected.

@type filename: str
@param filename:
    The filename to write to.

@type reorder_by_sequence: bool
@param reorder_by_sequence:
    Whether to re-order the residues by sequence before writing the
    PDB file.

@type first_occ: bool
@param first_occ:
    If True and there are alternate occupancy sites, only the first
    occupancy site will be included in the output PDB file.  Otherwise,
    all occupancy sites will be included.

NOTE: Any existing file will be overwritten when the class instance
is created.

Overrides: object.__init__

close(self)

 

Does nothing. Added for consistency with other *Writer classes.