.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetMolDBIdx

.. oe:function:: OEGetMolDBIdx

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

      .. oe:api::

         unsigned int OEGetMolDBIdx(const OESystem::OEBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEGetMolDBIdx(mol: OEBase) -> int

   Returns the index used to retrieve the molecule from a
   :ref:`OEMolDatabase <OEChem_OEMolDatabase>`. Returns ``(unsigned int)-1`` if
   ``mol`` did not actually originate from a
   :ref:`OEMolDatabase <OEChem_OEMolDatabase>`.


