.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEGetNearestResidue

.. oe:function:: OEGetNearestResidue

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

      .. oe:api::

         OENearestResidue OEGetNearestResidue(const OE2DActiveSiteDisplay& disp,
                                              const OEDepict::OE2DPoint& point)

   .. oe:language:: python

      .. oe:api:: python

         OEGetNearestResidue(disp: OE2DActiveSiteDisplay, p: OE2DPoint) -> OENearestResidue

   Returns an :ref:`OENearestResidue <OEGrapheme_OENearestResidue>` object that stores a residue which is depicted nearest to a given 2D display coordinates.

   *disp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object of which residues are being
      considered.

   *point*
      Specifies the 2D display coordinates.

   .. seealso::

      * :ref:`OENearestResidue <OEGrapheme_OENearestResidue>` class
      * :oe:func:`OEGrapheme::OEGetNearbyResidue` function
