biopython v1.71.0 Bio.PDB.PDBParser.PDBParser

Parse a PDB file and return a Structure object.

Link to this section Summary

Functions

Create a PDBParser object

Get the header of the PDB file, return the rest (PRIVATE)

Handle exception (PRIVATE)

Parse the PDB file (PRIVATE)

Parse the atomic data in the PDB file (PRIVATE)

Return the header

Return the structure

Return the trailer

Link to this section Functions

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!

Get the header of the PDB file, return the rest (PRIVATE).

Link to this function _handle_PDB_exception()

Handle exception (PRIVATE).

This method catches an exception that occurs in the StructureBuilder object (if PERMISSIVE), or raises it again, this time adding the PDB line number to the error message.

Parse the PDB file (PRIVATE).

Link to this function _parse_coordinates()

Parse the atomic data in the PDB file (PRIVATE).

Return the header.

Link to this function get_structure()

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

Return the trailer.