Bio.PDB.MMCIFParser module

mmCIF parsers.

class Bio.PDB.MMCIFParser.MMCIFParser(structure_builder=None, QUIET=False)

Bases: object

Parse a mmCIF file and return a Structure object.

__init__(self, structure_builder=None, QUIET=False)

Create a PDBParser object.

The mmCIF parser calls a number of standard methods in an aggregated StructureBuilder object. Normally this object is instanciated by the MMCIParser object itself, but if the user provides his/her own StructureBuilder object, the latter is used instead.

Arguments:
  • 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 mmCIF file!

get_structure(self, structure_id, filename)

Return the structure.

Arguments:
  • structure_id - string, the id that will be used for the structure

  • filename - name of mmCIF file, OR an open text mode file handle

class Bio.PDB.MMCIFParser.FastMMCIFParser(structure_builder=None, QUIET=False)

Bases: object

Parse an MMCIF file and return a Structure object.

__init__(self, structure_builder=None, QUIET=False)

Create a FastMMCIFParser object.

The mmCIF parser calls a number of standard methods in an aggregated StructureBuilder object. Normally this object is instanciated by the parser object itself, but if the user provides his/her own StructureBuilder object, the latter is used instead.

The main difference between this class and the regular MMCIFParser is that only ‘ATOM’ and ‘HETATM’ lines are parsed here. Use if you are interested only in coordinate information.

Arguments:
  • 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 mmCIF file!

get_structure(self, structure_id, filename)

Return the structure.

Arguments:
  • structure_id - string, the id that will be used for the structure

  • filename - name of the mmCIF file OR an open filehandle