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[0];
        System.out.println("Opening database file " + dbname + " ...");
        OEShapeDatabase dbase = new OEShapeDatabase();
        OEMolDatabase moldb = new OEMolDatabase();

        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) {
            long numStarts = opts.GetNumStarts();
            long numInertialStarts = opts.GetNumInertialStarts();
            System.out.println("This example will use " + numStarts + " starts & " + numInertialStarts + " inertial starts");
        }

The output from the modified Java 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 java script used in this tutorial can be found here AsIsStartsExample.java