.. oe:namespace:: OEMedChem

.. meta::
   :keywords: OEMCSTanimotoSim, MCSTanimotoSim


.. _OEMedChem_OEMCSTanimotoSim:

.. oe:class:: OEMCSTanimotoSim

   .. oe:api::

      class OEMCSTanimotoSim : public OEMedChem::OEMCSSimFuncBase

   This class represents :ref:`OEMCSTanimotoSim <OEMedChem_OEMCSTanimotoSim>` that
   calculates the :oe:const:`Tanimoto<OEGraphSim::OESimMeasure::Tanimoto>`
   similarity score.

   **Formula:**

     :math:`Sim_{Tanimoto}(A,B) = \frac{bothAB}{|A| + |B| - bothAB} = \frac{bothAB}{onlyA + onlyB + bothAB}`

   The following methods are publicly inherited from :ref:`OEMCSSimFuncBase <OEMedChem_OEMCSSimFuncBase>`:

   ================================================================================ ================================================================================ ================================================================================
   :oe:meth:`operator()<OEMedChem::OEMCSSimFuncBase::operator()>`                   :oe:meth:`CreateCopy<OEMedChem::OEMCSSimFuncBase::CreateCopy>`                   :oe:meth:`GetMCSSimTypeString<OEMedChem::OEMCSSimFuncBase::GetMCSSimTypeString>`
   ================================================================================ ================================================================================ ================================================================================

   .. ################################################################
      #
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OEMCSTanimotoSim()

      .. oe:language:: python

         .. oe:api:: python

            OEMCSTanimotoSim() -> OEMCSTanimotoSim

      Default constructor.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: operator()

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

         .. oe:api::

            double operator() (unsigned int commonAB, unsigned int totalA,  unsigned totalB) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(commonAB: int, totalA: int, totalB: int) -> float

      Returns the :oe:const:`Tanimoto<OEGraphSim::OESimMeasure::Tanimoto>`
      similarity coefficient based on the fragment core counts for the
      fragment core, query molecule and indexed molecule.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEMedChem::OEMCSSimFuncBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMCSTanimotoSim

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

   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetMCSSimTypeString

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

         .. oe:api::

            std::string GetMCSSimTypeString() const

      .. oe:language:: python

         .. oe:api:: python

            GetMCSSimTypeString() -> str

      Returns a string representation of the
      :ref:`OEMCSTanimotoSim <OEMedChem_OEMCSTanimotoSim>` class.

