.. include:: ../../common/cookbook/cookbook-hyperlinks

.. oe:namespace:: OEBio


.. _OEBio_OEInteractionHintFragment:

.. oe:class:: OEInteractionHintFragment

   .. oe:api::

      class OEInteractionHintFragment : public OESystem::OEBase

   The :ref:`OEInteractionHintFragment <OEBio_OEInteractionHintFragment>` class is a container
   that holds atom pointers of a molecule of a
   :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` object.

   .. only:: oehtml

      .. figure:: ../images/interactionhint.svg
         :width: 600
         :align: center

         **Schematic representation of interaction hint container**

   .. seealso::

      * :ref:`OEInteractionHintContainer <OEBio_OEInteractionHintContainer>` class
      * :ref:`OEInteractionHint <OEBio_OEInteractionHint>` class

   .. admonition:: Code Examples

      * :ref:`section_example_oebio_printinteractions` **OEChem TK** example
      * :ref:`section_examples_summary_complex2img` **Grapheme TK** example
      * `Accessing Interaction Hint Information`_ **OpenEye Python Cookbook** recipe

   .. oe:method:: Constructors


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

         .. oe:api::

            OEInteractionHintFragment(const OEInteractionHintContainerImpl* container,
                                      const OEChem::OEMolBase* parent)

      .. oe:language:: python

         .. oe:api:: python

            OEInteractionHintFragment(rhs: OEInteractionHintFragment) -> OEInteractionHintFragment

      Creates an :ref:`OEInteractionHintFragment <OEBio_OEInteractionHintFragment>` object
      that belongs to the given container and stores the atoms of the
      given molecule.

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

         .. oe:api::

            OEInteractionHintFragment(const OEInteractionHintFragment& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEInteractionHintFragment(rhs: OEInteractionHintFragment) -> OEInteractionHintFragment

      Copy constructor.


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

      .. oe:api::

         OEInteractionHintFragment &operator=(const OEInteractionHintFragment &rhs)

      Assignment operator.


   .. oe:method:: AddAtom

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

         .. oe:api::

            bool AddAtom(const OEChem::OEAtomBase *)

      .. oe:language:: python

         .. oe:api:: python

            AddAtom(arg2: OEAtomBase) -> bool

      Adds an atom to the :ref:`OEInteractionHintFragment <OEBio_OEInteractionHintFragment>` object.
      Returns ``true`` if the atom was successfully added to the
      :ref:`OEInteractionHintFragment <OEBio_OEInteractionHintFragment>` object.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEBase

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

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

         .. oe:api::

            const OEChem::OEAtomBase* GetAtom(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>&) const

      .. oe:language:: python

         .. oe:api:: python

            GetAtom(arg2: OEUnaryAtomPred) -> OEAtomBase

      Retrieves the first atom of a fragment that matches the
      specified atom predicate (:ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>`).
      If the fragment does not contain an atom that matches, a null 
      pointer is returned.


   .. oe:method:: GetAtoms

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            GetAtoms() -> Iterable[OEAtomBase]

      Returns an iterator over all the atoms of the fragment.

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            GetAtoms(arg2: OEUnaryAtomPred) -> Iterable[OEAtomBase]

      Returns an iterator over all of the atoms of the fragment that
      match the specified atom predicate (:ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>`).


   .. oe:method:: GetComponentType

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

         .. oe:api::

            const OEInteractionHintComponentTypeBase& GetComponentType() const

      .. oe:language:: python

         .. oe:api:: python

            GetComponentType() -> OEInteractionHintComponentTypeBase

      Returns the type of the fragment i.e. the type of the molecule the
      fragment belongs to.

      .. seealso::

         The following built-in component types are available:

         * :ref:`OELigandInteractionHintComponent <OEBio_OELigandInteractionHintComponent>`
         * :ref:`OEProteinInteractionHintComponent <OEBio_OEProteinInteractionHintComponent>`


   .. oe:method:: GetDataType

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

         .. oe:api::

            const void* GetDataType() const

      .. oe:language:: python

         .. oe:api:: python

            GetDataType() -> void

      This function is used to perform run-time type
      identification.

      .. seealso::

         * :oe:meth:`OESystem::OEBase::GetDataType` method in the **OEChem TK** manual


   .. oe:method:: HasAtom

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

         .. oe:api::

            bool HasAtom(const OEChem::OEAtomBase *) const

      .. oe:language:: python

         .. oe:api:: python

            HasAtom(arg2: OEAtomBase) -> bool


      Returns whether the given atom is already stored in the
      :ref:`OEInteractionHintFragment <OEBio_OEInteractionHintFragment>` object.


   .. oe:method:: IsDataType

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

         .. oe:api::

            bool IsDataType(const void *) const

      .. oe:language:: python

         .. oe:api:: python

            IsDataType(arg2: void) -> bool

      Returns whether a type is the same as the instance this method is
      called on.

      .. seealso::

         * :oe:meth:`OESystem::OEBase::IsDataType` method in the **OEChem TK** manual


   .. 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 atoms of the fragment.
