4 releases

0.0.4 Jun 30, 2020
0.0.3 Jun 30, 2020
0.0.2 Jun 28, 2020
0.0.1 Jun 23, 2020

#2139 in Parser implementations

MIT license

59KB
985 lines

ENDF format

CI Crate Doc License

Rust library providing utilities for dealing with ENDF-6 format files.

ENDF-6 format specification is available at: https://www.nndc.bnl.gov/csewg/docs/endf-manual.pdf

Alpha version: endf_format crate is currently at alpha development phase (version 0.0.z).

Usage

Append endf_format dependency to your Cargo.toml

[dependencies]
endf_format="^0.0"

Examples

Parsing primitives

Parse ENDF-6 format integers:

let x = endf_format::integer::parse("-1234567890");
assert_eq!(-1_234_567_890_i64, x.unwrap())

Parse ENDF-6 format reals:

let x = endf_format::real::parse("+1.234567-1");
let diff = (1.234_567e-1_f64 - x).abs();
assert!(diff < 1e-10);

Library/SubLibrary information

let lib = endf_format::library::Library::from_nlib(0).unwrap();
println!("{}", lib);
let sublib = endf_format::sublibrary::SubLibrary::from_nsub(10).unwrap();
println!("{}", sublib);

Questions, Issues, Contributing

For questions and issues, open an issue here.

Contributions and Pull Requests (PR) are welcome.

License

MIT License

Dependencies

~2–3MB
~53K SLoC