macro_rules! molecular_formula {
($($tail:tt)*) => { ... };
}Expand description
Easily define molecular formulas using the following syntax: <element> <num> or [<isotope> <element> <num>].
The spaces are required by the Rust compiler.
molecular_formula!(C 12 [13 C 1] H 24);ยงPanics
It panics if the defined molecular formula is not valid. A formula is not valid if not existing isotopes are used or if an element is used that does not have a defined molecular weight (does not have natural abundance).