### Navigation

- index
- modules |
- next |
- previous |
- MDAnalysis 0.7.7 documentation »
- 5. Coordinates modules »

# 5.15. `pdb.extensions` – Extensions to `Bio.PDB`

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.15.1. Module content

class `MDAnalysis.coordinates.pdb.extensions.``SloppyStructureBuilder`(verbose=False)

  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)

  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

`MDAnalysis.coordinates.pdb.extensions.``get_structure`(pdbfile, pdbid='system')

  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)

  Write Bio.PDB molecule structure to filename.

  Arguments : | structure Bio.PDB structure instance filename pdb file selection Bio.PDB.Selection

### Navigation

- index
- modules |
- next |
- previous |
- MDAnalysis 0.7.7 documentation »
- 5. Coordinates modules »