Bio.PDB.PDBParser module¶
Parser for PDB files.
- class Bio.PDB.PDBParser.PDBParser(PERMISSIVE=True, get_header=False, structure_builder=None, QUIET=False, is_pqr=False)¶
Bases:
object
Parse a PDB file and return a Structure object.
- __init__(self, PERMISSIVE=True, get_header=False, structure_builder=None, QUIET=False, is_pqr=False)¶
Create a PDBParser object.
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/her own StructureBuilder object, the latter is used instead.
- Arguments:
PERMISSIVE - Evaluated as a Boolean. If false, exceptions in constructing the SMCRA data structure are fatal. If true (DEFAULT), the exceptions are caught, but some residues or atoms will be missing. THESE EXCEPTIONS ARE DUE TO PROBLEMS IN THE PDB FILE!.
get_header - unused argument kept for historical compatibilty.
structure_builder - an optional user implemented StructureBuilder class.
QUIET - Evaluated as a Boolean. If true, warnings issued in constructing the SMCRA data will be suppressed. If false (DEFAULT), they will be shown. These warnings might be indicative of problems in the PDB file!
is_pqr - Evaluated as a Boolean. Specifies the type of file to be parsed. If false (DEFAULT) a .pdb file format is assumed. Set it to true if you want to parse a .pqr file instead.
- get_structure(self, id, file)¶
Return the structure.
- Arguments:
id - string, the id that will be used for the structure
file - name of the PDB file OR an open filehandle
- get_header(self)¶
Return the header.
- get_trailer(self)¶
Return the trailer.