.. _section_examples_summary_viewmdlsearch:

Depicting MDL Query Substructure Search Hits
================================================================================

A program that performs substructure search on a molecule
using an :file:`MDL` query and generates an image file
one match per molecule.

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

A description of the command line interface can be obtained by
executing the program with the --help argument.

.. oe:language:: c++

   .. code-block:: console

      prompt> viewmdlsearch --help

.. oe:language:: python

   .. code-block:: console

      prompt> python viewmdlsearch.py --help

.. oe:language:: java

   .. code-block:: console

      prompt> java ViewMDLSearch --help

.. oe:language:: csharp

   .. code-block:: console

      prompt> ViewMDLSearch --help


Will generate the following output:

.. code-block:: console

   Simple parameter list
    general options :
      -align : Align hits to query

    highlight options :
      -highlightcolor : Highlighting color
      -highlightstyle : Highlighting style

    input/output options :
      -out : Output image filename
      -query : Input query filename
      -target : Input target filename

    molecule display options :
      -aromstyle : Aromatic ring display style
      -atomcolor : Atom coloring style
      -atomlabelfontscale : Atom label font scale
      -atomprop : Atom property display
      -atomstereostyle : Atom stereo display style
      -bondcolor : Bond coloring style
      -bondprop : Bond property display
      -bondstereostyle : Bond stereo display style
      -hydrstyle : Hydrogen display style
      -linewidth : Default bond line width
      -protgroupdisp : Protective group display style
      -scale : Scaling of the depicted molecule
      -superdisp : Super atom display style
      -titleloc : Location of the molecule title

    report options :
      -colsperpage : Number of columns per page
      -pageheight : Page height
      -pageorientation : Page orientation
      -pagesize : Page size
      -pagewidth : Page width
      -rowsperpage : Number of rows per page

.. seealso::

   * :ref:`section_multipage_report` chapter


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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`viewmdlsearch.cpp <../../../../sublibs/tklibs/depict/examples/viewmdlsearch.cpp>`
         and
         :download:`viewmdlsearch.txt <../../../../sublibs/tklibs/depict/examples/viewmdlsearch.txt>`
         interface file

   .. only:: oepdf

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

      with interface file

      .. oe:source:: viewmdlsearch.txt
         :language: c++

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`viewmdlsearch.py <../../../../wrappers/python/examples/depict/viewmdlsearch.py>`

      .. literalinclude:: ../../../../wrappers/python/examples/depict/viewmdlsearch.py


   .. only:: oepdf

      .. oe:source:: viewmdlsearch.py
         :language: python


.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ViewMDLSearch.java <../../../../wrappers/java/examples/openeye/examples/oedepict/ViewMDLSearch.java>`
         and
         :download:`ViewMDLSearch.txt <../../../../wrappers/java/examples/openeye/examples/oedepict/ViewMDLSearch.txt>`
         interface file

   .. only:: oepdf

      .. oe:source:: ViewMDLSearch.java
         :language: java

      with interface file

      .. oe:source:: ViewMDLSearch.txt
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ViewMDLSearch.cs <../../../../wrappers/csharp/Csharp-Examples/OEDepict/ViewMDLSearch.cs>`

   .. only:: oepdf

      .. oe:source:: ViewMDLSearch.cs
         :language: csharp


.. seealso::

   * :ref:`chapter_multipage` and :ref:`chapter_mdlquery` chapters

   * :oe:func:`OEDepict::OEConfigureReportOptions` function
   * :oe:func:`OEDepict::OEConfigure2DMolDisplayOptions` function
   * :oe:func:`OEDepict::OEConfigureHighlightParams` function
   * :oe:func:`OEDepict::OEIsRegisteredMultiPageImageFile` function
   * :oe:func:`OEChem::OEReadMDLQueryFile` function
   * :oe:func:`OEDepict::OEPrepareDepiction` function
   * :oe:func:`OEChem::OEBuildMDLQueryExpressions` function
   * :ref:`OESubSearch <OEChem_OESubSearch>` class
   * :oe:func:`OEDepict::OEGetHighlightStyle` and :oe:func:`OEDepict::OEGetHighlightColor` functions
   * :ref:`OEReportOptions <OEDepict_OEReportOptions>` class
   * :oe:func:`OEDepict::OESetupReportOptions` function
   * :ref:`OEReport <OEDepict_OEReport>` class
   * :ref:`OE2DMolDisplayOptions <OEDepict_OE2DMolDisplayOptions>` class
   * :oe:func:`OEDepict::OESetup2DMolDisplayOptions` function
   * :oe:func:`OEChem::OEPrepareSearch` function
   * :oe:func:`OEDepict::OEPrepareAlignedDepiction` function
   * :oe:func:`OEDepict::OEPrepareDepiction` function
   * :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` class
   * :oe:func:`OEDepict::OEAddHighlighting` function
   * :oe:func:`OEDepict::OERenderMolecule` function
   * :oe:func:`OEDepict::OEDrawBorder` function
   * :oe:func:`OEDepict::OEWriteReport` function
