endf_format

Crates.ioendf_format
lib.rsendf_format
version0.0.4
sourcesrc
created_at2020-06-23 09:20:50.323046
updated_at2020-06-30 20:13:33.442954
descriptionENDF-6 Format Rust Library
homepagehttps://github.com/logansquirel/endf_format
repositoryhttps://github.com/logansquirel/endf_format
max_upload_size
id257113
size61,480
logan (logansquirel)

documentation

https://docs.rs/endf_format

README

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

Commit count: 0

cargo fmt