Package: pidibble
Pidibble - a complete PDB parserPidibble is a Python package for parsing standard Protein Data Bank (PDB) files.  It conforms to themost recent standard(v.3.3 Atomic Coordinate Entry Format, ca. 2011).Unlike parsers like that found in packages likeBioPython,pidibbleprovides meaningfully parsed objects fromallstandard PDB record types, not just ATOMs and CONECTs.Once installed, the user has access to thePDBParserclass in thepidibble.pdbparsermodule.Example interactive usage>>> from pidibble.pdbparse import PDBParser
>>> p=PDBParser(PDBcode='4zmj').parse()
>>> print (p.parsed['HEADER'].classification)
VIRAL PROTEIN
>>> print (p.parsed['HEADER'].depDate)
04-MAY-15
>>> print (p.parsed['HEADER'].idCode)
4ZMJ
>>> keys=list(sorted(list(p.parsed.keys())))
>>> print(keys)
['ANISOU', 'ATOM', 'AUTHOR', 'CISPEP', 'COMPND', 'CONECT', 'CRYST1', 'DBREF', 'END', 'EXPDTA', 'FORMUL', 'HEADER', 'HELIX', 'HET', 'HETATM', 'HETNAM', 'JRNL.AUTH', 'JRNL.DOI', 'JRNL.PMID', 'JRNL.REF', 'JRNL.REFN', 'JRNL.TITL', 'KEYWDS', 'LINK', 'MASTER', 'ORIGX1', 'ORIGX2', 'ORIGX3', 'REMARK.100', 'REMARK.2', 'REMARK.200', 'REMARK.280', 'REMARK.290', 'REMARK.290.CRYSTSYMMTRANS', 'REMARK.3', 'REMARK.300', 'REMARK.350', 'REMARK.350.BIOMOLECULE.1', 'REMARK.4', 'REMARK.465', 'REMARK.500', 'REVDAT', 'SCALE1', 'SCALE2', 'SCALE3', 'SEQADV', 'SEQRES', 'SHEET', 'SOURCE', 'SSBOND', 'TER', 'TITLE']
>>> header=p.parsed['HEADER']
>>> print(header.pstr())
HEADER
      classification: VIRAL PROTEIN
             depDate: 04-MAY-15
              idCode: 4ZMJ
>>> atoms=p.parsed['ATOM']
>>> len(atoms)
4518
>>> print(atoms[0].pstr())
ATOM
              serial: 1
                name: N
              altLoc: 
             residue: resName: LEU; chainID: G; seqNum: 34; iCode: 
                   x: -0.092
                   y: 99.33
                   z: 57.967
           occupancy: 1.0
          tempFactor: 137.71
             element: N
              charge:Example downloading from AlphaFold>>> from pidibble.pdbparse import PDBParser
>>> p=PDBParser(alphafold='O46077').parse()
>>> p.parsed['TITLE'].title
'ALPHAFOLD MONOMER V2.0 PREDICTION FOR ODORANT RECEPTOR 2A (O46077)'
>>> print(p.parsed['ATOM'][0].pstr())
ATOM
              serial: 1
                name: N
              altLoc: 
             residue: resName: MET; chainID: A; seqNum: 1; iCode: 
                   x: -0.553
                   y: 26.513
                   z: 23.174
           occupancy: 1.0
          tempFactor: 39.74
             element: N
              charge:Release History1.1.2Added ability to retrieve pdbs from AlphaFold database1.1.1version detection1.0.9.1added limited functionality to parse mmCIF files, in particular to generate any
ATOM, HETATM, SSBOND, LINK, SEQADV, REMARK 350, and REMARK 465 records1.0.8bug fix: handle variations in how symmetry operation matrices are represented1.0.7.7cleaned up logging1.0.7.6bug fix: leading whitespace in resname field of Residue10 record sometimes ignored1.0.7.5support for four-letter residue names1.0.7.4added logging functionality1.0.7.3improved parsing of BIOMT transforms1.0.7.2added documentation stub at readthedocs1.0.7.1support for split BIOMT tables and REMARKS 280, 375, 650, and 7001.0.7pretty-print enabled1.0Initial version