.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEMMFF94InitialCharges

.. oe:function:: OEMMFF94InitialCharges

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

      .. oe:api::

         bool OEMMFF94InitialCharges(OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

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

   Assigns integral or fractional formal atomic charges (for example +1/3 on guanidinium
   nitrogens), which are used in MMFF94 force field for obtaining final partial atomic charges
   applying bond charge increments. Requires a prior call of :oe:func:`OEChem::OEMMFFAtomTypes`.
   Charge 0.0 is assigned to any atom missing proper MMFF94 atom type.
   Returns ``true`` when charges are successfully assigned.

   .. note::

      This function assigns silently zero charges to all atoms if MMFF94 atom types are
      not assigned to the passed molecule.

   .. hint::

      :oe:func:`OEChem::OEMMFF94InitialCharges` is a low-level function, we highly recommend
      to assigning MMFF initial charges to a molecule by calling the
      :oe:func:`OEProton::OEAssignCharges` function with the
      :ref:`OEInitialCharges <OEProton_OEInitialCharges>` class of the **Quacpac TK**.
