.. # split by hand

.. include:: ../substitutions

.. oe:namespace:: OEBio

.. meta::
   :keywords: OEPlaceHydrogens

..  _OEBio_OEPlaceHydrogens:

.. oe:function:: OEPlaceHydrogens

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

      .. oe:api::

         bool OEPlaceHydrogens(OEChem::OEMolBase& mol,
                               const OEPlaceHydrogensOptions& opts = OEPlaceHydrogensOptions())
         bool OEPlaceHydrogens(OEChem::OEMolBase& mol,
                               OEPlaceHydrogensDetails& details,
                               const OEPlaceHydrogensOptions& opts = OEPlaceHydrogensOptions())

   .. oe:language:: python

      .. oe:api:: python

         OEPlaceHydrogens(mol: Union[OEGraphMol,OEMol,OEQMol],
                          opts: OEPlaceHydrogensOptions = OEPlaceHydrogensOptions()) -> bool
         OEPlaceHydrogens(mol: Union[OEGraphMol,OEMol,OEQMol],
                          details: OEPlaceHydrogensDetails,
                          opts: OEPlaceHydrogensOptions = OEPlaceHydrogensOptions()) -> bool

   Function to modify the input molecule, adding explicit hydrogens
   oriented so as to make hydrogen bonds and, if required,
   "flipping" certain functional groups (e.g. imidazoles and terminal amides)
   that are occasionally misoriented in crystal structures.

   If a :oe:cls:`details<OEBio::OEPlaceHydrogensDetails>` object is passed in,
   it will be updated with information that describes the results.

   **mol**
      The molecule to add hydrogens to. Must have 3D coordinates assigned.

   .. warning::

      Just like :oe:func:`OEChem::OEAddExplicitHydrogens`, this function
      can add hydrogens at the end of the input ``mol``.
      If you require your molecule to be in *PDB order*, you may need to call
      :oe:func:`OEChem::OEPDBOrderAtoms` afterwards.

   .. seealso::

      * :ref:`section_place_hydrogens` section
      * :ref:`OEPlaceHydrogensOptions <OEBio_OEPlaceHydrogensOptions>` class
      * :ref:`OEPlaceHydrogensDetails <OEBio_OEPlaceHydrogensDetails>` class
