• Docs »
  • UserInertialStarts

UserInertialStarts

OEFastROCSOrientation::UserInertialStarts allows custom coordinates to be used as starting positions for optimization. Using the 4TMN ligand from the Introduction as an example, optimization can be done at the atom highlighted in green below:

../../../_images/Tutorial_1_Figure_5.png

4TMN Ligand with atom 34 highlighted green

Before running the program, the index of the desired atom needs to be identified. This can be accomplished by loading the molecule in VIDA and turning on atom indices. In this example, the atom’s index is identified as idx 34. With this information, the x,y,z coordinates of atom idx 34 are pulled via the code snippet below. These coordinates are then used as user-defined starting coordinates:

To use the OEFastROCSOrientation::UserInertialStarts method, set OEShapeDatabaseOptions::SetInitialOrientation and then input the starts vector using OEShapeDatabaseOptions::SetUserStarts:

Warning

If using OEShapeDatabaseOptions::SetNumInertialStarts with OEShapeDatabaseOptions::SetInitialOrientation, set the number of inertial starts after the initial orientation is defined. Otherwise, the number of inertial starts will be overridden with the default value of 4.

The first argument of OEShapeDatabaseOptions::SetUserStarts is the startsCoords vector created previously. This must be of the type OEFloatVector. The second argument is the number of user-defined starting coordinates to optimize.

In this example, only 1 user-defined starting point has been set. There is no limit to the number of user-defined starts however, it should be noted that performance is inversely proportional to the number of starts being optimized.

To check that the starts have been set correctly, query OEShapeDatabaseOptions::GetInitialOrientation and OEShapeDatabaseOptions::GetNumUserStarts:

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

Opening database file 3tmn_lig.sdf ...
This example will use 1 starts
Searching for 4tmn_lig.sdf
Score for mol 0(conf 0) 0.289689 shape 0.358462 color
Score for mol 0(conf 0) 0.320501 shape 0.098301 color
Score for mol 0(conf 0) 0.283724 shape 0.012400 color
Score for mol 0(conf 0) 0.145704 shape 0.023627 color

See also

The fully modified python script used in this tutorial can be found here UserInertialStartsExample.py