| Crates.io | chelate |
| lib.rs | chelate |
| version | 0.2.0 |
| created_at | 2025-04-14 09:05:59.30711+00 |
| updated_at | 2025-04-15 14:35:33.152087+00 |
| description | Parser for a bunch of molecular file formats |
| homepage | |
| repository | https://github.com/JensKrumsieck/chelate |
| max_upload_size | |
| id | 1632562 |
| size | 23,319,680 |
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
(Vec<Atom>, Vec<Bond>)use chelate;
let (atoms, bonds) = chelate::from_file("data/147288.cif").unwrap();
assert_eq!(atoms.len(), 206);
assert_eq!(bonds.len(), 230);
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 = chelate::molecule_from_file("data/oriluy.pdb").unwrap();
assert_eq!(mol.node_count(), 130);
assert_eq!(mol.edge_count(), 151);
Run the following Cargo command in your project directory:
cargo add chelate
Or add the following line to your Cargo.toml:
chelate = "0.2.0"