AsIs¶
The final method to be discussed is
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 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 OEFastROCSOrientation::AsIs
constant must be passed to the Open
routine:
string dbname = argv[1];
OEThrow.Info("Opening database file " + dbname);
OEShapeDatabase dbase;
OEMolDatabase moldb;
moldb.Open(dbname);
dbase.Open(moldb, OEFastROCSOrientation::AsIs);
Next, set the OEFastROCSOrientation::AsIs
option with
OEShapeDatabaseOptions::SetInitialOrientation
:
opts.SetInitialOrientation(OEFastROCSOrientation::AsIs);
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
OEShapeDatabaseOptions::GetNumStarts
and
OEShapeDatabaseOptions::GetNumInertialStarts
:
if(opts.GetInitialOrientation() == OEFastROCSOrientation::AsIs)
{
unsigned int numStarts = opts.GetNumStarts();
unsigned int numInertialStarts = opts.GetNumInertialStarts();
OEThrow.Info("This example will use %u starts & %u inertial starts", numStarts, numInertialStarts);
}
The output from the modified C++ script now looks like this:
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
Download code
The fully modified c++ script used in this tutorial can be found here
asisstarts.cpp