:orphan:

.. _section_example_fastrocs_bestshapeoverlay:

Best Shape Overlay
===================

Return the results for a database for each query sorted by their rank in that
search. The query file can be in .oeb, .sdf or .sq format.
Attaches the shape Tanimoto as SD data.  Demonstrates the
simplest possible usage of the OEShapeDatabase including keeping a
parallel list of compressed in-memory molecules to be used as output.

.. note::

   The :ref:`OEShapeDatabase <OEFastROCS_OEShapeDatabase>` does not store molecular information, only
   coordinate information from each conformer. If the original molecule
   is required for output it is the responsibility of the programmer to
   maintain the relationship of the :ref:`OEShapeDatabase <OEFastROCS_OEShapeDatabase>` indices to
   the molecule. The reason for this design decision is to not force an
   additional memory overhead for an already memory intensive
   :ref:`OEShapeDatabase <OEFastROCS_OEShapeDatabase>` object.

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

.. oe:language:: c++

   .. code-block:: console

      prompt> bestshapeoverlay <database> [<queries> ... ]

   .. only:: oehtml

      .. admonition:: Download code

         :download:`bestshapeoverlay.cpp <../../../../../sublibs/tklibs/fastrocs/examples/bestshapeoverlay.cpp>`

   .. only:: oepdf

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

.. oe:language:: python

   .. code-block:: console

      prompt> BestShapeOverlay.py <database> [<queries> ... ]
   
   .. only:: oehtml

      .. admonition:: Download code

         :download:`BestShapeOverlay.py <../../../../../wrappers/python/examples/fastrocs/BestShapeOverlay.py>`

      .. :ref:`Full listing. <listing-BestShapeOverlay.py>`

      .. literalinclude:: ../../../../../wrappers/python/examples/fastrocs/BestShapeOverlay.py


   .. only:: oepdf

      .. oe:source:: BestShapeOverlay.py
         :language: python

.. oe:language:: java

   .. code-block:: console

      prompt> BestShapeOverlay <database> [<queries> ... ]
   
   .. only:: oehtml

      .. admonition:: Download code

         :download:`BestShapeOverlay.java <../../../../../wrappers/java/examples/openeye/examples/oefastrocs/BestShapeOverlay.java>`

   .. only:: oepdf

      .. oe:source:: BestShapeOverlay.java
         :language: java

