Project

MMCIF

Year
2026
Stack
structural biology / rust / python
>>> import mmcif_io
>>> st = mmcif_io.read("12e8.cif")
>>> st.to_label("H", 100, "A")
('B', 105)
AUTHOR TO LABEL NUMBERING

Correctness-first mmCIF, BinaryCIF, and PDB reading for Rust and Python, with typed numbering.

mmcif reads and writes mmCIF, BinaryCIF, and PDB files, and keeps a residue’s author numbering and label numbering as separate types, so the two can’t be mixed up. It installs with pip install mmcif-io, cargo add mmcif-model, or cargo install mmcif-cli.

Every push is checked against gemmi on 313 PDB entries, and a weekly run covers 3,105, of which 3,091 agree with gemmi exactly and the other 14 are explained. Writing a parsed document and parsing it again gives the same document for every entry in the corpus, and the tokenizer, BinaryCIF decoder, PDB reader, and structure building are fuzzed in CI.

It also checks BoltzGen design specifications against a structure and lowers them to BoltzGen or RFdiffusion3 inputs. pixelfold reads its structures through it.

Personal thoughts

The initial idea for this project was quite different from what it is now, but I recognised that there was a lack of typed mmCIF readers in Rust, and thought it was a good opportunity to build one. As a computational biologist, I think this is a good project to work on as I learn more about the mmCIF format and the PDB. I plan to add more features in future, such as a PDBx/mmCIF validator.