.. include:: ../../toolkit-substitutions

.. oe:namespace:: OESpruce

.. meta::
   :keywords: OESuperposeResults, SuperposeResults, Superpose, superposition


.. _OESpruce_OESuperposeResults:

.. oe:class:: OESuperposeResults

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::

      class OESuperposeResults

   This class stores superposition results generated by :ref:`OESuperpose <OESpruce_OESuperpose>`.

   .. seealso::

      * :ref:`OESuperpose <OESpruce_OESuperpose>` class

   .. admonition:: Code Example

      * :ref:`spruce_examples_superposition` example


   .. oe:method:: Constructors

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

         .. oe:api::

            OESuperposeResults()

      .. oe:language:: python

         .. oe:api:: python

            OESuperposeResults() -> OESuperposeResults

      Default constructor.

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

         .. oe:api::

            OESuperposeResults(const OESuperposeResults& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OESuperposeResults(rhs: OESuperposeResults) -> OESuperposeResults
            OESuperposeResults(arg2: OESuperposeResults) -> OESuperposeResults

      Copy constructor.

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

         .. oe:api::

            OESuperposeResults(OESuperposeResults&&)

      Move constructor.

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

      .. oe:api::

         OESuperposeResults& operator=(const OESuperposeResults& rhs)

      Assignment operator.

   .. oe:method:: operator bool

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

         .. oe:api::

            operator bool() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool

      Returns true if the superposition is valid and false if not, which can be also obtained by calling 
      :ref:`IsValid <OESpruce_OESuperposeResults_IsValid>`.

      .. seealso::

         * :ref:`IsValid <OESpruce_OESuperposeResults_IsValid>` method

   .. _OESpruce_OESuperposeResults_IsValid:


   .. oe:method::  IsValid

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

         .. oe:api::

            bool IsValid() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool

      Returns true if the superposition is valid and false if not. The superposition is valid if the scores (RMSD, Tanimoto, and sequence alignment score) 
      satisfy the thresholds set in the :ref:`OESuperposeOptions <OESpruce_OESuperposeOptions>` class.

      .. seealso::

         * :ref:`GetValidRMSD <OESpruce_OESuperposeOptions_GetValidRMSD>` method
         * :ref:`GetValidTanimoto <OESpruce_OESuperposeOptions_GetValidTanimoto>` method
         * :ref:`GetValidSeqScore <OESpruce_OESuperposeOptions_GetValidSeqScore>` method

   .. _OESpruce_OESuperposeResults_Transform:


   .. oe:method::  Transform

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

         .. oe:api::

            bool Transform(OEChem::OEMolBase& mol) const
            bool Transform(OEBio::OEDesignUnit& du) const

      .. oe:language:: python

         .. oe:api:: python

            Transform(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool
            Transform(du: OEDesignUnit) -> bool

      Returns true and transforms the input molecule using the stored transform from the superposition if they are valid. 
      Otherwise, the function does nothing and returns false.

      .. seealso::

         * :ref:`OETrans <OEChem_OETrans>` class
         * :ref:`GetTransform <OESpruce_OESuperposeResults_GetTransform>` method

   .. _OESpruce_OESuperposeResults_GetTransform:


   .. oe:method::  GetTransform

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

         .. oe:api::

            OEChem::OETrans& GetTransform() const

      .. oe:language:: python

         .. oe:api:: python

            GetTransform() -> OETrans

      Returns the :ref:`OETrans <OEChem_OETrans>` object that stores the rotation matrix and translation vector from the superposition.

      .. seealso::

         * :ref:`OETrans <OEChem_OETrans>` class
         * :ref:`Transform <OESpruce_OESuperposeResults_Transform>` method
         * :ref:`GetRotMatrix <OESpruce_OESuperposeResults_GetRotMatrix>` method
         * :ref:`GetTranslation <OESpruce_OESuperposeResults_GetTranslation>` method

   .. _OESpruce_OESuperposeResults_GetRotMatrix:


   .. oe:method::  GetRotMatrix

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

         .. oe:api::

            bool GetRotMatrix(double* rmat) const

      .. oe:language:: python

         .. oe:api:: python

            GetRotMatrix(rmat: OEDoubleArray) -> bool

      Returns by reference the rotation matrix of the superposition.

   .. _OESpruce_OESuperposeResults_GetTranslation:


   .. oe:method::  GetTranslation

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

         .. oe:api::

            bool GetTranslation(double* trans) const

      .. oe:language:: python

         .. oe:api:: python

            GetTranslation(trans: OEDoubleArray) -> bool

      Returns by reference the translation vector of the superposition.

   .. _OESpruce_OESuperposeResults_HasRMSD:


   .. oe:method::  HasRMSD

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

         .. oe:api::

            bool HasRMSD() const

      .. oe:language:: python

         .. oe:api:: python

            HasRMSD() -> bool

      Returns whether RMSD was calculated for the superposed molecules. RMSD is only applicable to sequence-based methods, such as 
      :ref:`Global <OESpruce_OESuperposeMethod_Global>`, :ref:`Site <OESpruce_OESuperposeMethod_Site>`, :ref:`DDM <OESpruce_OESuperposeMethod_DDM>`, 
      and :ref:`Weighted <OESpruce_OESuperposeMethod_Weighted>`.

   .. _OESpruce_OESuperposeResults_HasTanimoto:


   .. oe:method::  HasTanimoto

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

         .. oe:api::

            bool HasTanimoto() const

      .. oe:language:: python

         .. oe:api:: python

            HasTanimoto() -> bool

      Returns whether Tanimoto was calculated for the superposed molecules. Tanimoto is only applicable to shape-based methods, such as 
      :ref:`SSE <OESpruce_OESuperposeMethod_SSE>`.

   .. _OESpruce_OESuperposeResults_HasSeqScore:


   .. oe:method::  HasSeqScore

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

         .. oe:api::

            bool HasSeqScore() const

      .. oe:language:: python

         .. oe:api:: python

            HasSeqScore() -> bool

      Returns whether sequence alignment score was calculated for the superposed molecules. sequence alignment score is only applicable to sequence-based methods, such as 
      :ref:`Global <OESpruce_OESuperposeMethod_Global>`, :ref:`Site <OESpruce_OESuperposeMethod_Site>`, :ref:`DDM <OESpruce_OESuperposeMethod_DDM>`,
      and :ref:`Weighted <OESpruce_OESuperposeMethod_Weighted>`.

   .. _OESpruce_OESuperposeResults_GetRMSD:


   .. oe:method::  GetRMSD

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

         .. oe:api::

            double GetRMSD() const

      .. oe:language:: python

         .. oe:api:: python

            GetRMSD() -> float

      Returns the RMSD of the structural superposition.

   .. _OESpruce_OESuperposeResults_GetTanimoto:


   .. oe:method::  GetTanimoto

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

         .. oe:api::

            double GetTanimoto() const

      .. oe:language:: python

         .. oe:api:: python

            GetTanimoto() -> float

      Returns the Tanimoto of the structural superposition.

   .. _OESpruce_OESuperposeResults_GetSeqScore:


   .. oe:method::  GetSeqScore

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

         .. oe:api::

            int GetSeqScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetSeqScore() -> int

      Returns the sequence alignment score of the structural superposition. The score is calculated by 
      summing the similarity scores of matched residues and gap penalties.
      
   .. _OESpruce_OESuperposeResults_GetRefChains:


   .. oe:method::  GetRefChains

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

         .. oe:api::

            const std::vector<std::string>& GetRefChains() const

      .. oe:language:: python

         .. oe:api:: python

            GetRefChains() -> OEStringVector

      Returns 1-letter code of all names of reference protein chains.

      .. seealso::

         * :ref:`GetFitChains <OESpruce_OESuperposeResults_GetFitChains>` method

   .. _OESpruce_OESuperposeResults_GetFitChains:


   .. oe:method::  GetFitChains

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

         .. oe:api::

            const std::vector<std::string>& GetFitChains() const

      .. oe:language:: python

         .. oe:api:: python

            GetFitChains() -> OEStringVector

      Returns 1-letter code of all names of fit protein chains.

      .. seealso::

         * :ref:`GetRefChains <OESpruce_OESuperposeResults_GetRefChains>` method
