20 releases

0.10.40 Aug 29, 2023
0.10.4 May 17, 2023
0.10.3 Aug 27, 2022
0.10.2 Nov 30, 2021
0.4.0 Oct 30, 2015

#40 in Science

Download history 27/week @ 2023-06-09 575/week @ 2023-06-16 148/week @ 2023-06-23 290/week @ 2023-06-30 358/week @ 2023-07-07 246/week @ 2023-07-14 839/week @ 2023-07-21 160/week @ 2023-07-28 42/week @ 2023-08-04 469/week @ 2023-08-11 630/week @ 2023-08-18 454/week @ 2023-08-25 414/week @ 2023-09-01 176/week @ 2023-09-08 519/week @ 2023-09-15 105/week @ 2023-09-22

1,496 downloads per month

BSD-3-Clause

4MB
22K SLoC

C++ 18K SLoC // 0.1% comments Rust 3.5K SLoC // 0.0% comments Python 343 SLoC // 0.2% comments C 89 SLoC // 0.1% comments Shell 38 SLoC // 0.3% comments

chemfiles.rs

Test status codecov.io Documentation

Rust binding for the chemfiles library.

Documentation

Usage

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 !
}

Bug reports, feature requests

Please report any bug you find and any feature you may want as a Github issue.

Dependencies