.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEMolPotential

.. meta::
   :keywords: OEMolFunc2, MolFunc2


.. _OEMolPotential_OEMolFunc2:

.. oe:class:: OEMolFunc2

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEMolFunc2 : public OEOpt::OEFunc2, public OEMolFunc1

   The :ref:`OEMolFunc2 <OEMolPotential_OEMolFunc2>` is an abstract base class. This
   class defines the interface for stateful functions which operate on
   molecules and conformers, compute a function value, gradients, and
   second derivatives. :ref:`OEMolFunc2 <OEMolPotential_OEMolFunc2>`
   combines :ref:`OEFunc2 <OEOpt_OEFunc2>` with :ref:`OEMolFunc <OEMolPotential_OEMolFunc>`
   interface.  Classes derived from :ref:`OEMolFunc2 <OEMolPotential_OEMolFunc2>`
   can be used with any optimizers.

   .. _figure_OEMolFunc2_Hierarchy:

   .. figure:: ../images/OEMolFunc2.*
      :align:  center

   The following methods are publicly inherited from :ref:`OEFunc0 <OEOpt_OEFunc0>`:
    * :oe:meth:`operator()<OEOpt::OEFunc0::operator()>`
    * :oe:meth:`GetFComponents<OEOpt::OEFunc0::GetFComponents>`
    * :oe:meth:`NumVar<OEOpt::OEFunc0::NumVar>`

   The following methods are publicly inherited from :ref:`OEFunc1 <OEOpt_OEFunc1>`:
    * :oe:meth:`operator()<OEOpt::OEFunc1::operator()>`

   The following methods are publicly inherited from :ref:`OEFunc2 <OEOpt_OEFunc2>`:
    * :oe:meth:`operator()<OEOpt::OEFunc2::operator()>`

   The following methods are publicly inherited from :ref:`OEMolFunc <OEMolPotential_OEMolFunc>`:
    * :oe:meth:`Clear<OEMolPotential::OEMolFunc::Clear>`
    * :oe:meth:`ClearPredicates<OEMolPotential::OEMolFunc::ClearPredicates>`
    * :oe:meth:`GetInteractions<OEMolPotential::OEMolFunc::GetInteractions>`
    * :oe:meth:`Set<OEMolPotential::OEMolFunc::Set>`
    * :oe:meth:`Setup<OEMolPotential::OEMolFunc::Setup>`

   The following classes derive from this class:
    * :ref:`OEGenericFF2 <OEMolPotential_OEGenericFF2>`
    * :ref:`OESubsetAdaptor <OEMolPotential_OESubsetAdaptor>`
    * :ref:`OENumericMolFunc2 <OEMolPotential_OENumericMolFunc2>`
    * :ref:`OEScaledMolFunc <OEMolPotential_OEScaledMolFunc>`
    * :ref:`OEFFPotential <OEMolPotential_OEFFPotential>`
    * :ref:`OEStretchPotential <OEMolPotential_OEStretchPotential>`
    * :ref:`OEBendPotential <OEMolPotential_OEBendPotential>`
    * :ref:`OETorsionPotential <OEMolPotential_OETorsionPotential>`
    * :ref:`OEOutOfPlanePotential <OEMolPotential_OEOutOfPlanePotential>`
    * :ref:`OENonBondPotBase <OEMolPotential_OENonBondPotBase>`
    * :ref:`OEVdwPotential <OEMolPotential_OEVdwPotential>`
    * :ref:`OECoulombPotential <OEMolPotential_OECoulombPotential>`
    * :ref:`OEInterMolFunc2 <OEMolPotential_OEInterMolFunc2>`
    * :ref:`OEInterNonBondPotBase <OEMolPotential_OEInterNonBondPotBase>`
    * :ref:`OEInterNonBondPotential <OEMolPotential_OEInterNonBondPotential>`
    * :ref:`OEInterVdwPotential <OEMolPotential_OEInterVdwPotential>`
    * :ref:`OEInterCoulombPotential <OEMolPotential_OEInterCoulombPotential>`
    * :ref:`OEMMFF <OEMolMMFF_OEMMFF>`
    * :ref:`OEMMFFStretchBend <OEMolMMFF_OEMMFFStretchBend>`
    * :ref:`OESheffield <OESheff_OESheffield>`
    * :ref:`OEHermiteShapeFunc <OEShape_OEHermiteShapeFunc>`
