exact molecular mass and average molecular mass
A new feature mentioned in https://github.com/rapodaca/chemcore/issues/5#issuecomment-859951452
Looking into the atom representation, https://github.com/rapodaca/chemcore/blob/06732d97690eba82049e05246a431fd6699bc6eb/src/molecule/atom.rs#L5
The optional element makes this inappropriate:
fn molecular_mass_average(mol: &impl Molecule) -> Da;
leaving this as a sensible option:
fn molecular_mass_average(mol: &impl Molecule) -> Option<Da>;
Is element: None meant to indicate a SMARTS wildcard?
element: None could be used for systems (like SMILES) that have the notion of optional elements. It could also be used for cases, aside from specific serialization formats, in which the element is unknown. This does mean than mass calculators would need to check for a missing element, but that's just the type system enforcing the problem's constraints.