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

.. oe:namespace:: OEMolPotential

.. meta::
   :keywords: OEFFPotential, OEMolFunc2


.. _OEMolPotential_OEFFPotential:

.. oe:class:: OEFFPotential

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEFFPotential : public virtual OEMolPotential::OEMolFunc2

   The :ref:`OEFFPotential <OEMolPotential_OEFFPotential>` is an abstract base class.  This class defines a common
   base class for all force field potential function implementations.

   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:`Setup<OEMolPotential::OEMolFunc::Setup>`

   The :ref:`OEFFPotential <OEMolPotential_OEFFPotential>` implements the following methods:
    * :oe:meth:`Set<OEMolPotential::OEFFPotential::Set>`

   The following classes derive from this class:
    * :ref:`OENonBondPotBase <OEMolPotential_OENonBondPotBase>`
    * :ref:`OEInterNonBondPotBase <OEMolPotential_OEInterNonBondPotBase>`
    * :ref:`OEStretchPotential <OEMolPotential_OEStretchPotential>`
    * :ref:`OEBendPotential <OEMolPotential_OEBendPotential>`
    * :ref:`OETorsionPotential <OEMolPotential_OETorsionPotential>`
    * :ref:`OEOutOfPlanePotential <OEMolPotential_OEOutOfPlanePotential>`

   .. oe:method:: Constructors

      .. oe:api::

         OEFFPotential(const OEFFParams&)
         OEFFPotential(const OEFFPotential&)

      Constructor and copy constructor.
 
   .. oe:method:: Assignment operator

      .. oe:api::

         OEFFPotential& operator=(const OEFFPotential&)

     Assignment operator.

   .. oe:method:: Set

      .. oe:api::

         bool Set(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>&,
                  unsigned flag = OEFuncType::All) override

      This method can be used for interaction-level control of the potential terms. Interactions between
      two atoms are only included if the :ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>` test of all the atoms
      returns ``true``. The :oe:meth:`Set<OEMolPotential::OEFFPotential::Set>`
      methods must be called before the :oe:meth:`Setup<OEMolPotential::OEMolFunc::Setup>` to be effective.
