.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetPDBAtomIndex

..  _OEChem_OEGetPDBAtomIndex:

.. oe:function:: OEGetPDBAtomIndex

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

      .. oe:api::

         unsigned int OEGetPDBAtomIndex(const char* name)

   .. oe:language:: python

      .. oe:api:: python

         OEGetPDBAtomIndex(name: str) -> int

   Returns an unsigned integer index encoding the atom name.
   The returned index is from the :oe:constns:`OEChem::OEPDBAtomName`
   namespace.
   If the PDB atom name is **not** recognized then the
   :oe:func:`OEChem::OEGetPDBAtomIndex` function returns :oe:const:`OEChem::OEPDBAtomName::UNK`.

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

      .. oe:api::

         unsigned int OEGetPDBAtomIndex(const OEAtomBase* atm)

   .. oe:language:: python

      .. oe:api:: python

         OEGetPDBAtomIndex(atm: OEAtomBase) -> int

   Returns an unsigned integer index encoding the atom name
   that is returned by the :oe:meth:`OEChem::OEAtomBase::GetName` method.
   The returned index is from the :oe:constns:`OEChem::OEPDBAtomName`
   namespace.

   .. note::

      The PDB atom name index returned by the :oe:func:`OEChem::OEGetPDBAtomIndex`
      function may be converted back into a string using
      the :oe:func:`OEChem::OEGetPDBAtomName` function.
