.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEAcyclicPath

.. oe:function:: OEAcyclicPath

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

      .. oe:api::

         OESystem::OEIterBase<OEAtomBase>* OEAcyclicPath(const OEAtomBase* bgn,
                                                         const OEAtomBase* end)

   .. oe:language:: python

      .. oe:api:: python

         OEAcyclicPath(arg1: OEAtomBase, arg2: OEAtomBase) -> OEAtomIter

   Returns an iterator over the atoms in order connecting ``bgn`` to
   ``end`` through the molecular graph without traversing rings. Both
   ``bgn`` and ``end`` will be returned in the iterator. Therefore,
   ``bgn`` will always be the first atom in the iterator and ``end``
   will always be the last atom in the iterator if an acyclic path
   through the molecule exists. If no path exists, only ``bgn`` will
   be returned in the iterator.

