.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEHydrogenCounter, HydrogenCounter


.. _OEChem_OEHydrogenCounter:

.. oe:class:: OEHydrogenCounter

   .. oe:api::

      class OEHydrogenCounter

   The :ref:`OEHydrogenCounter <OEChem_OEHydrogenCounter>` class is a utility class used for counting the implicit
   and explicit hydrogens within a molecule. 
   
   .. oe:method:: Constructors
      
      .. oe:language:: c++ java csharp

         .. oe:api::

            OEHydrogenCounter(unsigned int explicitHCount = 0,
                              unsigned int implicitHCount = 0)

      .. oe:language:: python

         .. oe:api:: python

            OEHydrogenCounter(explicitHCount: int = 0, implicitHCount: int = 0) -> OEHydrogenCounter

      Constructs a counter with the specified explicit and implicit counts. 

   .. oe:method:: GetImplicitHCount 

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

         .. oe:api::

            unsigned int GetImplicitHCount()

      .. oe:language:: python

         .. oe:api:: python

            GetImplicitHCount() -> int

      Returns the implicit hydrogen count stored in the counter.
      
   .. oe:method:: GetExplicitHCount
   
      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int GetExplicitHCount()

      .. oe:language:: python

         .. oe:api:: python

            GetExplicitHCount() -> int

      Returns the explicit hydrogen count stored in the counter.
       
   .. seealso::

      * :oe:func:`OEChem::OEGetHydrogenCounts`

