.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetHydrogenCounts

.. oe:function:: OEGetHydrogenCounts

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

      .. oe:api::

         bool OEGetHydrogenCounts(OEHydrogenCounter& counter,
                                  const OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEGetHydrogenCounts(counter: OEHydrogenCounter,
                             mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   Populates an :ref:`OEHydrogenCounter <OEChem_OEHydrogenCounter>` object containing the explicit and implicit count of hydrogens in the molecule.
   Returns true if molecule is valid and counter is populated, false otherwise.  

.. seealso::

   * :ref:`OEHydrogenCounter <OEChem_OEHydrogenCounter>`

