#pdb #protein #bio #crystal #mmcif


A library to open/edit/save (crystallographic) Protein Data Bank (PDB) and mmCIF files

18 releases (5 breaking)

new 0.6.3 Apr 7, 2021
0.6.2 Mar 31, 2021
0.5.1 Mar 4, 2021
0.5.0 Feb 24, 2021
0.1.5 Jan 11, 2021

#136 in Parser implementations

Download history 77/week @ 2021-01-05 70/week @ 2021-01-12 21/week @ 2021-01-19 55/week @ 2021-01-26 16/week @ 2021-02-02 32/week @ 2021-02-09 74/week @ 2021-02-16 21/week @ 2021-02-23 22/week @ 2021-03-02 19/week @ 2021-03-09 34/week @ 2021-03-16 39/week @ 2021-03-23 70/week @ 2021-03-30 45/week @ 2021-04-06

185 downloads per month

MIT license

29K SLoC

Compile & Test Coverage Status


This is a Rust library helping to parse, edit and save crystallographic PDB/mmCIF files. It can read most atomic data from PDB/mmCIF files, some is missing but will be added over time. Its high level goal is to create a stable, efficient and easy to use interface to PDB/mmCIF files.


As this is a library in active development, feel free to share your thoughts, ideas, hopes, and criticisms. Every comment will be read and discussed so that this library is as useful as possible for all users. Of course we all like a civilised discussion so please follow the community guidelines, but over all please be a civilised human being.


MIT, just use it if you can use it. If you use it for something cool I would like to hear, but no obligations!


Just for fun, to play with fancy abstractions. But at the same time I think that using Rust in scientific computing would be really cool and this library would be needed if I were to be doing my internship in Rust. So by creating it I hope to extend the usability of Rust a little bit more. Since Nature published an article (technology feature) which laid out the benefits of using Rust and showed that Rust is used more and more, recently I am planning on working more with Rust in scientific projects. And I think that the best way to help Rust move forward (in the scientific community) is by creating more support for scientific projects in Rust.

Also because it is written in Rust it is much faster then anything written in Python even if there is a C/C++ backend. Based on some benchmarks (details are in benches/benchmark_results.csv) PDBTBX is as fast in opening and saving PDB files while being on average 240 times faster in 'editing' tasks (iterating over atoms/renumbering a pdb file/cloning a pdb file/transforming atoms/removing atoms) compared to CCTBX. As Rust is a compiled language build for speed this was to be expected but still the effect size is quite big. If anything taking 24 hours could be sped up 240 times it would only take 6 minutes.


Supported features

As the main goal of this library is to allow access to the atomical data many metadata features of both PDB and mmCIF are unsupported. For both file formats the most recent version (PDB v3.30 and mmcif v5.338) is used, but as both are quite stable file formats in the core atomical properties the exact version should not matter to end users.

supported features table

The features where support is planned are planned to be included in the 1.0 release. The features where support is envisioned are candidates to be included, but not necessarily in the 1.0 release. The features which are planned are thought to be unnecessary for atomic data computations on theses files. If any of these are really needed for your use case please raise an issue then we can discuss its inclusion. Also if you need a feature that is 'planned' or 'envisioned' feel free to raise an issue to guide development to spots where it can make a real life impact.

Latest update


  • Added Anisotropic temperature factor support for mmCIF files
  • Fixed an issue in the aniso matrix
  • Added a full_sort function on PDB
  • Fixed small bugs in the PDB saving logic

Also see changelog.

No runtime deps