.. include:: ../substitutions

.. oe:namespace:: OEMolProp

.. meta::
   :keywords: OEGetHBondDonorCount

.. _OEMolProp_OEGetHBondDonorCount:

.. oe:function:: OEGetHBondDonorCount

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

      .. oe:api::

         unsigned int OEGetHBondDonorCount(const OEChem::OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEGetHBondDonorCount(mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

   Returns the number of hydrogen-bond donors in a molecule based on
   the definition in the work of Mills and Dean ([Mills-Dean-1996]_)
   and also in the book by Jeffrey ([Jeffrey-1997]_). It is defined
   to be the number of hydrogen atoms on nitrogen, oxygen, or sulfur atoms.


   .. seealso::

      * :oe:func:`OEMolProp::OEGetHBondAcceptorCount` function
      * :oe:func:`OEMolProp::OEGetLipinskiDonorCount` function
      * :ref:`molprops_lipinski` section
      * :ref:`filter_files_hbond_donor` subsection describing filter files

   **Example**

   The :oe:func:`OEMolProp::OEGetHBondDonorCount` function returns ``2`` for the molecule below.

   .. figure:: ../../../common/images/molprop/HBLDonor.*
      :width:  300pt
      :align:  center



