5.20. Extensions to Bio.PDBpdb.extensions

Author:Oliver Beckstein
Year:2009
License:Biopython

Extension to Bio.PDB to handle large pdb files.

Partly published on http://biopython.org/wiki/Reading_large_PDB_files and more code at http://github.com/orbeckst/GromacsWrapper/tree/master/edPDB/

5.20.1. Classes

class MDAnalysis.coordinates.pdb.extensions.SloppyStructureBuilder(verbose=False)[source]

Cope with resSeq < 10,000 limitation by just incrementing internally.

Solves the follwing problem with Bio.PDB.StructureBuilder.StructureBuilder:

Q: What’s wrong here??
Some atoms or residues will be missing in the data structure. WARNING: Residue (‘ ‘, 8954, ‘ ‘) redefined at line 74803. PDBConstructionException: Blank altlocs in duplicate residue SOL (‘ ‘, 8954, ‘ ‘) at line 74803.

A: resSeq only goes to 9999 –> goes back to 0 (PDB format is not really good here)

Warning

H and W records are probably not handled yet (don’t have examples to test)

class MDAnalysis.coordinates.pdb.extensions.SloppyPDBIO(use_model_flag=0)[source]

PDBIO class that can deal with large pdb files as used in MD simulations.

  • resSeq simply wrap and are printed modulo 10,000.
  • atom numbers wrap at 99,999 and are printed modulo 100,000

@param use_model_flag: if 1, force use of the MODEL record in output. @type use_model_flag: int

5.20.2. Functions

MDAnalysis.coordinates.pdb.extensions.get_structure(pdbfile, pdbid='system')[source]

Read the pdbfilename and return a Bio.PDB structure.

This function ignores duplicate atom numbers and resids from the file and simply increments them.

Note

The call signature is reversed compared to the one of Bio.PDB.PDBParser.get_structure().

MDAnalysis.coordinates.pdb.extensions.write_pdb(structure, filename, **kwargs)[source]

Write Bio.PDB molecule structure to filename.

Arguments:
structure

Bio.PDB structure instance

filename

pdb file

selection

Bio.PDB.Selection