.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEAtomGetSmallestRingSize

.. oe:function:: OEAtomGetSmallestRingSize

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

      .. oe:api::

         unsigned int OEAtomGetSmallestRingSize(const OEAtomBase* atm)
         unsigned int OEAtomGetSmallestRingSize(const OEAtomBase& atm)

   .. oe:language:: python

      .. oe:api:: python

         OEAtomGetSmallestRingSize(atm: OEAtomBase) -> int

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

   .. warning::

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

   .. seealso::

      * :ref:`chapter_ring` chapter

