.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetResidueIndex

.. oe:function:: OEGetResidueIndex

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

      .. oe:api::

         unsigned int OEGetResidueIndex(const char* name)
         unsigned int OEGetResidueIndex(const OEResidue& res)
         unsigned int OEGetResidueIndex(const OEAtomBase* atm)

   .. oe:language:: python

      .. oe:api:: python

         OEGetResidueIndex(name: str) -> int
         OEGetResidueIndex(res: OEResidue) -> int
         OEGetResidueIndex(atm: OEAtomBase) -> int


   Returns the **OEChem TK** PDB residue name index.  The resulting value is
   specified by the :oe:constns:`OEChem::OEResidueIndex` namespace.  If
   the residue name is not recognized internally by **OEChem TK** this
   function returns the value zero.

   .. seealso::

      * :oe:constns:`OEChem::OEResidueIndex` namespace
      * :ref:`OEResidue <OEChem_OEResidue>` class
      * :oe:func:`OEChem::OEAtomGetResidue` function
