Chelate
Chelate is a simple parser for a bunch of molecular file formats.
| Format | MIME | Import | Export |
|---|---|---|---|
| IUCr CIF | chemical/x-cif |
✅ | ❌ |
| PDBx/mmCIF | chemical/x-mmcif |
✅ | ❌ |
| PDB | chemical/x-pdb |
✅ | 🏗️ |
| MOL | chemical/x-mdl-molfile |
✅ | 🏗️ |
| MOL2 (TRIPOS) | chemical/x-mol2 |
✅ | 🏗️ |
| XYZ | chemical/x-xyz |
✅ | 🏗️ |
✅ = implemented 🏗️ = planned ❌ = not available
Example
Simple Example returning (Vec<Atom>, Vec<Bond>)
use chelate;
let = from_file.unwrap;
assert_eq!;
assert_eq!;
Example using petgraph returning Graph<Atom, Edge, Undirected>
Formats that do not have bond information like xyz are able to generate Bond objects when petgraph feature is active (default).
use chelate;
//its a Molecule (type alias for Graph<Atom, Edge, Undirected>)
let mol = molecule_from_file.unwrap;
assert_eq!;
assert_eq!;
Installation
Run the following Cargo command in your project directory:
cargo add chelate
Or add the following line to your Cargo.toml:
= "0.2.0"