.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OETriposAtomNames

.. oe:function:: OETriposAtomNames

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

      .. oe:api::

         void OETriposAtomNames(OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OETriposAtomNames(mol: Union[OEGraphMol,OEMol,OEQMol]) -> None

   Sets the atom name property of each atom, using the
   :oe:meth:`OEChem::OEAtomBase::SetName` method, to follow the convention
   typically followed in Sybyl .mol2 files.  Each atom is named by its
   atomic symbol (or ``Du`` for element zero) followed by a sequential
   index per atomic number.  For example, the first carbon in the
   molecule is named ``C1``, the second is named ``C2``, and so on.  Similarly,
   the first oxygen is named ``O1`` and so on.  The 'atom name' property may be
   retrieved using the :oe:meth:`OEChem::OEAtomBase::GetName` method.

   The ordering of atoms is taken from the iterator returned by the
   :oe:meth:`OEChem::OEMolBase::GetAtoms` method (and may therefore be
   changed by using :oe:meth:`OEChem::OEMolBase::OrderAtoms`) and is
   unchanged by this function.

   .. seealso::

      .. oe:language:: c++

         * Example program :ref:`printatomnames.cpp<section_example_oechem_printatomnames>`

      .. oe:language:: python

         * Example program :ref:`printatomnames.py<section_example_oechem_printatomnames>`

      .. oe:language:: java

         * Example program :ref:`PrintAtomNames.java<section_example_oechem_printatomnames>`

      .. oe:language:: csharp

         * Example program :ref:`PrintAtomNames.cs<section_example_oechem_printatomnames>`

      * :oe:func:`OEChem::OETriposAtomTypes`
      * :oe:func:`OEChem::OETriposAtomTypeNames`

