…e here is that the formula manipulator handles isotope assignment of the atoms in the molecule. Isotope assignment (or lack therof) was causing mass calculations to fail
So it appears the issue is not related to a CDK bug as I first thought (see . https://github.com/cdk/cdk/pull/505). Instead, it seems the Isotope information is incorrectly set. Based on the JavaDoc, see here, we can use the IAtomContainer->IMolecularFormula-> MolecularFormulaManipulator.getTotalExactMass where the isotope information is handled by the MolecularFormulaManipulator class.
…e here is that the formula manipulator handles isotope assignment of the atoms in the molecule. Isotope assignment (or lack therof) was causing mass calculations to fail
So it appears the issue is not related to a CDK bug as I first thought (see . https://github.com/cdk/cdk/pull/505). Instead, it seems the Isotope information is incorrectly set. Based on the JavaDoc, see here, we can use the IAtomContainer->IMolecularFormula-> MolecularFormulaManipulator.getTotalExactMass where the isotope information is handled by the MolecularFormulaManipulator class.