.. # split from OEMedChemFunctions.rst:393


.. oe:namespace:: OEMedChem

.. meta::
   :keywords: OEGetRingLinkerSideChainFragments

.. oe:function:: OEGetRingLinkerSideChainFragments

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

      .. oe:api::

         OESystem::OEIterBase<OEChem::OEAtomBondSet>* OEGetRingLinkerSideChainFragments(const OEChem::OEMolBase& mol,
                                                                                        const OEBemisMurckoOptions& options = OEBemisMurckoOptions())

   .. oe:language:: python

      .. oe:api:: python

         OEGetRingLinkerSideChainFragments(mol: Union[OEGraphMol,OEMol,OEQMol],
                                           options: OEBemisMurckoOptions = OEBemisMurckoOptions()) -> OEAtomBondSetIter

   .. warning::

      The following function is deprecated. Please use the more generic function above.
   
   .. oe:language:: c++ java csharp

      .. oe:api::

         OESystem::OEIterBase<OEChem::OEAtomBondSet>* OEGetRingLinkerSideChainFragments(const OEChem::OEMolBase& mol,
                                                                                        unsigned perceiveType)

   .. oe:language:: python

      .. oe:api:: python

         OEGetRingLinkerSideChainFragments(mol: Union[OEGraphMol,OEMol,OEQMol],
                                           perceiveType: int) -> OEAtomBondSetIter

   The :oe:func:`OEMedChem::OEGetRingLinkerSideChainFragments` function partitions
   the given molecule into ring, linker and side chain fragments as defined
   in [Bemis-1996]_ .

   The :ref:`OEBemisMurckoOptions <OEMedChem_OEBemisMurckoOptions>` class can be used to
   specify both the :oe:constns:`OEMedChem::OERegionType` and also add additional
   functional groups to fragments. The `perceiveType` parameter only allows modification 
   of the :oe:constns:`OEMedChem::OERegionType` of the fragments returned.

   It returns an iterator over :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` objects where
   each :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` container stores the atoms and the bonds
   of an identified fragment.
   See example in :ref:`Figure: Example of fragments returned by the
   OEGetRingLinkerSideChainFragments function<figure_OEGetRingLinkerSideChainFragments>`
   where each fragment returned by the :oe:func:`OEMedChem::OEGetRingLinkerSideChainFragments`
   function is highlighted with a different color.

   The perceived regions are based upon the heavy atoms in the molecule.
   If the molecule contains explicit hydrogen atoms, those explicit hydrogens
   will be returned in the same perception set(s) as their alpha heavy atom neighbor.
   If the perception set(s) returned are used to subset or fragment the molecule, a mixture
   of implicit and explicit hydrogens may result, so care should be taken to normalize
   the structure for subsequent use.



   Definitions from  [Bemis-1996]_:

   **ring systems**
     Cycles within the graph representation of molecules and cycles sharing an
     edge (a connection between two atoms or a bond).

   **linker atoms**
     Atoms that are on the direct path connecting two ring systems are defined as linker atoms.

   **side chain atoms**
     Any nonring, nonlinker atoms are defined as side chain atoms.

   .. note::

      The molecule argument is ``const``, so this function requires that the
      :oe:func:`OEChem::OEFindRingAtomsAndBonds` perception activity has been
      performed prior to calling this function.

   .. _figure_OEGetRingLinkerSideChainFragments:

   .. figure:: ../images/OEGetRingLinkerSideChainFragments.*
      :align:  center

      **Example of fragments returned by the OEGetRingLinkerSideChainFragments function**

   .. seealso::

      * :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` and :ref:`OEMolBase <OEChem_OEMolBase>` classes in the *OEChem TK* manual
      * :ref:`chapter_fragmentation` chapter


