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)

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 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.


If true, then hydrogens on polar atoms, i.e. those for which OEAtomBase.IsPolarHydrogen returns true, are left unaffected.


If true, then hydrogens required to specify stereo centers, i.e. those for which OEHasStereoHydrogens return true, are left unaffected.


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.

See also