.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetAverageWeight

.. oe:function:: OEGetAverageWeight

   .. oe:language:: c++ java csharp

      .. oe:api::

         double OEGetAverageWeight(unsigned int elemno)

   .. oe:language:: python

      .. oe:api:: python

         OEGetAverageWeight(elemno: int) -> float

   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
   :oe:func:`OEChem::OEGetIsotopicWeight` function like the following.

   .. oe:source:: UsingPeriodicTableFunctions.cpp
      :language: c++
      :frag:     SNIPPET-PERIODIC-MONOISO-WEIGHT

   .. oe:source:: UsingPeriodicTableFunctions.py
      :language: python
      :frag:     SNIPPET-PERIODIC-MONOISO-WEIGHT

   .. oe:source:: UsingPeriodicTableFunctions.java
      :language: java
      :frag:     SNIPPET-PERIODIC-MONOISO-WEIGHT

   .. oe:source:: UsingPeriodicTableFunctions.cs
      :language: csharp
      :frag:     SNIPPET-PERIODIC-MONOISO-WEIGHT
