.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGasteigerInitialCharges

.. oe:function:: OEGasteigerInitialCharges

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

      .. oe:api::

         bool OEGasteigerInitialCharges(OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEGasteigerInitialCharges(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   Calculates the seed charge partial charges used by the
   Marsilli-Gasteiger partial charge algorithm.

   Gasteiger initial charges assign the partial charge of ``-0.5`` to
   atoms of type :oe:const:`OEChem::OETriposType::Oco2`, *i.e.*
   carboxylate oxygens, and use the formal charge as the partial charge
   on all other atoms except those in conjugated rings.  For conjugated
   ring systems, consisting of Tripos atom types
   :oe:const:`OEChem::OETriposType::C2`,
   :oe:const:`OEChem::OETriposType::Car`,
   :oe:const:`OEChem::OETriposType::N2`,
   :oe:const:`OEChem::OETriposType::Nar`,
   :oe:const:`OEChem::OETriposType::Npl3` and
   :oe:const:`OEChem::OETriposType::Nam`, the sum of the formal charges of
   the atoms in the ring system are divided equally amongst all atoms in
   the ring system.  For example, the five heavy atoms in imidazolium
   (``[nH+]1c[nH]cc1``), each get a partial charge of ``0.2``. O

   .. warning::

      It is not necessary to call :oe:func:`OEChem::OEGasteigerInitialCharges`
      function prior to calling :oe:func:`OEChem::OEGasteigerPartialCharges`
      function.

   .. seealso::

      * :ref:`section_charges_Gasteiger` section
      * :oe:func:`OEChem::OETriposAtomTypes` to determine Tripos atom types

