endf_mat/lib.rs
1//! ENDF material data: element symbols, MAT numbers, and natural abundances.
2//!
3//! A standalone, zero-dependency crate providing lookup tables for nuclear data:
4//!
5//! - **Element data**: Symbols and names for Z=0 (neutron) through Z=118 (Oganesson)
6//! - **MAT numbers**: ENDF material identifiers for 535 ground-state isotopes
7//! - **Natural abundances**: IUPAC 2016 isotopic compositions for 289 isotopes
8//! - **ZA utilities**: ENDF ZA encoding/decoding (ZA = Z×1000 + A)
9//!
10//! All data is compiled into static arrays — no file I/O, no external dependencies.
11//!
12//! # Examples
13//!
14//! ```
15//! // Element lookup
16//! assert_eq!(endf_mat::element_symbol(92), Some("U"));
17//! assert_eq!(endf_mat::symbol_to_z("Fe"), Some(26));
18//!
19//! // MAT number lookup
20//! assert_eq!(endf_mat::mat_number(92, 235), Some(9228));
21//! assert_eq!(endf_mat::isotope_from_mat(9228), Some((92, 235)));
22//!
23//! // Natural abundances
24//! let u238 = endf_mat::natural_abundance(92, 238).unwrap();
25//! assert!((u238 - 0.992742).abs() < 1e-6);
26//!
27//! // ZA encoding
28//! assert_eq!(endf_mat::za(92, 238), 92238);
29//! assert_eq!(endf_mat::z_from_za(92238), 92);
30//! ```
31
32mod abundances;
33mod elements;
34mod mat;
35mod za;
36
37// Element data
38pub use elements::{element_name, element_symbol, symbol_to_z};
39
40// MAT numbers
41pub use mat::{has_endf_evaluation, isotope_from_mat, known_isotopes, mat_number};
42
43// Natural abundances
44pub use abundances::{natural_abundance, natural_isotopes};
45
46// ZA utilities
47pub use za::{a_from_za, z_from_za, za};