OEScoreBase

,, oe:api:

class OEScoreBase

OEScoreBase is a pure virtual class that defines an API for scoring molecules.

This pure virtual class is implemented by OEScore.

This class must be initialized with either a receptor (see Receptors chapter) or a protein and box enclosing the active site with the OEScoreBase::Initialize prior to calling any of the scoring methods.

The following free functions take OEScoreBase objects:

OESetEnergyScore OESetEnergyScoreComponent
OESetSDScore OESetSDScoreComponent
OESetScore OESetScoreComponent

Destructor

virtual ~OEScoreBase()

Destructor.

IsInitialized

virtual bool IsInitialized() const  = 0

Returns true if this object has been successfully initialized and is ready to score poses.

Initialize

Sets up this object to score poses within an active site. Initialization can be done with either a receptor or a protein and box enclosing the active site.

Both overloads return true if setup was successful.

virtual bool Initialize(const OEChem::OEMolBase& receptor)  = 0

This overload of OEScoreBase::Initialize takes a receptor.

receptor
A receptor describing the active site of the target protein (see Receptors chapter). This object does not depend upon receptor once this call is completed (i.e. receptor can be destroyed after calling this method).
virtual bool Initialize(const OEChem::OEMolBase& protein,
                        const OEBoxBase& box)  = 0

This overload of OEScoreBase::Initialize takes a protein and box.

protein
The structure of a target protein. This object does not depend upon receptor once this call is completed (i.e. protein can be destroyed after calling this method).
box
An OEBoxBase enclosing active site.

GetName

virtual std::string GetName() const  = 0

Returns the name of the scoring function.

GetComponentNames

virtual OESystem::OEIterBase<const std::string>* GetComponentNames() const  = 0

Returns the name of the scoring function components.

GetHighScoresAreBetter

virtual bool GetHighScoresAreBetter() const  = 0

Returns true if higher scores indicate a better result.

Returns false if lower scores indicate a better result.

ScoreLigand

virtual float ScoreLigand(const OEChem::OEMolBase& pose)  = 0

Scores a pose within the active site.

pose
Structure of a pose within the active site

If an error occurs this function will return FLT_MAX if OEScoreBase::GetHighScoresAreBetter returns false or -FLT_MAX otherwise.

ScoreAtom

virtual float ScoreAtom(const OEChem::OEAtomBase& atom,
                        const OEChem::OEMolBase& pose)  = 0

Returns the score of an atom of a given pose within the active site.

atom
Atom of pose to score.
pose
Structure of a pose within the active site

If an error occurs this function will return FLT_MAX if OEScoreBase::GetHighScoresAreBetter returns false or -FLT_MAX otherwise.

ScoreLigandComponent

virtual float ScoreLigandComponent(const OEChem::OEMolBase& pose,
                                   std::string compName)  = 0

Returns the given component’s contribution to the total score.

pose
Structure of a pose within the active site
compName
Name of the score component to report. Name must be one returned by OEScoreBase::GetComponentNames.

If an error occurs this function will return FLT_MAX if OEScoreBase::GetHighScoresAreBetter returns false or -FLT_MAX otherwise.

ScoreAtomComponent

virtual float ScoreAtomComponent(const OEChem::OEAtomBase& atom,
                                 const OEChem::OEMolBase& pose,
                                 std::string compName)  = 0

Returns the given components contribution to the score of a given atom score.

atom
Atom of pose to score.
pose
Structure of a pose within the active site
compName
Name of the score component to report. Name must be one returned by OEScoreBase::GetComponentNames.

If an error occurs this function will return FLT_MAX if OEScoreBase::GetHighScoresAreBetter returns false or -FLT_MAX otherwise.

SystematicSolidBodyOptimize

Performs a solid body optimization on the pose or poses passed. Three rotational and three translational degrees of freedom are explored, the pose (and protein) are held rigid. A plus and minus rotational step is taken for each rotational and translational degree of freedom (for a total of 3^6 or 729 positions tested for each pose).

Both overloads return true if no error occurred.

virtual bool SystematicSolidBodyOptimize(OEChem::OEMCMolBase& poses,
                                         unsigned int searchResolution
                                           = OESearchResolution::Default)  = 0

This overload of OEScoreBase::SystematicSolidBodyOptimize optimizes all poses of an OEMCMolBase.

poses
An OEMCMolBase with conformers that are poses within the active site to be optimized.
searchResolution
Search resolution of the optimization (see OESearchResolution constant namespace).

The optimized poses are returned in poses. This poses retain their original ordering and are not ordered by the new optimized score.

virtual bool SystematicSolidBodyOptimize(OEChem::OEMolBase& pose,
                                         unsigned int searchResolution
                                           = OESearchResolution::Default)  = 0

This overload of OEScoreBase::SystematicSolidBodyOptimize optimizes a single pose.

pose
A pose within the active site to be optimized.
searchResolution
Search resolution of the optimization (see OESearchResolution constant namespace).

AnnotatePose

Adds VIDA scoring annotation to the pose or poses passed.

The annotated poses must be written out in either oeb or oeb.gz format and are only viewable in VIDA.

virtual bool AnnotatePose(OEChem::OEMolBase& pose)  = 0

This overload of OEScoreBase::AnnotatePose annotates a single pose.

pose
Structure of a pose within the active site
virtual bool AnnotatePose(OEChem::OEMCMolBase& poses)  = 0

This overload of OEScoreBase::AnnotatePose annotates all poses of a given ligand.

poses
An OEMCMolBase the conformers of which are poses within the active site.

CacheScoringSetup

This function caches the current scoring setup of the OEScoreBase object onto a receptor object. When another OEScoreBase object is initialized with this receptor the it will read in the cached score data rather than recalculating it from scratch, thus improving the startup time of the OEScoreBase object.

bool CacheScoringSetup(OEChem::OEMolBase& receptor, bool clearOldData = true)
receptor
A receptor object. This must be the same receptor object the OEScoreBase object was initialized with or an exact copy.
clearOldData
Flag to clear cached data from a prior call to CacheScoringSetup with this receptor. The cached data can be quite sizable (hundreds of megabytes), so leaving this flag at the default value of true is recommended.

Note

The cached score data on a receptor will be saved when the receptor is written to a file.