Pidibble
a complete parser for PDB and PDBx/mmCIF files
Pidibble is a Python package for parsing Protein Data Bank structures in both the legacy PDB format (v.3.3 Atomic Coordinate Entry Format, ca. 2011) and the modern PDBx/mmCIF format that is now standard at the RCSB.
Unlike parsers like that found in packages like BioPython, pidibble provides meaningfully parsed objects from all standard PDB record types, not just ATOMs and CONECTs.
Once installed, the user has access to the PDBParser class in the pidibble.pdbparse module. Full documentation is at pidibble.readthedocs.io.
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=sorted(p.parsed.keys())
>>> len(keys)
60
>>> keys[:8]
['ANISOU', 'ATOM', 'AUTHOR', 'CISPEP', 'COMPND', 'CONECT', 'CRYST1', 'DBREF']
>>> 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(source_db='alphafold', source_id='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:
Example reading a PDBx/mmCIF file
Many recent RCSB entries have no legacy PDB file at all. Pass input_format='mmCIF' and pidibble parses the mmCIF/PDBx file into the same record objects (using author numbering), so downstream code stays the same. This needs the optional mmCIF reader: pip install 'pidibble[mmcif]'.
>>> from pidibble.pdbparse import PDBParser
>>> p=PDBParser(source_db='rcsb', source_id='4tvp', input_format='mmCIF').parse()
>>> p.parsed['HEADER'].idCode
'4TVP'
>>> p.parsed['HEADER'].classification
'VIRAL PROTEIN/IMMUNE SYSTEM'
>>> len(p.parsed['ATOM'])
11344
See the mmCIF guide for the full coverage and the small, deliberate differences from the PDB parse.
Changelog
See CHANGELOG.md for the full release history.
Metadata
Release files for pidibble 1.12.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pidibble-1.12.1.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pidibble-1.12.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.3 MB
Release files / pidibble-1.12.1.tar.gz
| Download URL | pidibble-1.12.1.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d207bdb20e20e6f61f4248a84525b4cc5bbbad0e3a18ad40b537f6be72fe6fe0
|
|
BLAKE2b-256 checksum How to use checksums |
dede34915da6dcb601ebe2566619830135a1ec3b64eba61fce7955e52cceca2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / pidibble-1.12.1-py3-none-any.whl
| Download URL | pidibble-1.12.1-py3-none-any.whl |
|---|---|
| Size | 60.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3cc5bd79626195b8bc37f22de42edf0d34fd9b1595e59e53131f793ecaae142
|
|
BLAKE2b-256 checksum How to use checksums |
8250e2b8a2b145a3b2d4ed089f74771da637f3bf2dad54de702e14dea241c80b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log