.. include:: ../substitutions

.. oe:namespace:: OEMolProp

.. meta::
   :keywords: OEGetLipinskiDonorCount

.. _OEMolProp_OEGetLipinskiDonorCount:

.. oe:function:: OEGetLipinskiDonorCount

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

      .. oe:api::

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

   .. oe:language:: python

      .. oe:api:: python

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

   Returns the number of donors in a molecule based on the definition
   from the work of Lipinski ([Lipinski-1997]_). It is defined
   to be the number of nitrogens and oxygens with at least one hydrogen attached.

   .. seealso::

      * :oe:func:`OEMolProp::OEGetLipinskiAcceptorCount` function
      * :oe:func:`OEMolProp::OEGetHBondDonorCount` function
      * :ref:`molprops_lipinski` section
      * :ref:`filter_files_lipinski_donor` subsection describing filter files

   **Example**

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

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