.. oe:namespace:: OEChem

.. meta::
   :keywords: OENbrs, Nbrs


.. _OEChem_OENbrs:

.. oe:class:: OENbrs

   .. oe:api::

      struct OENbrs

   This class represents :ref:`OENbrs <OEChem_OENbrs>` that stores an atom pair
   and the distance between them.

   .. seealso::

      * :oe:func:`OEChem::OEGetNearestNbrs` function
      * :oe:func:`OEChem::OENearestNbrs` class

   .. oe:method:: Constructors

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

         .. oe:api::

            OENbrs(const OEAtomBase* bgn, const OEAtomBase* end, double dist2)

      .. oe:language:: python

         .. oe:api:: python

            OENbrs(b: OEAtomBase, e: OEAtomBase, d: float) -> OENbrs

      Creates an :ref:`OENbrs <OEChem_OENbrs>` object.

   .. oe:method:: GetBgn

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

         .. oe:api::

            const OEAtomBase* GetBgn() const

      .. oe:language:: python

         .. oe:api:: python

            GetBgn() -> OEAtomBase

      Returns the 'bgn' atom.

   .. oe:method:: GetDist2

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

         .. oe:api::

            double GetDist2() const

      .. oe:language:: python

         .. oe:api:: python

            GetDist2() -> float

      Returns the square of the distance between the 'bgn' and 'end' atoms.

   .. oe:method:: GetDist

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

         .. oe:api::

            double GetDist() const

      .. oe:language:: python

         .. oe:api:: python

            GetDist() -> float

      Returns the distance between the 'bgn' and 'end' atoms.

   .. oe:method:: GetEnd

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

         .. oe:api::

            const OEAtomBase* GetEnd() const

      .. oe:language:: python

         .. oe:api:: python

            GetEnd() -> OEAtomBase

      Returns the 'end' atom.
