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

.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEMakeAccessibleSurface

.. oe:function:: OEMakeAccessibleSurface

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

      .. oe:api::

         bool OEMakeAccessibleSurface(OESurface& surf,
                                      const OEChem::OEMolBase& mol,
                                      float resolution = 0.5f,
                                      float probeRadius = 1.4f,
                                      unsigned int polygonizeMethod = OEPolygonizeMethod::Default)
         bool OEMakeAccessibleSurface(OESurface& surf, const float* coords,
                                      const float* radii, int natoms,
                                      float resolution = 0.5f,
                                      float probeRadius = 1.4f,
                                      unsigned int polygonizeMethod = OEPolygonizeMethod::Default)

   .. oe:language:: python

      .. oe:api:: python

         OEMakeAccessibleSurface(surf: OESurface,
                                 mol: Union[OEGraphMol,OEMol,OEQMol],
                                 resolution: float = 0.5,
                                 probeRadius: float = 1.4,
                                 polygonizeMethod: int) -> bool
         OEMakeAccessibleSurface(surf: OESurface, coords: OEFloatArray,
                                 radii: OEFloatArray, natoms: int,
                                 resolution: float = 0.5,
                                 probeRadius: float = 1.4,
                                 polygonizeMethod: int) -> bool

   Fill the surface surf with the accessible surface for the molecule
   mol. See the :ref:`generation_molecules` section for a full
   description of the accessible surface. The molecule must have valid
   3D coordinates assigned. The atomic radius of each atom in the
   molecule should already be set before calling this function. The
   suggested radii can be set with
   :oe:func:`OEChem::OEAssignBondiVdWRadii`.

   The resolution is the grid spacing to use during surface
   construction. This is typically scaled with the size of the
   molecule. For most molecules, 0.5 is good.

   The default probeRadius is 1.4 |A|, the radius of water approximated as
   a sphere.

   The ``polygonizeMethod`` argument specifies the method to be used when generating
   the triangles for the surface.  Allowed values are from the 
   :oe:constns:`OESpicoli::OEPolygonizeMethod` namespace.

   The overloaded version of the function takes coordinate and radii
   arrays, ``coords`` and ``radii`` respectively, of length ``natoms``
   to create the accessible surface.

   This function will set the vertex normals and atoms arrays on the
   surface.
   
   .. seealso::

      * :ref:`generation_molecules`
      * The :oe:constns:`OESpicoli::OEPolygonizeMethod` namespace

