.. oe:namespace:: OEMedChem

.. meta::
   :keywords: OEMCSMolSimScore, MCSMolSimScore


.. _OEMedChem_OEMCSMolSimScore:

.. oe:class:: OEMCSMolSimScore

   .. oe:api::

      class OEMCSMolSimScore

   This class represents :ref:`OEMCSMolSimScore <OEMedChem_OEMCSMolSimScore>` that holds a
   similarity value, an index and a fragment core that identifies the molecule in
   the :ref:`OEMCSFragDatabase <OEMedChem_OEMCSFragDatabase>` index from which the score
   is calculated.

   .. seealso::

      * :oe:meth:`OEMedChem::OEMCSFragDatabase::GetScores`
      * :oe:meth:`OEMedChem::OEMCSFragDatabase::GetSortedScores`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEMCSMolSimScore()
            OEMCSMolSimScore(const OEMCSMolSimScore& ref)
            OEMCSMolSimScore(unsigned int i, double s,
                             const std::string& coresmi)

      .. oe:language:: python

         .. oe:api:: python

            OEMCSMolSimScore() -> OEMCSMolSimScore
            OEMCSMolSimScore(i: int, s: float, sc: str) -> OEMCSMolSimScore
            OEMCSMolSimScore(ref: OEMCSMolSimScore) -> OEMCSMolSimScore

      Initializes an :ref:`OEMCSMolSimScore <OEMedChem_OEMCSMolSimScore>` from an index ``i``
      and a score ``s`` and a core ``coresmi``, or from another
      :ref:`OEMCSMolSimScore <OEMedChem_OEMCSMolSimScore>` instance, or with default (null)
      values.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEMCSMolSimScore &operator=(const OEMCSMolSimScore &ref)

      Assignment operator.

   .. oe:method:: GetIdx

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

         .. oe:api::

            unsigned int GetIdx() const

      .. oe:language:: python

         .. oe:api:: python

            GetIdx() -> int

      Returns the index of the indexed molecule corresponding to the
      similarity score.

   .. oe:method:: GetMCSCore

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

         .. oe:api::

            std::string GetMCSCore() const

      .. oe:language:: python

         .. oe:api:: python

            GetMCSCore() -> str

      Returns the SMILES core relating the query and the indexed molecule
      corresponding to the similarity score.

   .. oe:method:: GetScore

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

         .. oe:api::

            double GetScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetScore() -> float

      Returns the score that relates the query and the indexed molecule.

   .. oe:method:: Set

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

         .. oe:api::

            void Set(unsigned int i, double s, const std::string& coresmi)

      .. oe:language:: python

         .. oe:api:: python

            Set(i: int, s: float, core: str) -> None

      Initializes an :ref:`OEMCSMolSimScore <OEMedChem_OEMCSMolSimScore>` from an index ``i``
      and a score ``s`` and a core ``coresmi``.
