This is a Rust library helping to parse, edit and save crystallographic PDB files. It can read most crystallographic PDB lines, some are missing which we are hopeful will be added over time.
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 the final result of 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!
PDB 3.30 as published by wwPDB in 2008.
No mmCIF support, but that would be cool to include in the future.
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 where 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 (https://www.nature.com/articles/d41586-020-03382-2) (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.
API additions
* Added distance_wrapping
and overlaps_wrapping
functions to Atom which wrap around the unit cell to find the shortest distance
API changes + additions
* Added support for parsing and validating DBREF
/SEQADV
/SEQRES
/MODRES
* Added saving of MODRES
records, the other primary structure sections will follow soon
* Added differential saving, which changes the output based on the StrictnessLevel
provided
* Redefined overlaps
function on Atoms, the calculation was faulty before
* Added distance
function between two Atoms
* Removed renumber on save
API changes
* Exported save_raw
was created in v0.2.0 but not accessible
* Added ENDMDL
records after model definitions while saving making saved ensemble files valid in other software
* Extended warnings for validation of ensemble files, it will now generate a LooseWarning
if HETATM
s do not correspond
* Changed the implementation of the .remove_*_by
functions to be 75% faster
API changes + additions
* Made add_child
methods for model/chain/residue public.
* Extended saving it now validates and renumbers the given PDB. It fails upon generation of validation errors, while the user can specify the error levels to allow
* Added save_raw to save to a BufWriter. This function is called save_raw
.
* Extended parser error generation and handling. It now fails upon generation of errors, while the user can specify the error levels to allow
* Added parser from BufReader. This function is called parse
and the function previously called parse
is renamed to open
.
* Rewrote pdb.total_*_count()
as the previous version was inaccurate
* Saved 21.4 MB in the published crate by ignoring certain files (thanks Byron!)
API additions
* Added .join()
on PDB.
* Added atomic data lookup (number & radius) on Atoms
* Added .overlaps()
function to Atom, which uses the atomic radius to determine if two atoms overlap
* Added support for the MASTER
PDB Record both while reading and saving
* Fixed the behaviour of .join()
on Model/Chain/Residue
Textual changes to documentation