OECalculateMolecularWeight

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.

isotopic

This parameter determines whether to use the OEGetIsotopicWeight function instead of OEGetAverageWeight. Atoms must have a specified (non-zero) isotopic mass, as returned by OEAtomBase.GetIsotope

See also