.. oe:namespace:: OEBio


.. _OEBio_OEStackingInteractionHint:

.. oe:class:: OEStackingInteractionHint

   .. oe:api::

      class OEStackingInteractionHint : public OEInteractionHintTypeBase

   The :ref:`OEStackingInteractionHint <OEBio_OEStackingInteractionHint>` class represents
   a built-in type that identifies interactions stored in an
   :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` object as
   Pi or T **stacking** interactions (inter- and intramolecular).

   .. seealso::

      * :oe:constns:`OEBio::OEStackingInteractionHintType` namespace for specific **stacking**  interaction types
      * :ref:`OEIsStackingInteractionHint <OEBio_OEIsStackingInteractionHint>` predicate
      * :ref:`OEInteractionHint <OEBio_OEInteractionHint>` class
      * :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` class

      To perceive **stacking** interactions:

      * :oe:func:`OEBio::OEPerceiveInteractionHints` function
      * :ref:`OEPerceiveInteractionOptions <OEBio_OEPerceiveInteractionOptions>` class and its methods:

        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxPiStackAngle`
        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxPiStackDistance`
        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxTStackAngle`
        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxTStackDistance`


   The following methods are publicly inherited from :ref:`OEInteractionHintTypeBase <OEBio_OEInteractionHintTypeBase>`:

   =================================================================== =================================================================== ===================================================================
   :oe:meth:`operator=<OEBio::OEInteractionHintTypeBase::operator=>`   :oe:meth:`operator==<OEBio::OEInteractionHintTypeBase::operator==>` :oe:meth:`GetName<OEBio::OEInteractionHintTypeBase::GetName>`
   :oe:meth:`operator!=<OEBio::OEInteractionHintTypeBase::operator!=>` :oe:meth:`CreateCopy<OEBio::OEInteractionHintTypeBase::CreateCopy>` :oe:meth:`IsValid<OEBio::OEInteractionHintTypeBase::IsValid>`
   =================================================================== =================================================================== ===================================================================

   .. oe:method:: Constructors

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

         .. oe:api::

            OEStackingInteractionHint(unsigned int type)

      .. oe:language:: python

         .. oe:api:: python

            OEStackingInteractionHint(type: int) -> OEStackingInteractionHint

      Creates an :ref:`OEStackingInteractionHint <OEBio_OEStackingInteractionHint>` object with the given type.

      *type*
         This value has to be from the :oe:constns:`OEBio::OEStackingInteractionHintType`
         namespace.

      .. note::

         Two :ref:`OEStackingInteractionHint <OEBio_OEStackingInteractionHint>` objects with different
         types from the :oe:constns:`OEBio::OEStackingInteractionHintType`
         namespace are considered to be different.

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

         .. oe:api::

            OEStackingInteractionHint(const OEStackingInteractionHint& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEStackingInteractionHint(rhs: OEStackingInteractionHint) -> OEStackingInteractionHint

      Copy constructor.


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

      .. oe:api::

         OEStackingInteractionHint &operator=(const OEStackingInteractionHint &rhs)

      Assignment operator.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEInteractionHintTypeBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEInteractionHintTypeBase

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


   .. oe:method:: IsValid

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

         .. oe:api::

            bool IsValid(const OEInteractionHintFragment *,
                         const OEInteractionHintFragment *) const

      .. oe:language:: python

         .. oe:api:: python

            IsValid(arg2: OEInteractionHintFragment,
                    arg3: OEInteractionHintFragment) -> bool

      Evaluates whether the two given fragments would form a valid
      **stacking** interaction when added to an
      :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` object.

      It checks that each fragment contains at least five atoms,
      and the fragments belong to different molecules *i.e.*
      it is an **intermolecular** interaction.
