Parse a PDB file and return a Structure object.
Methods
|
|
__init__
_get_header
_handle_PDB_exception
_parse
_parse_coordinates
get_header
get_structure
get_trailer
|
|
__init__
|
__init__ (
self,
PERMISSIVE=0,
structure_builder=None,
)
The PDB parser call a number of standard methods in an aggregated
StructureBuilder object. Normally this object is instanciated by the
PDBParser object itself, but if the user provides his own StructureBuilder
object, the latter is used instead. Arguments:
o PERMISSIVE - int, if this is 0 (default) exceptions in constructing the
SMCRA data structure are fatal. If 1, the exceptions are caught, but some
residues or atoms will be missing.
o structure_builder - an optional user implemented StructureBuilder class.
|
|
_get_header
|
_get_header ( self, header_coords_trailer )
Get the header of the PDB file, return the rest.
|
|
_handle_PDB_exception
|
_handle_PDB_exception (
self,
message,
line_counter,
)
This method catches an exception that occurs in the StructureBuilder
object (if PERMISSIVE==1), or raises it again, this time adding the
PDB line number to the error message.
|
|
_parse
|
_parse ( self, header_coords_trailer )
Parse the PDB file.
|
|
_parse_coordinates
|
_parse_coordinates ( self, coords_trailer )
Parse the atomic data in the PDB file.
|
|
get_header
|
get_header ( self )
Return the header.
|
|
get_structure
|
get_structure (
self,
id,
filename,
)
Return the structure.
Arguments:
o id - string, the id that will be used for the structure
o filename - name of the PDB file
|
|
get_trailer
|
get_trailer ( self )
Return the trailer.
|
|