.. oe:namespace:: OEDepict


.. meta::
   :keywords: OEAlignmentResult, AlignmentResult


.. _OEDepict_OEAlignmentResult:

.. oe:class:: OEAlignmentResult

   .. oe:api::

      class OEAlignmentResult : public OEChem::OEMatchBase

   The :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` class is a concrete instance of the
   :ref:`OEMatchBase <OEChem_OEMatchBase>` abstract base class.
   An :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object represents a pairwise correspondence between
   atoms and/or bonds in two different molecules being aligned by the
   :oe:func:`OEDepict::OEPrepareAlignedDepiction` function.

   The following methods are publicly inherited from :ref:`OEMatchBase <OEChem_OEMatchBase>`:

   =============================================================== ================================================================ ===============================================================
   :oe:meth:`operator bool<OEChem::OEMatchBase::operator bool>`    :oe:meth:`GetBonds<OEChem::OEMatchBase::GetBonds>`               :oe:meth:`GetTargetBonds<OEChem::OEMatchBase::GetTargetBonds>` 
   :oe:meth:`Clear<OEChem::OEMatchBase::Clear>`                    :oe:meth:`GetPatternAtoms<OEChem::OEMatchBase::GetPatternAtoms>` :oe:meth:`IsValid<OEChem::OEMatchBase::IsValid>`               
   :oe:meth:`CreateCopy<OEChem::OEMatchBase::CreateCopy>`          :oe:meth:`GetPatternBonds<OEChem::OEMatchBase::GetPatternBonds>` :oe:meth:`NumAtoms<OEChem::OEMatchBase::NumAtoms>`             
   :oe:meth:`GetAtoms<OEChem::OEMatchBase::GetAtoms>`              :oe:meth:`GetTargetAtoms<OEChem::OEMatchBase::GetTargetAtoms>`   :oe:meth:`NumBonds<OEChem::OEMatchBase::NumBonds>`             
   =============================================================== ================================================================ ===============================================================

   .. seealso::

      * :ref:`OEMatchBase <OEChem_OEMatchBase>` class in the **OEChem TK** manual
      * :oe:func:`OEDepict::OEPrepareAlignedDepiction` function
      * :ref:`chapter_molalign` chapter

   .. oe:method:: Constructors

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

         .. oe:api::

            OEAlignmentResult()

      .. oe:language:: python

         .. oe:api:: python

            OEAlignmentResult() -> OEAlignmentResult

      Default constructor.

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

         .. oe:api::

            OEAlignmentResult(const OEChem::OEMatchBase& match)

      .. oe:language:: python

         .. oe:api:: python

            OEAlignmentResult() -> OEAlignmentResult
            OEAlignmentResult(rhs: OEMatchBase) -> OEAlignmentResult
            OEAlignmentResult(rhs: OEAlignmentResult) -> OEAlignmentResult

      Constructors an :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object from a match.

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

         .. oe:api::

            OEAlignmentResult(const OEAlignmentResult& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEAlignmentResult(rhs: OEMatchBase) -> OEAlignmentResult
            OEAlignmentResult(rhs: OEAlignmentResult) -> OEAlignmentResult

      Copy constructor.

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

      .. oe:api::

         OEAlignmentResult &operator=(const OEAlignmentResult &rhs)

      Assignment operator.


   .. oe:method:: Clear

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

         .. oe:api::

            void Clear()

      .. oe:language:: python

         .. oe:api:: python

            Clear() -> None

      Removes all atom and bond of pairs from the
      :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEMatchBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMatchBase

      Deep copy constructor that returns a copy of the object.
      The memory for the returned object derived from :ref:`OEMatchBase <OEChem_OEMatchBase>`
      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.


   .. oe:method:: GetAtoms

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

         .. oe:api::

            OESystem::OEIterBase<OEChem::OEMatchPair<OEChem::OEAtomBase> >* GetAtoms() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtoms() -> Iterable[OEMatchPair[OEAtomBase]]

      Returns an iterator over :ref:`OEMatchPair <OEChem_OEMatchPair>` which contain the
      atom to atom correspondences in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object.

      .. seealso::

         :ref:`OEMatchPair <OEChem_OEMatchPair>` class in the **OEChem TK** manual


   .. oe:method:: GetBonds

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

         .. oe:api::

            OESystem::OEIterBase<OEChem::OEMatchPair<OEChem::OEBondBase> >* GetBonds() const

      .. oe:language:: python

         .. oe:api:: python

            GetBonds() -> Iterable[OEMatchPair[OEBondBase]]

      Returns an iterator over :ref:`OEMatchPair <OEChem_OEMatchPair>` which contain the
      bond to bond correspondences in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object.

      .. seealso::

         :ref:`OEMatchPair <OEChem_OEMatchPair>` class in the **OEChem TK** manual


   .. 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 alignment based on the correspondence
      stored in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` object.


   .. oe:method:: IsValid

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

         .. oe:api::

            bool IsValid() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool


      Returns true if there at least one atom to atom or bond to bonds
      correspondence is stored in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>`
      object *i.e.* whether the alignment performed by the
      :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>` function was successful.


   .. oe:method:: NumAtoms

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

         .. oe:api::

            unsigned int NumAtoms() const

      .. oe:language:: python

         .. oe:api:: python

            NumAtoms() -> int

      Returns the number of atom equivalences in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>`
      object.


   .. oe:method:: NumBonds

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

         .. oe:api::

            unsigned int NumBonds() const

      .. oe:language:: python

         .. oe:api:: python

            NumBonds() -> int

      Returns the number of bond equivalences in the :ref:`OEAlignmentResult <OEDepict_OEAlignmentResult>`
      object.
