| Home | Trees | Indices | Help |
|
|---|
|
|
PDB file with access at the record level
The low-level file access is handled by the module Scientific.IO.TextFile, therefore compressed files and URLs (for reading) can be used as well.
|
|||
| __del__(self) | |||
| __init__(self, filename, mode='r', subformat=None) | |||
|
close(self) Close the file. |
|||
|
nextChain(self,
chain_id=None,
segment_id='') Signal the beginning of a new chain. |
|||
|
nextResidue(self,
name,
number=None,
terminus=None) Signal the beginning of a new residue, starting with the next call to writeAtom. |
|||
tuple
|
readLine(self) Return the contents of the next non-blank line (= record) The return value is a tuple whose first element (a string) contains the record type. |
||
|
terminateChain(self) Signal the end of a chain. |
|||
|
writeAtom(self,
name,
position,
occupancy=0.0,
temperature_factor=0.0,
element='') Write an ATOM or HETATM record using the information supplied. |
|||
|
writeComment(self,
text) Write text into one or several comment lines. |
|||
|
writeLine(self,
type,
data) Write a line using record type and data dictionary in the same format as returned by readLine(). |
|||
|
|||
_chain_ids = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|||
|
|||
|
|
Close the file. This method must be called for write mode because otherwise the file will be incomplete. |
Signal the beginning of a new chain.
|
Signal the beginning of a new residue, starting with the next call to writeAtom.
|
Return the contents of the next non-blank line (= record) The return value is a tuple whose first element (a string) contains the record type. For supported record types (HEADER, ATOM, HETATM, ANISOU, TERM, MODEL, CONECT), the items from the remaining fields are put into a dictionary which is returned as the second tuple element. Most dictionary elements are strings or numbers; atom positions are returned as a vector, and anisotropic temperature factors are returned as a rank-2 tensor, already multiplied by 1.e-4. White space is stripped from all strings except for atom names, whose correct interpretation can depend on an initial space. For unsupported record types, the second tuple element is a string containing the remaining part of the record.
|
Signal the end of a chain. |
Write an ATOM or HETATM record using the information supplied. The residue and chain information is taken from the last calls to the methods nextResidue and nextChain.
|
Write text into one or several comment lines. Each line of the text is prefixed with 'REMARK' and written to the file.
|
Write a line using record type and data dictionary in the same format as returned by readLine(). Default values are provided for non-essential information, so the data dictionary need not contain all entries.
|
|
|||
_chain_ids
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Fri Oct 6 14:45:44 2006 | http://epydoc.sourceforge.net |