.. oe:namespace:: OEShape

.. meta::
   :keywords: OESelfShape

..  _OEShape_OESelfShape:

.. oe:function:: OESelfShape

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

      .. oe:api::

         float OESelfShape(const OEChem::OEMolBase& mol,
                           unsigned int radiiApprox = OEOverlapRadii::Carbon,
                           float cradius = 1.7f)

   .. oe:language:: python

      .. oe:api:: python

         OESelfShape(mol: Union[OEGraphMol,OEMol,OEQMol], radiiApprox: int,
                     cradius: float = 1.7) -> float

   Return the self-volume term that can be used in molecular
   similarity measures. The volume is calculated as the
   first-order-gaussian overlap of all the atoms in the molecule to
   itself.

   *mol*

      The molecule to calculate the self-volume for. This molecule is
      expected to have valid 3D coordinates.

   *radiiApprox*

      The approximation to use when calculating the volume. The
      constant should be pulled from the
      :oe:constns:`OEShape::OEOverlapRadii` namespace. The default is
      to approximate all atom types as carbon with the same radius. If
      :oe:const:`OEShape::OEOverlapRadii::All` is given, the radius of
      the atom as returned by :oe:meth:`OEChem::OEAtomBase::GetRadius`
      will be used.

   *cradius*

      The radius to use when the carbon radii approximation is being
      used. The default of 1.7 is based upon the original
      [Grant-1995]_ paper to reproduce hard sphere volumes.

   .. seealso::

      * :ref:`molecular_shape_section`
