18 releases

0.10.41 Feb 15, 2024
0.10.40 Aug 29, 2023
0.10.4 May 17, 2023
0.10.3 Aug 27, 2022
0.4.0 Oct 30, 2015

#446 in Science

Download history 191/week @ 2024-06-18 317/week @ 2024-06-25 584/week @ 2024-07-02 439/week @ 2024-07-09 417/week @ 2024-07-16 420/week @ 2024-07-23 225/week @ 2024-07-30 34/week @ 2024-08-06 214/week @ 2024-08-13 121/week @ 2024-08-20 275/week @ 2024-08-27 446/week @ 2024-09-03 115/week @ 2024-09-10 614/week @ 2024-09-17 669/week @ 2024-09-24 439/week @ 2024-10-01

1,932 downloads per month
Used in 2 crates (via chemfiles)

BSD-3-Clause

3.5MB
19K SLoC

C++ 18K SLoC // 0.1% comments Rust 336 SLoC // 0.0% comments Python 241 SLoC // 0.2% comments C 90 SLoC // 0.1% comments Shell 27 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