.. _section_example_oechem_cliquealign:

Align molecules by clique match
================================================================================

A program that aligns a database of molecules with a reference
molecule based on the clique of matches between the reference and each
query. Clique detection is the process of finding all possible
correspondences between two graphs within a set of bounds, the upper
bound being the MCS, and in the this example, the lower bound is up to
five atoms different to the MCS.

Example
--------------------------------------------------------------------------------

.. oe:language:: c++

   .. code-block:: console

      prompt > cliquealign ligand.pdb dbase.oeb.gz output.oeb.gz

.. oe:language:: python

   .. code-block:: console

      prompt > cliquealign.py ligand.pdb dbase.oeb.gz output.oeb.gz

.. oe:language:: java

   .. code-block:: console

      prompt > CliqueAlign ligand.pdb dbase.oeb.gz output.oeb.gz

.. oe:language:: csharp

   .. code-block:: console

      prompt > CliqueAlign ligand.pdb dbase.oeb.gz output.oeb.gz

Code
--------------------------------------------------------------------------------

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`cliquealign.cpp <../../../../../sublibs/tklibs/oechem/examples/cliquealign.cpp>`

   .. only:: oepdf

      .. oe:source:: cliquealign.cpp
         :language: c++

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`cliquealign.py <../../../../../wrappers/python/examples/oechem/cliquealign.py>`

      .. literalinclude:: ../../../../../wrappers/python/examples/oechem/cliquealign.py


   .. only:: oepdf

      .. oe:source:: cliquealign.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`CliqueAlign.java <../../../../../wrappers/java/examples/openeye/examples/oechem/CliqueAlign.java>`

   .. only:: oepdf

      .. oe:source:: CliqueAlign.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`CliqueAlign.cs <../../../../../wrappers/csharp/Csharp-Examples/OEChem/CliqueAlign.cs>`

   .. only:: oepdf

      .. oe:source:: CliqueAlign.cs
         :language: csharp

.. seealso::

   * :ref:`OECliqueSearch <OEChem_OECliqueSearch>` class
   * :oe:func:`OEChem::OERMSD` function
   * :oe:func:`OEChem::OEWriteConstMolecule` function
   * :oe:func:`OEChem::OESuppressHydrogens` function
