.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEBondGetSmallestRingSize

.. oe:function:: OEBondGetSmallestRingSize

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

      .. oe:api::

         unsigned int OEBondGetSmallestRingSize(const OEBondBase& bnd)
         unsigned int OEBondGetSmallestRingSize(const OEBondBase* bnd)

   .. oe:language:: python

      .. oe:api:: python

         OEBondGetSmallestRingSize(bnd: OEBondBase) -> int

   Determines the size of the smallest ring that a bond is in.
   If the bond is not in a ring, *i.e.* :oe:meth:`OEChem::OEBondBase::IsInRing`
   returns ``false``, the value zero is returned.

   .. warning::

      It is necessary to perform ring perception by calling
      :oe:func:`OEChem::OEFindRingAtomsAndBonds` function prior to calling
      :oe:func:`OEChem::OEBondGetSmallestRingSize` function.

   .. seealso::

      * :ref:`chapter_ring` chapter

