OEGetAverageWeightΒΆ

double OEGetAverageWeight(unsigned int elemno)

Returns the average atomic weight of an element, based upon the naturally occurring abundances of its isotopes. To return the ‘monoisotopic’ weight for a particular element use the OEGetIsotopicWeight function like the following.

   unsigned int elemno = OEElemNo::O;
   double weight = OEGetIsotopicWeight(elemno,OEGetDefaultMass(elemno));
   cout << OEGetAtomicSymbol(elemno) << ' ' << weight << endl;