.. oe:namespace:: OEChem

.. meta::
   :keywords: OEIsHeavy, IsHeavy


.. _OEChem_OEIsHeavy:

.. oe:class:: OEIsHeavy

   .. oe:api::


      struct OEIsHeavy : public OESystem::OEUnaryPredicate<OEChem::OEAtomBase>

   This class represents :ref:`OEIsHeavy <OEChem_OEIsHeavy>` functor that
   identifies heavy atoms (:ref:`OEAtomBase <OEChem_OEAtomBase>`).

   The following methods are publicly inherited from :ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>`:

   ============================================================================== ============================================================================== ===============================================================================
   :oe:meth:`operator()<OESystem::OEUnaryPredicate::operator()>`                  :oe:meth:`CreateCopy<OESystem::OEUnaryPredicate::CreateCopy>`                  :oe:meth:`CreatePredicateCopy<OESystem::OEUnaryPredicate::CreatePredicateCopy>`
   ============================================================================== ============================================================================== ===============================================================================

   The following methods are publicly inherited from :ref:`OEUnaryFunction <OESystem_OEUnaryFunction>`:

   ============================================================ ============================================================ ===========================================================
   :oe:meth:`operator()<OESystem::OEUnaryFunction::operator()>` :oe:meth:`CreateCopy<OESystem::OEUnaryFunction::CreateCopy>`                                                            
   ============================================================ ============================================================ ===========================================================


   .. oe:method:: operator()

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

         .. oe:api::

            bool operator()(const OEAtomBase& atom) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(atom: OEAtomBase) -> bool

      Returns ``true``, if the  :oe:meth:`GetAtomicNum<OEChem::OEAtomBase::GetAtomicNum>`
      method is greater than 1 for the given 
      :ref:`OEAtomBase <OEChem_OEAtomBase>` object.

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEUnaryFunction<OEChem::OEAtomBase , bool>* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEIsHeavy

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

.. seealso::

  .. oe:language:: c++

      * Example program :ref:`sizefilter.cpp<section_example_oechem_sizefilter>`
      * Example program :ref:`molstats.cpp<section_example_oechem_molstats>`

  .. oe:language:: python

      * Example program :ref:`sizefilter.py<section_example_oechem_sizefilter>`
      * Example program :ref:`molstats.py<section_example_oechem_molstats>`

  .. oe:language:: java

      * Example program :ref:`SizeFilter.java<section_example_oechem_sizefilter>`
      * Example program :ref:`MolStats.java<section_example_oechem_molstats>`

  .. oe:language:: csharp

      * Example program :ref:`SizeFilter.cs<section_example_oechem_sizefilter>`
      * Example program :ref:`MolStats.cs<section_example_oechem_molstats>`
