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

.. oe:namespace:: OEFF



.. meta::
   :keywords: OEMMFFAmber, MMFFAmber


.. _OEFF_OEMMFFAmber:

.. oe:class:: OEMMFFAmber

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::

      class OEMMFFAmber : public OEMolPotential::OEGenericFF2

   A hybrid force field that applies MMFF intramolecular terms to the ligand
   and Amber intramolecular terms to the host (protein), with Amber-based
   intermolecular interactions between them. This force field is intended for
   use in protein-ligand scoring and optimization workflows.

   The host molecule must have 3D coordinates assigned. The ligand must have
   3D coordinates and partial charges assigned (e.g. via
   :oe:func:`OEProton::OEAssignCharges`) before calling
   :oe:meth:`PrepMol<OEFF::OEMMFFAmber::PrepMol>`.

   .. seealso::

      * :ref:`OEMMFFAmberOptions <OEFF_OEMMFFAmberOptions>` class
      * :ref:`OEMMFFAmberComplex <OEFF_OEMMFFAmberComplex>` class

   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:`OEForceField <OEMolPotential_OEForceField>`:
    * :oe:meth:`PrepMol<OEMolPotential::OEForceField::PrepMol>`
    * :oe:meth:`Set<OEMolPotential::OEForceField::Set>`

   The following methods are publicly inherited from :ref:`OEGenericFF2 <OEMolPotential_OEGenericFF2>`:
    * :oe:meth:`AddMolFunc<OEMolPotential::OEGenericFF2::AddMolFunc>`
    * :oe:meth:`GetComponents<OEMolPotential::OEGenericFF2::GetComponents>`
    * :oe:meth:`RemoveMolFunc<OEMolPotential::OEGenericFF2::RemoveMolFunc>`

   The :ref:`OEMMFFAmber <OEFF_OEMMFFAmber>` class defines the following public methods:
    * :oe:meth:`PrepMol<OEFF::OEMMFFAmber::PrepMol>`
    * :oe:meth:`Setup<OEFF::OEMMFFAmber::Setup>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEMMFFAmber(const OEChem::OEMolBase& host)

      .. oe:language:: python

         .. oe:api:: python

            OEMMFFAmber(host: Union[OEGraphMol,OEMol,OEQMol]) -> OEMMFFAmber

      Constructs the force field using the given host molecule and default
      :ref:`OEMMFFAmberOptions <OEFF_OEMMFFAmberOptions>`.

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

         .. oe:api::

            OEMMFFAmber(const OEChem::OEMolBase& host,
                        const OEMMFFAmberOptions& options)

      .. oe:language:: python

         .. oe:api:: python

            OEMMFFAmber(host: Union[OEGraphMol,OEMol,OEQMol],
                        argOptions: OEMMFFAmberOptions) -> OEMMFFAmber

      Constructs the force field using the given host molecule and the
      specified options.

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

      .. oe:api::

         OEMMFFAmber & operator=(const OEMMFFAmber &)

      Assignment operator.



   .. oe:method:: PrepMol

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

         .. oe:api::

            bool PrepMol(OEChem::OEMolBase& mol, bool sweep = true,
                         bool warnOK = true) const

      .. oe:language:: python

         .. oe:api:: python

            PrepMol(mol: Union[OEGraphMol,OEMol,OEQMol], sweep: bool = True,
                    warnOK: bool = True) -> bool

      Prepares a ligand molecule for use with this force field by assigning
      MMFF atom types and partial charges. Returns ``true`` on success.

      ``sweep``
         If ``true``, sweeps through charge models to find one that covers
         all atoms.

      ``warnOK``
         If ``true``, suppresses warnings for atoms that cannot be typed.

   .. oe:method:: Setup

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

         .. oe:api::

            bool Setup(const OEChem::OEMolBase& mol)

      .. oe:language:: python

         .. oe:api:: python

            Setup(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Sets up the force field for the given ligand molecule. The molecule
      must have been prepared with :oe:meth:`PrepMol<OEFF::OEMMFFAmber::PrepMol>`
      before calling this method. Returns ``true`` on success.
