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

.. oe:namespace:: OEMolMMFF



.. meta::
   :keywords: OEMMFFOutOfPlane, MMFFOutOfPlane


.. _OEMolMMFF_OEMMFFOutOfPlane:

.. oe:class:: OEMMFFOutOfPlane

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEMMFFOutOfPlane : public OEMolPotential::OEMolFunc2

   The :ref:`OEMMFFOutOfPlane <OEMolMMFF_OEMMFFOutOfPlane>` class defines out-of-plane (improper torsion) interaction function using the functional forms used in MMFF94 force field. The function can be initialized with parameters defined in MMFF94 (:ref:`OEMMFFParams <OEMolMMFF_OEMMFFParams>`) or MMFF94s (:ref:`OEMMFF94sParams <OEMolMMFF_OEMMFF94sParams>`) force field, or a different set of user defined parameters (:ref:`OEFFParams <OEMolPotential_OEFFParams>`) during construction.

   .. _figure_OEMMFFOutOfPlane_Hierarchy:

   .. figure:: ../images/OEMMFFOutOfPlane.*
      :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:`Setup<OEMolPotential::OEMolFunc::Setup>`

   The :ref:`OEMMFFOutOfPlane <OEMolMMFF_OEMMFFOutOfPlane>` class defines the following public methods:
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEMMFFOutOfPlane(const OEMMFFOutOfPlane &)
            OEMMFFOutOfPlane(const OEMolPotential::OEFFParams &)

      .. oe:language:: python

         .. oe:api:: python

            OEMMFFOutOfPlane(arg2: OEFFParams) -> OEMMFFOutOfPlane
            OEMMFFOutOfPlane(arg2: OEMMFFOutOfPlane) -> OEMMFFOutOfPlane

      Default and copy constructors.

      Constructs an :ref:`OEMMFFOutOfPlane <OEMolMMFF_OEMMFFOutOfPlane>` instance using the specified set of parameters.

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

      .. oe:api::

         OEMMFFOutOfPlane &operator=(const OEMMFFOutOfPlane &)

      The assignment operator.

      .. _OEMolMMFF_OEMMFFOutOfPlane_Set:

      Assignment operator.


      .. oe:method:: Set

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

            .. oe:api::

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

         .. oe:language:: python

            .. oe:api:: python

               Set(pred: OEUnaryAtomPred) -> bool

      This method allows interaction-level control of the out-of-plane term. The predicate passed is used to test all improper-torsions in the molecule. If the predicate returns ``true`` for all four atoms engaged in the improper-torsion interaction, then the interaction is included. Conversely, if the predicate test of any one of the four atoms of the improper-torsion returns ``false`` then the interaction will be excluded from calculation. The :oe:meth:`Set<OEMolMMFF::OEMMFFOutOfPlane::Set>` method must be called before the :oe:meth:`Setup<OEMolPotential::OEMolFunc::Setup>` for it to be effective.

