.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OECheckAtomValence

.. oe:function:: OECheckAtomValence

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

      .. oe:api::

         bool OECheckAtomValence(const OEAtomBase* atom)

   .. oe:language:: python

      .. oe:api:: python

         OECheckAtomValence(atom: OEAtomBase) -> bool

   Checks the atom's environment (specifically its atomic number, formal charge
   and the bond orders of the bonds it participates in) to determine if it is a
   valid atom valence whe consider the **OpenEye valence model**.
   Returns ``true`` if the atom is valid.

   .. seealso::

      * section :ref:`section_valence_openeye`
      * :oe:func:`OEChem::OECheckAtomValences` function
      * :oe:cls:`OEChem::OEIsValidAtomValence` predicate 
