double OECalculateMolecularWeight(const OEMolBase &mol, bool isotopic=false)

Calculates the molecular weight of the given molecule. By default, all atoms are assumed their average atomic weight, as returned by the OEGetAverageWeight function. If the ‘isotopic’ parameter is true, and atom of the molecule that has a specified (non-zero) isotopic mass, as returned by OEAtomBase.GetIsotope, instead uses the isotopic weight as returned by the OEGetIsotopicWeight function.

See also