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

.. oe:namespace:: OESheff

..  _OESheffield:

.. meta::
   :keywords: OESheffield, Sheffield


.. _OESheff_OESheffield:

.. oe:class:: OESheffield

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OESheffield : public OEMolPotential::OEMolFunc2

   This class represents `OESheffield`.

   .. _figure_OESheffield_Hierarchy:

   .. figure:: ../images/OESheffield.*
      :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:`OESheffield <OESheff_OESheffield>` class defines the following public methods:
    * :oe:meth:`GetDielectricDerivative<OESheff::OESheffield::GetDielectricDerivative>`  
    * :oe:meth:`Set<OESheff::OESheffield::Set>`
    * :oe:meth:`SetCharges<OESheff::OESheffield::SetCharges>`
    * :oe:meth:`SetRadii<OESheff::OESheffield::SetRadii>`
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OESheffield(double aa = 1.553149, double bb = 0.735694)
            OESheffield(const OESheffieldOptions&)
            OESheffield(const OESheffield&)

      .. oe:language:: python

         .. oe:api:: python

            OESheffield(argOptions: OESheffieldOptions) -> OESheffield
            OESheffield(arg2: OESheffield) -> OESheffield
            OESheffield(aa: float = 1.553149, bb: float = 0.735694) -> OESheffield

      Default and copy constructors.

      The first constructor uses default options and the second uses the user specific options.
      The default Sheffield model parameters are set according to 
      Grant *et. al.* (\ [Grant-2007]_\).       

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

      .. oe:api::

         OESheffield &operator=(const OESheffield &)

      Assignment operator.


   .. oe:method:: GetDielectricDerivative

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

         .. oe:api::

            double GetDielectricDerivative(const double* x, double solv_diel) const

      .. oe:language:: python

         .. oe:api:: python

            GetDielectricDerivative(x: OEDoubleArray, solv_diel: float) -> float

      Returns the derivative of the solvation energy with respect to the solvent
      dielectric constant.

   .. oe:method:: Set

      .. oe:api::

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

      Sets the unary and binary
      predicates respectively which might be used to modify the results of the calculations.
      Unary predicate might be used to selectively exclude a subset of atoms from the 
      calculation of molecule "self" energy, while the binary predicate can include
      only selected pairs of atoms in the calculation of solvation energy. By default
      when no predicates are set, atomic pairs are included in the solvation energy of 
      a molecule.

   .. oe:method:: SetCharges

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

         .. oe:api::

            void SetCharges(float*)

      .. oe:language:: python

         .. oe:api:: python

            SetCharges(ch: OEFloatArray) -> None

      Atomic charges are taken from the provided external array.

   .. oe:method:: SetRadii

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

         .. oe:api::

            void SetRadii(float*)

      .. oe:language:: python

         .. oe:api:: python

            SetRadii(ra: OEFloatArray) -> None

      Atomic radii values are taken from the provided external array.
