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

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEDetermineConnectivity

.. oe:function:: OEDetermineConnectivity

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

      .. oe:api::

         void OEDetermineConnectivity(OEMolBase& mol, bool same_altloc = true)

   .. oe:language:: python

      .. oe:api:: python

         OEDetermineConnectivity(mol: Union[OEGraphMol,OEMol,OEQMol],
                                 same_altloc: bool = True) -> None

   Perceives the covalent bonds of a molecule from 3D coordinates.  This
   routine creates a bond between any pair of atoms that are closer than
   the sum of their covalent radii plus a slop factor of ``0.45``
   Angstroms.  The covalent radii of each atom are as defined by the
   Cambridge Crystallographic Database (http://www.ccdc.cam.ac.uk), and are those returned by the
   **OEChem TK** function :oe:func:`OEChem::OEGetCovalentRadius`.  Bonds are not
   created by atoms separated by less than ``0.4`` |A|.  All bonds are
   created with bond order ``1``.  The **OEChem TK** function
   :oe:func:`OEChem::OEPerceiveBondOrders` may be used to assign bond
   orders from the 3D geometry and connectivity.

   .. seealso::

      * :ref:`chapter_connectivity` chapter and :ref:`section_connectivity_bond_order_perception` section
