Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Shape.ScreeningSettings Class Reference

Bundle of configuration parameters for Shape.ScreeningProcessor. More...

+ Inheritance diagram for CDPL.Shape.ScreeningSettings:

Classes

class  AlignmentMode
 Bitmask flags specifying the strategies used to seed alignment starting transformations. More...
 
class  ColorFeatureType
 Specifies which kind of color (pharmacophore) features are used during shape alignment. More...
 
class  ScreeningMode
 Specifies which alignment hits are reported by the screening processor. More...
 

Public Member Functions

None __init__ ()
 Constructs a ScreeningSettings instance with default values.
 
None __init__ (ScreeningSettings settings)
 Initializes a copy of the ScreeningSettings instance settings. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
ScreeningSettings assign (ScreeningSettings settings)
 Replaces the current state of self with a copy of the state of the ScreeningSettings instance settings. More...
 
None setScoringFunction (DoubleAlignmentResultFunctor func)
 Sets the scoring function used to rank alignment results. More...
 
DoubleAlignmentResultFunctor getScoringFunction ()
 Returns the currently configured scoring function. More...
 
None setScoreCutoff (float cutoff)
 Sets the minimum score below which alignment hits are discarded (or NO_CUTOFF). More...
 
float getScoreCutoff ()
 Returns the currently configured score cutoff (or NO_CUTOFF). More...
 
None setColorFeatureType (ColorFeatureType type)
 Sets the color feature type to use during alignment. More...
 
ColorFeatureType getColorFeatureType ()
 Returns the currently configured color feature type. More...
 
None setScreeningMode (ScreeningMode mode)
 Sets the screening mode. More...
 
ScreeningMode getScreeningMode ()
 Returns the currently configured screening mode. More...
 
None setAlignmentMode (AlignmentMode mode)
 Sets the alignment-mode bitmask (see AlignmentMode). More...
 
AlignmentMode getAlignmentMode ()
 Returns the currently configured alignment-mode bitmask. More...
 
None setNumRandomStarts (int num_starts)
 Sets the number of random starting transformations when AlignmentMode.RANDOM is enabled. More...
 
int getNumRandomStarts ()
 Returns the currently configured number of random starts. More...
 
None allCarbonMode (bool all_c)
 Enables or disables the all-carbon mode (treats every heavy atom as carbon for shape generation). More...
 
bool allCarbonMode ()
 Tells whether the all-carbon mode is enabled. More...
 
None singleConformerSearch (bool all_c)
 
bool singleConformerSearch ()
 Tells whether only a single conformer of each molecule is considered. More...
 
None setMaxNumOptimizationIterations (int max_iter)
 Sets the maximum number of overlap-optimization iterations. More...
 
int getMaxNumOptimizationIterations ()
 Returns the currently configured maximum number of overlap-optimization iterations. More...
 
None setOptimizationStopGradient (float grad_norm)
 Sets the gradient norm at which the overlap optimization is stopped. More...
 
float getOptimizationStopGradient ()
 Returns the currently configured overlap-optimization stop gradient. More...
 
None optimizeOverlap (bool optimize)
 Specifies whether the overlap shall be optimized iteratively after the initial alignment. More...
 
bool optimizeOverlap ()
 Tells whether the overlap is optimized iteratively. More...
 
None greedyOptimization (bool greedy)
 Specifies whether the overlap optimization shall use a greedy strategy that stops at the first local maximum. More...
 
bool greedyOptimization ()
 Tells whether the overlap optimization uses a greedy strategy. More...
 

Static Public Attributes

 DEFAULT = _HIDDEN_VALUE_
 A static instance with default-initialized values.
 
 NO_CUTOFF = nan
 Sentinel value (NaN) used to disable the score cutoff.
 

Properties

 objectID = property(getObjectID)
 
 scoringFunction = property(getScoringFunction, setScoringFunction)
 
 scoreCutoff = property(getScoreCutoff, setScoreCutoff)
 
 screeningMode = property(getScreeningMode, setScreeningMode)
 
 alignmentMode = property(getAlignmentMode, setAlignmentMode)
 
 numRandomStarts = property(getNumRandomStarts, setNumRandomStarts)
 
 allCarbon = property(allCarbonMode, allCarbonMode)
 
 singleConfSearch = property(singleConformerSearch, singleConformerSearch)
 
 colorFeatureType = property(getColorFeatureType, setColorFeatureType)
 
 maxNumOptIterations = property(getMaxNumOptimizationIterations, setMaxNumOptimizationIterations)
 
 optStopGradient = property(getOptimizationStopGradient, setOptimizationStopGradient)
 
 optOverlap = property(optimizeOverlap, optimizeOverlap)
 
 greedyOpt = property(greedyOptimization, greedyOptimization)
 

Detailed Description

Bundle of configuration parameters for Shape.ScreeningProcessor.

The settings select the scoring function, the type of color (pharmacophore) features used, the screening mode (e.g. best-overall vs. best-per-query), the alignment-start strategy, and the parameters of the iterative overlap optimization.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Shape.ScreeningSettings.__init__ ( ScreeningSettings  settings)

Initializes a copy of the ScreeningSettings instance settings.

Parameters
settingsThe ScreeningSettings instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Shape.ScreeningSettings.getObjectID ( )

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

Different Python ScreeningSettings 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 ScreeningSettings 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.

◆ assign()

ScreeningSettings CDPL.Shape.ScreeningSettings.assign ( ScreeningSettings  settings)

Replaces the current state of self with a copy of the state of the ScreeningSettings instance settings.

Parameters
settingsThe ScreeningSettings instance to copy.
Returns
self

◆ setScoringFunction()

