.. oe:namespace:: OEChem



.. meta::
   :keywords: OEMCSMaxAtoms, MCSMaxAtoms


.. _OEChem_OEMCSMaxAtoms:

.. oe:class:: OEMCSMaxAtoms

   .. oe:api::

      class OEMCSMaxAtoms : public OEMCSFunc

   This class represents `OEMCSMaxAtoms`.

   The :ref:`OEMCSMaxAtoms <OEChem_OEMCSMaxAtoms>` class is an implementation of
   :ref:`OEMCSFunc <OEChem_OEMCSFunc>` designed to order maximum common
   substructure matches by the maximum number of atoms included in the
   graph match. If two common structure matches having the same number
   of atoms, ties are split based on the number of bonds contained in
   the match.

   .. seealso::

      * :ref:`section_patternmatch_mcss_score` section
      * :oe:meth:`OEChem::OEMCSSearch::SetMCSFunc` method
      * :oe:meth:`OEChem::OECliqueSearch::SetMCSFunc` method


   The following methods are publicly inherited from :ref:`OEMCSFunc <OEChem_OEMCSFunc>`:

   ==================================================== ==================================================== ===================================================
   :oe:meth:`operator()<OEChem::OEMCSFunc::operator()>` :oe:meth:`CreateCopy<OEChem::OEMCSFunc::CreateCopy>`                                                    
   ==================================================== ==================================================== ===================================================


   .. oe:method:: operator()

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

         .. oe:api::

            double operator()(const OEMolBase &, const OEMolBase &, OEAtomBase **, OEBondBase **)

      .. oe:language:: python

         .. oe:api:: python

            __call__(arg2: Union[OEGraphMol,OEMol,OEQMol],
                     arg3: Union[OEGraphMol,OEMol,OEQMol], arg4: OEAtomBase,
                     arg5: OEBondBase) -> float

      This method is called by its parent :ref:`OEMCSSearch <OEChem_OEMCSSearch>`
      or :ref:`OECliqueSearch <OEChem_OECliqueSearch>` object.
      The method is called with the pattern molecule, target molecule,
      and arrays and atoms and bonds containing the correspondences
      found for the a common structure match.
      The method computes a value based on the number of atoms and bonds
      in the common structure match which is used to determine the
      maximum common structure match.

      **Scoring function:** 

      :math:`num.\ of\ mapped\ atoms + \frac{num.\ of\ mapped\ bonds}{100}`

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEMCSFunc * CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMCSFunc

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEMCSMaxAtoms <OEChem_OEMCSMaxAtoms>`
      object is dynamically allocated and owned by the caller.

      .. oe:language:: c++

         The returned copy should be deallocated using C++
         delete operator in order to prevent a memory leak.

