Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | Properties | List of all members
CDPL.Pharm.ScreeningProcessor Class Reference

High-level driver for pharmacophore-based screening of a Pharm.ScreeningDBAccessor-backed database against a query feature container, reporting alignment hits via a user-supplied callback. More...

+ Inheritance diagram for CDPL.Pharm.ScreeningProcessor:

Classes

class  HitReportMode
 Specifies which conformer-level hits are reported per molecule. More...
 
class  SearchHit
 Data structure representing a single alignment hit produced by the screening processor, bundling the source pharmacophore/molecule, the alignment transformation and the source-database indices. More...
 

Public Member Functions

None __init__ (ScreeningDBAccessor db_acc)
 Constructs the ScreeningProcessor instance for the given screening database accessor db_acc. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None setDBAccessor (ScreeningDBAccessor db_acc)
 Specifies the screening database accessor. More...
 
ScreeningDBAccessor getDBAccessor ()
 Returns the currently configured screening database accessor. More...
 
None setHitReportMode (HitReportMode mode)
 Sets the hit-report mode. More...
 
HitReportMode getHitReportMode ()
 Returns the currently configured hit-report mode. More...
 
None setMaxNumOmittedFeatures (int max_num)
 Sets the maximum number of query features that may remain unmatched in a valid hit. More...
 
int getMaxNumOmittedFeatures ()
 Returns the currently configured maximum number of omitted features. More...
 
None checkXVolumeClashes (bool check)
 Specifies whether the alignment shall check exclusion volume clashes between the query and the hit molecule. More...
 
bool xVolumeClashesChecked ()
 Tells whether exclusion volume clashes are checked during alignment. More...
 
None seekBestAlignments (bool seek_best)
 Specifies whether the alignment shall search for the best-scoring rather than the first valid alignment per pose. More...
 
bool bestAlignmentsSeeked ()
 Tells whether the alignment seeks the best-scoring rather than the first valid alignment. More...
 
None setHitCallback (BoolSearchHitDoubleFunctor func)
 Specifies the hit-callback function. More...
 
BoolSearchHitDoubleFunctor getHitCallback ()
 Returns the currently configured hit-callback function. More...
 
None setProgressCallback (BoolSizeType2Functor func)
 Specifies the progress-reporting callback. More...
 
BoolSizeType2Functor getProgressCallback ()
 Returns the currently configured progress-reporting callback. More...
 
None setScoringFunction (DoubleSearchHitFunctor func)
 Specifies the function used to score a search hit. More...
 
DoubleSearchHitFunctor getScoringFunction ()
 Returns the currently configured scoring function. More...
 
int searchDB (FeatureContainer query, int mol_start_idx=0, int mol_end_idx=0)
 Screens the database with the supplied query pharmacophore. More...
 

Properties

 objectID = property(getObjectID)
 
 dbAcccessor = property(getDBAccessor, setDBAccessor)
 
 hitCallback = property(getHitCallback, setHitCallback)
 
 progressCallback = property(getProgressCallback, setProgressCallback)
 
 scoringFunction = property(getScoringFunction, setScoringFunction)
 
 hitReportMode = property(getHitReportMode, setHitReportMode)
 
 maxNumOmittedFeatures = property(getMaxNumOmittedFeatures, setMaxNumOmittedFeatures)
 
 checkXVolumes = property(xVolumeClashesChecked, checkXVolumeClashes)
 
 bestAlignments = property(bestAlignmentsSeeked, seekBestAlignments)
 

Detailed Description

High-level driver for pharmacophore-based screening of a Pharm.ScreeningDBAccessor-backed database against a query feature container, reporting alignment hits via a user-supplied callback.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Pharm.ScreeningProcessor.__init__ ( ScreeningDBAccessor  db_acc)

Constructs the ScreeningProcessor instance for the given screening database accessor db_acc.

Parameters
db_accAn accessor for the database to screen.

Member Function Documentation

◆ getObjectID()

int CDPL.Pharm.ScreeningProcessor.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python ScreeningProcessor instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two ScreeningProcessor instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ setDBAccessor()

None CDPL.Pharm.ScreeningProcessor.setDBAccessor ( ScreeningDBAccessor  db_acc)

