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

.. oe:namespace:: OEEon

.. meta::
   :keywords: OEEonPBFunc, EonPBFunc


.. _OEEon_OEEonPBFunc:

.. oe:class:: OEEonPBFunc

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEEonPBFunc : public OEMolPotential::OEMolFunc0

   This class enables computation of electrostatic potential similarity. 

   The :ref:`OEEonPBFunc <OEEon_OEEonPBFunc>` defines the following public methods:
    
    * :ref:`Setup<OEEon_OEEonPBFunc_Setup>`
    * :ref:`SetupRef<OEEon_OEEonPBFunc_SetupRef>`
    * :ref:`NumVar<OEEon_OEEonPBFunc_NumVar>`
    * :ref:`GetFComponents<OEEon_OEEonPBFunc_GetFComponents>`
    * :ref:`operator()<OEEon_OEEonPBFunc_operator>`
    * :ref:`Overlap<OEEon_OEEonPBFunc_Overlap>`
    * :ref:`CreateCopy<OEEon_OEEonPBFunc_CreateCopy>`


   Public methods inherited from the parent class can be found in the :ref:`OEMolPotential::OEMolFunc0 <OEMolPotential_OEMolFunc0>`.


   .. oe:method:: Constructors

      Default, copy constructors:

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

         .. oe:api::

            OEEonPBFunc(const OEEonPBOptions& opts = OEEonPBOptions())
            OEEonPBFunc(const OEEonPBFunc&)

      .. oe:language:: python

         .. oe:api:: python

            OEEonPBFunc(opts: OEEonPBOptions = OEEonPBOptions()) -> OEEonPBFunc
            OEEonPBFunc(arg2: OEEonPBFunc) -> OEEonPBFunc

   .. oe:method:: Destructor
      
      .. oe:api::

         ~OEEonPBFunc()


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

      .. oe:api::

         OEEonPBFunc& operator=(const OEEonPBFunc&)

      Assignment operator.

   ..   _OEEon_OEEonPBFunc_Setup:

   .. oe:method:: Setup

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

         .. oe:api::

            bool Setup(const OEChem::OEMolBase& fitMol)

      .. oe:language:: python

         .. oe:api:: python

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

      Sets up the fit molecule for Poisson-Boltzmann overlap calculations.
      The molecule must have 3D coordinates and partial charges assigned.

   ..   _OEEon_OEEonPBFunc_SetupRef:

   .. oe:method:: SetupRef

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

         .. oe:api::

            bool SetupRef(const OEChem::OEMolBase& refMol)

      .. oe:language:: python

         .. oe:api:: python

            SetupRef(refMol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Sets up the reference molecule for Poisson-Boltzmann overlap calculations.
      The molecule must have 3D coordinates and partial charges assigned.

   ..   _OEEon_OEEonPBFunc_NumVar:

   .. oe:method:: NumVar

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

         .. oe:api::

            unsigned NumVar() const

      .. oe:language:: python

         .. oe:api:: python

            NumVar() -> int

      Returns the number of variables (degrees of freedom) for the current fit molecule.

   ..   _OEEon_OEEonPBFunc_CreateCopy:

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEEonPBFunc* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEEonPBFunc

      Creates and returns a deep copy of this object.

   ..   _OEEon_OEEonPBFunc_GetFComponents:

   .. oe:method:: GetFComponents

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

         .. oe:api::

            OESystem::OEIterBase<OEOpt::OEFComponent>* GetFComponents(const double* coords)

      .. oe:language:: python

         .. oe:api:: python

            GetFComponents(coords: float) -> Iterable[OEFComponent]

      Returns an iterator over the force components at the given coordinates.
      The fit molecule must have been set up via
      :oe:meth:`Setup<OEEon::OEEonPBFunc::Setup>`.

   ..   _OEEon_OEEonPBFunc_operator:

   .. oe:method:: operator()

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

         .. oe:api::

            double operator()(const double* coords)

      .. oe:language:: python

         .. oe:api:: python

            __call__(coords: OEDoubleArray) -> float

      Evaluates the Poisson-Boltzmann potential overlap function at the given
      coordinates. The fit molecule must have been set up via
      :oe:meth:`Setup<OEEon::OEEonPBFunc::Setup>`.

   ..   _OEEon_OEEonPBFunc_Overlap:

   .. oe:method:: Overlap

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

         .. oe:api::

            bool Overlap(const double* coords, OEEonPBResults& results)
            bool Overlap(const OEChem::OEMolBase& fitMol,
                         OEEonPBResults& results)

      .. oe:language:: python

         .. oe:api:: python

            Overlap(coords: OEDoubleArray, results: OEEonPBResults) -> bool
            Overlap(fitMol: Union[OEGraphMol,OEMol,OEQMol],
                    results: OEEonPBResults) -> bool

      These methods compute Poisson–Boltzmann (PB) potential overlap between reference and fit molecules. The first one assumes that the fit molecule has already been set up using Setup method. The second one directly inputs the fit molecule and does this setup internally.

  