None CDPL.Shape.ScreeningSettings.setScoringFunction ( DoubleAlignmentResultFunctor  func)

Sets the scoring function used to rank alignment results.

Parameters
funcThe scoring function.

◆ getScoringFunction()

DoubleAlignmentResultFunctor CDPL.Shape.ScreeningSettings.getScoringFunction ( )

Returns the currently configured scoring function.

Returns
A reference to the scoring function.

◆ setScoreCutoff()

None CDPL.Shape.ScreeningSettings.setScoreCutoff ( float  cutoff)

Sets the minimum score below which alignment hits are discarded (or NO_CUTOFF).

Parameters
cutoffThe new score cutoff (or NO_CUTOFF to disable cutoff filtering).

◆ getScoreCutoff()

float CDPL.Shape.ScreeningSettings.getScoreCutoff ( )

Returns the currently configured score cutoff (or NO_CUTOFF).

Returns
The score cutoff (or NO_CUTOFF if cutoff filtering is disabled).

◆ setColorFeatureType()

None CDPL.Shape.ScreeningSettings.setColorFeatureType ( ColorFeatureType  type)

Sets the color feature type to use during alignment.

Parameters
typeThe new color-feature type.

◆ getColorFeatureType()

ColorFeatureType CDPL.Shape.ScreeningSettings.getColorFeatureType ( )

Returns the currently configured color feature type.

Returns
The color-feature type.

◆ setScreeningMode()

None CDPL.Shape.ScreeningSettings.setScreeningMode ( ScreeningMode  mode)

Sets the screening mode.

Parameters
modeThe new screening mode.

◆ getScreeningMode()

ScreeningMode CDPL.Shape.ScreeningSettings.getScreeningMode ( )

Returns the currently configured screening mode.

Returns
The screening mode.

◆ setAlignmentMode()

None CDPL.Shape.ScreeningSettings.setAlignmentMode ( AlignmentMode  mode)

Sets the alignment-mode bitmask (see AlignmentMode).

Parameters
modeThe new alignment-mode bitmask.

◆ getAlignmentMode()

AlignmentMode CDPL.Shape.ScreeningSettings.getAlignmentMode ( )

Returns the currently configured alignment-mode bitmask.

Returns
The alignment-mode bitmask.

◆ setNumRandomStarts()

None CDPL.Shape.ScreeningSettings.setNumRandomStarts ( int  num_starts)

Sets the number of random starting transformations when AlignmentMode.RANDOM is enabled.

Parameters
num_startsThe new number of random starts.

◆ getNumRandomStarts()

int CDPL.Shape.ScreeningSettings.getNumRandomStarts ( )

Returns the currently configured number of random starts.

Returns
The number of random starts.

◆ allCarbonMode() [1/2]

None CDPL.Shape.ScreeningSettings.allCarbonMode ( bool  all_c)

Enables or disables the all-carbon mode (treats every heavy atom as carbon for shape generation).

Parameters
all_cTrue to enable the all-carbon mode, and False to use the actual atom types.

◆ allCarbonMode() [2/2]

bool CDPL.Shape.ScreeningSettings.allCarbonMode ( )

Tells whether the all-carbon mode is enabled.

Returns
True if the all-carbon mode is enabled, and False otherwise.

◆ singleConformerSearch() [1/2]

None CDPL.Shape.ScreeningSettings.singleConformerSearch ( bool  all_c)
Parameters
all_c

◆ singleConformerSearch() [2/2]

bool CDPL.Shape.ScreeningSettings.singleConformerSearch ( )

Tells whether only a single conformer of each molecule is considered.

Returns
True if only a single conformer is considered, and False otherwise.

◆ setMaxNumOptimizationIterations()

None CDPL.Shape.ScreeningSettings.setMaxNumOptimizationIterations ( int  max_iter)

Sets the maximum number of overlap-optimization iterations.

Parameters
max_iterThe new maximum number of iterations.

◆ getMaxNumOptimizationIterations()

int CDPL.Shape.ScreeningSettings.getMaxNumOptimizationIterations ( )

Returns the currently configured maximum number of overlap-optimization iterations.

Returns
The maximum number of iterations.

◆ setOptimizationStopGradient()

None CDPL.Shape.ScreeningSettings.setOptimizationStopGradient ( float  grad_norm)

Sets the gradient norm at which the overlap optimization is stopped.

Parameters
grad_normThe new stop gradient norm.

◆ getOptimizationStopGradient()

float CDPL.Shape.ScreeningSettings.getOptimizationStopGradient ( )

Returns the currently configured overlap-optimization stop gradient.

Returns
The stop gradient norm.

◆ optimizeOverlap() [1/2]

None CDPL.Shape.ScreeningSettings.optimizeOverlap ( bool  optimize)

Specifies whether the overlap shall be optimized iteratively after the initial alignment.

Parameters
optimizeTrue to optimize the overlap, and False to skip optimization.

◆ optimizeOverlap() [2/2]

bool CDPL.Shape.ScreeningSettings.optimizeOverlap ( )

Tells whether the overlap is optimized iteratively.

Returns
True if the overlap is optimized, and False otherwise.

◆ greedyOptimization() [1/2]

None CDPL.Shape.ScreeningSettings.greedyOptimization ( bool  greedy)

Specifies whether the overlap optimization shall use a greedy strategy that stops at the first local maximum.

Parameters
greedyTrue to use the greedy strategy, and False to use the full optimization.

◆ greedyOptimization() [2/2]

bool CDPL.Shape.ScreeningSettings.greedyOptimization ( )

Tells whether the overlap optimization uses a greedy strategy.

Returns
True if the greedy strategy is used, and False otherwise.