.. # split from OEBioFunctions.rst:51

.. include:: ../substitutions

.. oe:namespace:: OEBio

.. meta::
   :keywords: OECountMolComplexSites

.. oe:function:: OECountMolComplexSites

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

      .. oe:api::

         unsigned OECountMolComplexSites(const OEChem::OEMolBase& mol,
                                         const OESplitMolComplexOptions& opt = OESplitMolComplexOptions())

   .. oe:language:: python

      .. oe:api:: python

         OECountMolComplexSites(mol: Union[OEGraphMol,OEMol,OEQMol],
                                opt: OESplitMolComplexOptions = OESplitMolComplexOptions()) -> int

   Returns the number of binding sites identified in the specified :ref:`OEMolBase <OEChem_OEMolBase>`
   by identifying any ligands and then counting the number of binding sites
   they define. The optional :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` class
   can be used to control this process.

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

      .. oe:api::

         unsigned OECountMolComplexSites(const std::vector<OEChem::OEAtomBondSet>& frags)

   .. oe:language:: python

      .. oe:api:: python

         OECountMolComplexSites(frags: OEAtomBondSetVector) -> int

   Returns the number of binding sites as above, but in this case based on the
   :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` vector produced by the
   :oe:func:`OEBio::OEGetMolComplexFragments` function.

   .. seealso::

      * :ref:`section_split_mol_complex` section
      * :oe:func:`OEBio::OEGetMolComplexFragments` function
      * :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` class
      * :oe:func:`OEBio::OESplitMolComplex` function
      * :oe:func:`OEBio::OEGetMolComplexComponents` function
