.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetAtomicNum

.. oe:function:: OEGetAtomicNum

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

      .. oe:api::

         unsigned int OEGetAtomicNum(const char* sym)

   .. oe:language:: python

      .. oe:api:: python

         OEGetAtomicNum(sym: str) -> int

   Returns the atomic number associated with the specified atomic symbol.
   The specified buffer ``sym`` must contain a string terminated by either
   a space or a NULL, ``\0``, character.  Zero-length strings, strings
   longer than two characters or unrecognized symbols all make the function
   return ``0``.  The comparison is case insensitive, such that the first
   character need not be uppercase, and the second character (if one
   exists) need not be lowercase.

   This function returns the value ``1`` for symbols 'H', 'D' and 'T'.


   .. oe:api: # IGNORE  (privatized)

      OEFuzzy OEGetAtomicNum(const OEExprBase *, unsigned int &anum)
