.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OESuppressHydrogens

.. oe:function:: OESuppressHydrogens

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

      .. oe:api::

         bool OESuppressHydrogens(OEMolBase& mol, bool retainPolar = false,
                                  bool retainStereo = false,
                                  bool retainIsotope = true)
         bool OESuppressHydrogens(OEAtomBase* atom, bool retainPolar = false,
                                  bool retainStereo = false,
                                  bool retainIsotope = true)

   .. oe:language:: python

      .. oe:api:: python

         OESuppressHydrogens(mol: Union[OEGraphMol,OEMol,OEQMol],
                             retainPolar: bool = False,
                             retainStereo: bool = False,
                             retainIsotope: bool = True) -> bool
         OESuppressHydrogens(atm: OEAtomBase, retainPolar: bool = False,
                             retainStereo: bool = False,
                             retainIsotope: bool = True) -> bool

   Transforms the explicit hydrogens in a molecule into implicit
   hydrogens on their parent heavy atom.  The overloaded function provides
   the same capability at a specific heavy atom.

   Any explicit hydrogen atoms,
   those with atomic number :oe:const:`OEChem::OEElemNo::H`, are deleted
   and any information associated with them, coordinates, isotopes,
   generic data etc... are lost.  In their place, the implicit hydrogen
   count field of the heavy atom to which they are bonded is
   appropriately incremented.

   retainPolar
     If ``true``, then hydrogens on polar atoms,
     *i.e.* those for which :oe:meth:`OEChem::OEAtomBase::IsPolarHydrogen`
     returns ``true``, are left unaffected.

   retainStereo
     If ``true``, then hydrogens required to specify stereo centers, *i.e.* those
     for which :oe:func:`OEChem::OEHasStereoHydrogens` return ``true``, are left
     unaffected.

   retainIsotope
     If ``true``, then specified isotopes of hydrogen (including deuterium
     ``[2H]``, tritium ``[3H]`` and protium ``[1H]``) will be treated
     as heavy atoms and retained.

   The functions return the value ``true`` if any hydrogens were deleted,
   and return ``false`` if the molecule was left unchanged.

   .. seealso::

      * :oe:func:`OEChem::OEAddExplicitHydrogens` function
      * :ref:`section_example_oechem_cliquealign` **OEChem TK** example program

