.. _tutorial1_RetrievingResults_section:

Retrieving Results
================================================================================

Finally, when using alternative starts, the way the results are handled
should be taken into consideration. This will be unique to each specific
problem.  Here are some methods that may be useful:

.. oe:language:: c++

   .. oe:source:: tutorial1_inertialatheavyatoms_snippet.cpp
      :language:  c++
      :frag:      SNIPPET-10

   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxOverlays` allows the user to
   specify how many overlay results to return per conformer. In the above example,
   ``SetMaxOverlays`` has been set to return all possible overlays per conformer.
   This can be used along side the
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxConfs` and/or
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetLimit` options:

   .. oe:source:: tutorial1_inertialatheavyatoms_snippet.cpp
      :language:  c++
      :frag:      SNIPPET-11

.. oe:language:: python

   .. oe:source:: Tutorial1_InertialAtHeavyAtoms_Snippet.py
      :language:  python
      :frag:      SNIPPET-10

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


   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxOverlays` allows the user to
   specify how many overlay results to return per conformer. In the above example,
   ``SetMaxOverlays`` has been set to return all possible overlays per conformer.
   This can be used along side the
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxConfs` and/or
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetLimit` options:

   .. oe:source:: Tutorial1_InertialAtHeavyAtoms_Snippet.py
      :language:  python
      :frag:      SNIPPET-11

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


.. oe:language:: java

   .. oe:source:: Tutorial1_InertialAtHeavyAtoms_Snippet.java
      :language:  java
      :frag:      SNIPPET-10

   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxOverlays` allows the user to
   specify how many overlay results to return per conformer. In the above example,
   ``SetMaxOverlays`` has been set to return all possible overlays per conformer.
   This can be used along side the
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetMaxConfs` and/or
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetLimit` options:

   .. oe:source:: Tutorial1_InertialAtHeavyAtoms_Snippet.java
      :language:  java
      :frag:      SNIPPET-11

.. oe:language:: c++ python java

   In this case, the results will be filtered twice. First, only the top ``5``
   conformers for each molecule will be kept. For these ``5`` conformers ``all``
   overlays will be kept.  Finally, during sorting, only the top ``50`` scores
   of all overlays for the top ``5`` conformers per molecule will remain.

   .. warning::

      It is not recommended to return all overlay results for all conformers of
      large databases as this will leak memory rapidly.

   .. note::

      Please send any feedback about this tutorial to support@eyesopen.com using
      the tutorial title as the subject header.
