.. include:: ../substitutions

.. oe:namespace:: OEMolProp

.. meta::
   :keywords: OEGetAnionicCarbonCount

.. _OEMolProp_OEGetAnionicCarbonCount:

.. oe:function:: OEGetAnionicCarbonCount

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

      .. oe:api::

         unsigned int OEGetAnionicCarbonCount(const OEChem::OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEGetAnionicCarbonCount(mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

   Returns the number of anionic carbons in a molecule. Anionic carbon is
   defined as an aromatic carbon that has negative 'formal charge'.

   .. seealso::

      * :ref:`filter_files_anionic_carbon` subsection describing
        filter files
      * :oe:meth:`OEChem::OEAtomBase::IsAromatic` and :oe:meth:`OEChem::OEAtomBase::GetFormalCharge` methods
        in the **OEChem TK** manual
