.. oe:namespace:: OEBio


.. _OEBio_OECationPiInteractionHint:

.. oe:class:: OECationPiInteractionHint

   .. oe:api::

      class OECationPiInteractionHint : public OEInteractionHintTypeBase

   The :ref:`OECationPiInteractionHint <OEBio_OECationPiInteractionHint>` class represents
   a built-in type that identifies interactions stored in an
   :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` object as
   **cation-Pi** interactions (inter- and intramolecular).

   .. seealso::

      * :oe:constns:`OEBio::OECationPiInteractionHintType` namespace for specific **cation-Pi**  interaction types
      * :ref:`OEIsCationPiInteractionHint <OEBio_OEIsCationPiInteractionHint>` predicate
      * :ref:`OEInteractionHint <OEBio_OEInteractionHint>` class
      * :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` class

      To perceive **cation-Pi** interactions:

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

        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxCationPiAngle`
        * :oe:meth:`OEBio::OEPerceiveInteractionOptions::SetMaxCationPiDistance`


   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::

            OECationPiInteractionHint(unsigned int type)

      .. oe:language:: python

         .. oe:api:: python

            OECationPiInteractionHint(type: int) -> OECationPiInteractionHint

      Creates an :ref:`OECationPiInteractionHint <OEBio_OECationPiInteractionHint>` object with the given type.

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

      .. note::

         Two :ref:`OECationPiInteractionHint <OEBio_OECationPiInteractionHint>` objects with different
         types from the :oe:constns:`OEBio::OECationPiInteractionHintType`
         namespace are considered to be different.

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

         .. oe:api::

            OECationPiInteractionHint(const OECationPiInteractionHint& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OECationPiInteractionHint(rhs: OECationPiInteractionHint) -> OECationPiInteractionHint

      Copy constructor.


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

      .. oe:api::

         OECationPiInteractionHint &operator=(const OECationPiInteractionHint &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:`OECationPiInteractionHint <OEBio_OECationPiInteractionHint>`
      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
      **cation-Pi** interaction when added to an
      :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` object.

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

         
