.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetDistance2

.. oe:function:: OEGetDistance2

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

      .. oe:api::

         double OEGetDistance2(const OEMolBase& mol, const OEAtomBase* a,
                               const OEAtomBase* b)
         double OEGetDistance2(const OEConfBase& conf, const OEAtomBase* a,
                               const OEAtomBase* b)
         double OEGetDistance2(const OEMolBase& ma, const OEAtomBase* a,
                               const OEMolBase& mb, const OEAtomBase* b)
         double OEGetDistance2(const OEConfBase& ca, const OEAtomBase* a,
                               const OEConfBase& cb, const OEAtomBase* b)

   .. oe:language:: python

      .. oe:api:: python

         OEGetDistance2(arg1: Union[OEGraphMol,OEMol,OEQMol], a: OEAtomBase,
                        b: OEAtomBase) -> float
         OEGetDistance2(conf: OEConfBase, a: OEAtomBase, b: OEAtomBase) -> float
         OEGetDistance2(ma: Union[OEGraphMol,OEMol,OEQMol], a: OEAtomBase,
                        mb: Union[OEGraphMol,OEMol,OEQMol], b: OEAtomBase) -> float
         OEGetDistance2(ca: OEConfBase, a: OEAtomBase, cb: OEConfBase,
                        b: OEAtomBase) -> float


   These four functions are almost identical to the
   :oe:func:`OEChem::OEGetDistance` function.  However, they return the
   square of the distance between two atoms rather than distance.  When
   it is possible to use the square of the distance, this is more
   efficient.


