.. oe:namespace:: OEProton


.. meta::
   :keywords: OEELFCharges, OEELFCharges, ELF, ChargeEngine


.. _OEProton_OEELFCharges:

.. oe:class:: OEELFCharges

   .. oe:api::


      class OEELFCharges : public OEChargeEngineBase

   Charge engine input to :oe:func:`OEAssignCharges<OEProton::OEAssignCharges>`
   to assign charges with the user-specified charge engine
   using the electrostatically least-interacting functional group (ELF) technique.

   The input must be a 3D multi-conformer molecule and conform to the
   requirements of the specified charge engine. Graph-based charge engines
   are not appropriate for use with ELF because they do not take 3D conformation
   into account.

   .. seealso:
      :ref:`chapter_molchargetheory` for an explanation of ELF

   The following methods are publicly inherited from :ref:`OEChargeEngineBase <OEProton_OEChargeEngineBase>`:

   ======================================================================================= ======================================================================================= =======================================================================================
   :oe:meth:`operator!=<OEProton::OEChargeEngineBase::operator!=>`                         :oe:meth:`GetName<OEProton::OEChargeEngineBase::GetName>`                               :oe:meth:`SetRepairRequestedHint<OEProton::OEChargeEngineBase::SetRepairRequestedHint>`
   :oe:meth:`operator==<OEProton::OEChargeEngineBase::operator==>`                         :oe:meth:`GetRepairRequestedHint<OEProton::OEChargeEngineBase::GetRepairRequestedHint>` :oe:meth:`TransferCharge<OEProton::OEChargeEngineBase::TransferCharge>`
   :oe:meth:`CheckCharges<OEProton::OEChargeEngineBase::CheckCharges>`                     :oe:meth:`GetRequirements<OEProton::OEChargeEngineBase::GetRequirements>`
   :oe:meth:`CreateCopy<OEProton::OEChargeEngineBase::CreateCopy>`                         :oe:meth:`IsValid<OEProton::OEChargeEngineBase::IsValid>`
   :oe:meth:`GetExpectValidMol<OEProton::OEChargeEngineBase::GetExpectValidMol>`           :oe:meth:`SetExpectValidMol<OEProton::OEChargeEngineBase::SetExpectValidMol>`
   ======================================================================================= ======================================================================================= =======================================================================================


   The following classes derive from this class:
    * :ref:`OEAM1BCCELF10Charges <OEProton_OEAM1BCCELF10Charges>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEELFCharges(const OEELFCharges& rhs)
            OEELFCharges(const OEChargeEngineBase& chargeEngine,
                         unsigned limit = 10, double percentage = 2.0,
                         bool selectedConfs = false)

      .. oe:language:: python

         .. oe:api:: python

            OEELFCharges(chargeEngine: OEChargeEngineBase, limit: int = 10,
                         percentage: float = 2.0, selectedConfs: bool = False) -> OEELFCharges
            OEELFCharges(rhs: OEELFCharges) -> OEELFCharges

      Constructor. Parameters also have getter and setter methods.

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

      .. oe:api::

         OEELFCharges & operator=(const OEELFCharges & rhs)

      Assignment operator.


   .. oe:method:: GetLimit

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

         .. oe:api::

            unsigned GetLimit() const

      .. oe:language:: python

         .. oe:api:: python

            GetLimit() -> int

      Returns the number of diverse conformers to select from the
      least interacting conformers set.

      .. seealso:
         :oe:meth:`SetLimit<OEProton::OEELFCharges::SetLimit>`

   .. oe:method:: GetPercentage

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

         .. oe:api::

            double GetPercentage() const

      .. oe:language:: python

         .. oe:api:: python

            GetPercentage() -> float

      Returns the percentage of input conformers to select as the
      electrostatically least-interacting set.

      .. seealso:
         :oe:meth:`SetPercentage<OEProton::OEELFCharges::SetPercentage>`

   .. oe:method:: GetReturnSelectedConfs

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

         .. oe:api::

            bool GetReturnSelectedConfs() const

      .. oe:language:: python

         .. oe:api:: python

            GetReturnSelectedConfs() -> bool

      Returns ``true`` if just the selected diverse conformers will be returned.
      Otherwise all the original conformers are returned.

      .. seealso:
         :oe:meth:`SetReturnSelectedConfs<OEProton::OEELFCharges::SetReturnSelectedConfs>`

   .. oe:method:: SetLimit

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

         .. oe:api::

            void SetLimit(unsigned limit)

      .. oe:language:: python

         .. oe:api:: python

            SetLimit(limit: int) -> None

      Sets the number of diverse conformers to select from the
      least interacting conformers set in the second step of the ELF algorithm.

   .. oe:method:: SetPercentage

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

         .. oe:api::

            void SetPercentage(double pct)

      .. oe:language:: python

         .. oe:api:: python

            SetPercentage(pct: float) -> None

      Sets the percentage of input conformers to select as the
      electrostatically least-interacting set in the first step of the ELF
      algorithm.

   .. oe:method:: SetReturnSelectedConfs

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

         .. oe:api::

            void SetReturnSelectedConfs(bool selected = true)

      .. oe:language:: python

         .. oe:api:: python

            SetReturnSelectedConfs(selected: bool = True) -> None

      Determines whether only the selected diverse conformers will be returned.
