Crates.io | chemfiles |
lib.rs | chemfiles |
version | 0.10.41 |
source | src |
created_at | 2015-10-30 15:02:19.839703 |
updated_at | 2024-02-15 10:40:12.384626 |
description | Modern library for chemistry trajectories reading and writing |
homepage | http://chemfiles.org/ |
repository | https://github.com/chemfiles/chemfiles.rs |
max_upload_size | |
id | 3336 |
size | 193,814 |
Rust binding for the chemfiles library.
Add this to your Cargo.toml
file:
[dependencies]
chemfiles = "0.10"
Here is a simple usage example. See the examples
folder for additional
examples.
use chemfiles::{Trajectory, Frame};
fn main() {
let mut trajectory = Trajectory::open("filename.xyz", 'r').unwrap();
let mut frame = Frame::new();
trajectory.read(&mut frame).unwrap();
println!("There are {} atoms in the frame", frame.size());
let positions = frame.positions();
// Do awesome things with the positions here !
}
Please report any bug you find and any feature you may want as a Github issue.