Crates.io | ame2020 |
lib.rs | ame2020 |
version | 0.1.1 |
source | src |
created_at | 2022-11-11 03:22:22.650415 |
updated_at | 2022-11-14 04:17:32.506659 |
description | A parsing library for the Atomic Mass Evaluation 2020 format |
homepage | |
repository | https://github.com/j-browne/ame2020-rs |
max_upload_size | |
id | 712639 |
size | 35,711 |
A parsing library for the Atomic Mass Evaluation 2020 format
The data is represented by Nuclide
, and the parsing is mostly done by Iter
.
The data can be collected into a type that implements FromIterator
, such as Vec
.
The format is documented in the preamble of the AME data file itself. This library parses data
formatted like the mass.mas20
file. The rounded version, and previous versions, such as
AME2016 are incompatible.
use ame2020::{Iter, Nuclide};
use std::{fs::File, io::BufReader};
let file = File::open("mass.mas20")?;
let file = BufReader::new(file);
let iter = Iter::new(file);
let data: Vec<Nuclide> = iter.collect::<Result<_, _>>()?;
serde
: Provide Serialize
and Deserialize
implementations for serde.arbitrary
: Provide Arbitrary
implementations for arbitrary, useful for fuzzing.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.