.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetCenterAndExtents

.. oe:function:: OEGetCenterAndExtents

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

      .. oe:api::

         void OEGetCenterAndExtents(const OEMolBase& mol, float* ctr,
                                    float* ext)
         Determines the bounding box that can encompass the molecule. The length of
         each side of the box is output in the 3-element array extents. The geometric
         center of the box is output to the center parameter.
         *mol*The molecule to calculate center and extents.
         *ctr*The output box center vector.  The vector must have a defined size of at least three.
         *ext*The output box lengths vector.  The vector must have a defined size of at least three.

   .. oe:language:: python

      .. oe:api:: python

         OEGetCenterAndExtents(mol: Union[OEGraphMol,OEMol,OEQMol],
                               center: OEFloatArray, extents: OEFloatArray) -> None


.. note::

   The center of the box is different from the center-of-mass of the molecule.


