21 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

#21 in Science

Download history 1198/week @ 2024-11-18 1453/week @ 2024-11-25 1085/week @ 2024-12-02 1631/week @ 2024-12-09 755/week @ 2024-12-16 115/week @ 2024-12-23 278/week @ 2024-12-30 602/week @ 2025-01-06 448/week @ 2025-01-13 408/week @ 2025-01-20 1306/week @ 2025-01-27 339/week @ 2025-02-03 802/week @ 2025-02-10 1193/week @ 2025-02-17 256/week @ 2025-02-24 121/week @ 2025-03-03

2,395 downloads per month
Used in 3 crates (2 directly)

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