5 releases

0.2.0 Apr 30, 2020
0.1.3 Apr 25, 2020
0.1.2 Apr 24, 2020
0.1.1 Apr 24, 2020
0.1.0 Apr 23, 2020

#2146 in Parser implementations

21 downloads per month

MIT/Apache

1.5MB
402 lines

UCSF NMR file format parser

Crates.io version docs.rs docs

This project provides a parser for the UCSF NMR file format written in Rust. It explicitly supports 2D/3D/4D measurements, but should in theory support any number of dimensions.

The implemenation follows the description of the format outlined at https://www.cgl.ucsf.edu/home/sparky/manual/files.html#UCSFFormat.

Installation

Via cargo-edit:

cargo add ucsf_nmr

Usage examples

The example under ./examples/tile_plots.rs shows how to load a spectrum, iterate over all the data points in it and draw a simple greyscale image from it with the help of plotters:

Image of NMR spectrum

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies