Bio.PDB.MMCIFParser module

mmCIF parsers.

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

Bases: object

Parse a mmCIF file and return a Structure object.

__init__(structure_builder=None, auth_chains=True, auth_residues=True, QUIET=False)

Create a PDBParser object.

The mmCIF parser calls a number of standard methods in an aggregated StructureBuilder object. Normally this object is instantiated 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.

  • auth_chains - True by default. If true, use the author chain IDs. If false, use the re-assigned mmCIF chain IDs.

  • auth_residues - True by default. If true, use the author residue numbering. If false, use the mmCIF “label” residue numbering, which has no insertion codes, and strictly increments residue numbers. NOTE: Non-polymers such as water don’t have a “label” residue number, and will be skipped.

  • 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(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, auth_chains=True, auth_residues=True, QUIET=False)

Bases: object

Parse an MMCIF file and return a Structure object.

__init__(structure_builder=None, auth_chains=True, auth_residues=True, QUIET=False)

Create a FastMMCIFParser object.

The mmCIF parser calls a number of standard methods in an aggregated StructureBuilder object. Normally this object is instantiated 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.

  • auth_chains - True by default. If true, use the author chain IDs. If false, use the re-assigned mmCIF chain IDs.

  • auth_residues - True by default. If true, use the author residue numbering. If false, use the mmCIF “label” residue numbering, which has no insertion codes, and strictly increments residue numbers. NOTE: Non-polymers such as water don’t have a “label” residue number, and will be skipped.

  • 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(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