.. _tutorial1_AsIsStarts_section:

AsIs
================================================================================

The final method to be discussed is
:oe:meth:`OEFastROCS::OEFastROCSOrientation::AsIs`.
In this method, only one optimization is carried out at the query and the
database molecule's original coordinates. **No inertial starts are optimized.**

When using this method, the database intended to be searched must be reloaded
using :oe:meth:`OEFastROCS::OEShapeDatabase::Open`. This ensures that the
database molecules are not centered or set to an inertial frame of reference
as is usually done.  When reloading the database,
the :oe:meth:`OEFastROCS::OEFastROCSOrientation::AsIs`
constant must be passed to the ``Open`` routine:

.. oe:language:: c++

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

   Next, set the :oe:meth:`OEFastROCS::OEFastROCSOrientation::AsIs` option with
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetInitialOrientation`:

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

   This will force the number of starts and the number of inertial starts to
   both equal 1.  To check that the starts have been set correctly, query
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumStarts` and
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumInertialStarts`:

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

   The output from the modified C++ script now looks like this:

   .. code-block:: console

      Opening database file 3tmn_lig.sdf ...
      This example will use 1 starts & 1 inertial starts
      Searching for 4tmn_lig.sdf
      Score for mol 0(conf 0) 0.286799 shape 0.356514 color

   .. only:: oehtml

      .. admonition:: Download code

         The fully modified c++ script used in this tutorial can be found here
         :download:`asisstarts.cpp <../../../../../../sublibs/tklibs/fastrocs/examples/asisstarts.cpp>`

   .. only:: oepdf

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

.. oe:language:: python

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


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


   Next, set the :oe:meth:`OEFastROCS::OEFastROCSOrientation::AsIs` option with
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetInitialOrientation`:

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

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


   This will force the number of starts and the number of inertial starts to
   both equal 1.  To check that the starts have been set correctly, query
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumStarts` and
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumInertialStarts`:

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

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


   The output from the modified Python script now looks like this:

   .. code-block:: console

      Opening database file 3tmn_lig.sdf ...
      This example will use 1 starts & 1 inertial starts
      Searching for 4tmn_lig.sdf
      Score for mol 0(conf 0) 0.286799 shape 0.356514 color

   .. only:: oehtml

      .. admonition:: Download code

         The fully modified python script used in this tutorial can be found here
         :download:`AsIsStartsExample.py <../../../../../../wrappers/python/examples/fastrocs/AsIsStartsExample.py>`

   .. only:: oepdf

      .. oe:source:: AsIsStartsExample.py
         :language: python

.. oe:language:: java

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

   Next, set the :oe:meth:`OEFastROCS::OEFastROCSOrientation::AsIs` option with
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::SetInitialOrientation`:

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

   This will force the number of starts and the number of inertial starts to
   both equal 1.  To check that the starts have been set correctly, query
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumStarts` and
   :oe:meth:`OEFastROCS::OEShapeDatabaseOptions::GetNumInertialStarts`:

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

   The output from the modified Java script now looks like this:

   .. code-block:: console

      Opening database file 3tmn_lig.sdf ...
      This example will use 1 starts & 1 inertial starts
      Searching for 4tmn_lig.sdf
      Score for mol 0(conf 0) 0.286799 shape 0.356514 color

   .. only:: oehtml

      .. admonition:: Download code

         The fully modified java script used in this tutorial can be found here
         :download:`AsIsStartsExample.java <../../../../../../wrappers/java/examples/openeye/examples/oefastrocs/AsIsStartsExample.java>`

   .. only:: oepdf

      .. oe:source:: AsIsStartsExample.java
         :language: java