Specifies the screening database accessor.

Parameters
db_accThe new database accessor.

◆ getDBAccessor()

ScreeningDBAccessor CDPL.Pharm.ScreeningProcessor.getDBAccessor ( )

Returns the currently configured screening database accessor.

Returns
A reference to the database accessor.

◆ setHitReportMode()

None CDPL.Pharm.ScreeningProcessor.setHitReportMode ( HitReportMode  mode)

Sets the hit-report mode.

Parameters
modeThe new hit-report mode.

◆ getHitReportMode()

HitReportMode CDPL.Pharm.ScreeningProcessor.getHitReportMode ( )

Returns the currently configured hit-report mode.

Returns
The hit-report mode.

◆ setMaxNumOmittedFeatures()

None CDPL.Pharm.ScreeningProcessor.setMaxNumOmittedFeatures ( int  max_num)

Sets the maximum number of query features that may remain unmatched in a valid hit.

Parameters
max_numThe new maximum number of omitted features.

◆ getMaxNumOmittedFeatures()

int CDPL.Pharm.ScreeningProcessor.getMaxNumOmittedFeatures ( )

Returns the currently configured maximum number of omitted features.

Returns
The maximum number of omitted features.

◆ checkXVolumeClashes()

None CDPL.Pharm.ScreeningProcessor.checkXVolumeClashes ( bool  check)

Specifies whether the alignment shall check exclusion volume clashes between the query and the hit molecule.

Parameters
checkTrue to enable the clash check, and False to disable it.

◆ xVolumeClashesChecked()

bool CDPL.Pharm.ScreeningProcessor.xVolumeClashesChecked ( )

Tells whether exclusion volume clashes are checked during alignment.

Returns
True if the clash check is enabled, and False otherwise.

◆ seekBestAlignments()

None CDPL.Pharm.ScreeningProcessor.seekBestAlignments ( bool  seek_best)

Specifies whether the alignment shall search for the best-scoring rather than the first valid alignment per pose.

Parameters
seek_bestTrue to seek the best alignment, and False to accept the first valid alignment.

◆ bestAlignmentsSeeked()

bool CDPL.Pharm.ScreeningProcessor.bestAlignmentsSeeked ( )

Tells whether the alignment seeks the best-scoring rather than the first valid alignment.

Returns
True if best-alignment seeking is enabled, and False otherwise.

◆ setHitCallback()

None CDPL.Pharm.ScreeningProcessor.setHitCallback ( BoolSearchHitDoubleFunctor  func)

Specifies the hit-callback function.

Parameters
funcThe hit-callback function.

◆ getHitCallback()

BoolSearchHitDoubleFunctor CDPL.Pharm.ScreeningProcessor.getHitCallback ( )

Returns the currently configured hit-callback function.

Returns
A reference to the hit-callback function.

◆ setProgressCallback()

None CDPL.Pharm.ScreeningProcessor.setProgressCallback ( BoolSizeType2Functor  func)

Specifies the progress-reporting callback.

Parameters
funcThe progress-callback function.

◆ getProgressCallback()

BoolSizeType2Functor CDPL.Pharm.ScreeningProcessor.getProgressCallback ( )

Returns the currently configured progress-reporting callback.

Returns
A reference to the progress-callback function.

◆ setScoringFunction()

None CDPL.Pharm.ScreeningProcessor.setScoringFunction ( DoubleSearchHitFunctor  func)

Specifies the function used to score a search hit.

Parameters
funcThe scoring function.

◆ getScoringFunction()

DoubleSearchHitFunctor CDPL.Pharm.ScreeningProcessor.getScoringFunction ( )

Returns the currently configured scoring function.

Returns
A reference to the scoring function.

◆ searchDB()

int CDPL.Pharm.ScreeningProcessor.searchDB ( FeatureContainer  query,
int   mol_start_idx = 0,
int   mol_end_idx = 0 
)

Screens the database with the supplied query pharmacophore.

Parameters
queryThe query feature container.
mol_start_idxThe zero-based index of the first molecule to screen.
mol_end_idxThe exclusive upper bound of the molecule range. If 0, the search runs through the end of the database.
Returns
The number of accepted hits produced by the search.