.. _oemedchem_examples_matchedpairtransform:

Matched Pair analysis and transformations
================================================================================

A program that loads a previously generated Matched Pair index, then reads
an input set of structures and outputs transformed structures based on the matched pairs discovered during indexing.

.. figure:: images/searchmmp.*
   :align:  center
   :width:  400pt

   **Schematic representation of the Matched Pair Analysis process**

.. seealso::

   * :ref:`OEMatchedPairAnalyzer <OEMedChem_OEMatchedPairAnalyzer>` class
   * :ref:`OEMatchedPairAnalyzerOptions <OEMedChem_OEMatchedPairAnalyzerOptions>` class
   * :oe:func:`OEMedChem::OEMatchedPairApplyTransforms` function

Command Line Interface
----------------------

.. oe:language:: c++

   .. code-block:: console

      prompt> MatchedPairTransform -mmpidx index.mmpidx -input input.sdf -output output.sdf

.. oe:language:: python

   .. code-block:: console

      prompt> MatchedPairTransform.py -mmpidx index.mmpidx -input input.sdf -output output.sdf

.. oe:language:: java

   .. code-block:: console

      prompt> MatchedPairTransform -mmpidx index.mmpidx -input input.sdf -output output.sdf

.. oe:language:: csharp

   .. code-block:: console

      prompt> MatchedPairTransform -mmpidx index.mmpidx -input input.sdf -output output.sdf

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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`MatchedPairTransform.cpp <../../../../sublibs/tklibs/medchem/examples/MatchedPairTransform.cpp>`

   .. only:: oepdf

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`MatchedPairTransform.py <../../../../wrappers/python/examples/medchem/MatchedPairTransform.py>`

   ..   literalinclude:: ../../../../wrappers/python/examples/medchem/MatchedPairTransform.py

   .. only:: oepdf

      .. oe:source:: MatchedPairTransform.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`MatchedPairTransform.java <../../../../wrappers/java/examples/openeye/examples/oemedchem/MatchedPairTransform.java>`

   .. only:: oepdf

      .. oe:source:: MatchedPairTransform.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`MatchedPairTransform.cs <../../../../wrappers/csharp/Csharp-Examples/OEMedChem/MatchedPairTransform.cs>`

   .. only:: oepdf

      .. oe:source:: MatchedPairTransform.cs
         :language: csharp
