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

.. oe:namespace:: OEMolPotential

.. meta::
   :keywords: OEStretchPotential, OEMolFunc2


.. _OEMolPotential_OEStretchPotential:

.. oe:class:: OEStretchPotential

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEStretchPotential : public virtual OEMolPotential::OEFFPotential

   The :ref:`OEStretchPotential <OEMolPotential_OEStretchPotential>` defines an interface
   all bond stretching force field interaction potentials.

   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 following methods are publicly inherited from :ref:`OEFFPotential <OEMolPotential_OEFFPotential>`:
    * :oe:meth:`Set<OEMolPotential::OEFFPotential::Set>`
    
   The :ref:`OEStretchPotential <OEMolPotential_OEStretchPotential>` implements the following methods:
    * :oe:meth:`Set<OEMolPotential::OEStretchPotential::Set>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OEStretchPotential(const OEFFParams&)
            OEStretchPotential(const OEStretchPotential&)

      .. oe:language:: python

         .. oe:api:: python

            OEStretchPotential(fp: OEFFParams) -> OEStretchPotential
            OEStretchPotential(arg2: OEStretchPotential) -> OEStretchPotential

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

      .. oe:api::

         OEStretchPotential& operator=(const OEStretchPotential&)

     Assignment operator.

   .. oe:method:: Set

      .. oe:api::

         bool Set(const OESystem::OEUnaryPredicate<OEChem::OEBondBase>&,
                  unsigned int flag = OEFuncType::Stretch) override

      This method can be used for interaction-level control of the bond stretching terms. Interactions between two 
      atoms are only included if the test of the unary bond predicate returns ``true``. 
      The :oe:meth:`Set<OEMolPotential::OEStretchPotential::Set>` method must be called before the 
      :oe:meth:`Setup<OEMolPotential::OEMolFunc::Setup>` for it to be effective.
