.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OECalculateSurfacePotentials

..  _OESpicoli_OECalculateSurfacePotentials:

.. oe:function:: OECalculateSurfacePotentials

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

      .. oe:api::

         bool OECalculateSurfacePotentials(OESurface& surface,
                                           const OEChem::OEMolBase& target,
                                           const bool grasp = false)

   .. oe:language:: python

      .. oe:api:: python

         OECalculateSurfacePotentials(surface: OESurface,
                                      target: Union[OEGraphMol,OEMol,OEQMol],
                                      grasp: bool = False) -> bool

   Will calculate atomic potentials and assign those potentials to surface
   vertices on the supplied surface. The optional parameter `grasp` set to true
   will calculate the potentials based on the GRASP method, which is a coarser perspective
   of the potential using formal charges. 

   .. seealso::
      
      * :ref:`section-atom-potentials`
      * :ref:`surfaces_associative_data`
      * :ref:`OEColorSurfaceByPotential <OESpicoli_OEColorSurfaceByPotential>`
