![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Bundle of configuration parameters for Shape::ScreeningProcessor. More...
#include <ScreeningSettings.hpp>
Public Types | |
| enum | ScreeningMode { BEST_OVERALL_MATCH , BEST_MATCH_PER_QUERY , BEST_MATCH_PER_QUERY_CONF } |
| Specifies which alignment hits are reported by the screening processor. More... | |
| enum | ColorFeatureType { NO_FEATURES , PHARMACOPHORE_EXP_CHARGES , PHARMACOPHORE_IMP_CHARGES } |
| Specifies which kind of color (pharmacophore) features are used during shape alignment. More... | |
| enum | AlignmentMode { NO_ALIGNMENT = 0x0 , SHAPE_CENTROID = 0x1 , ATOM_CENTERS = 0x2 , COLOR_FEATURE_CENTERS = 0x4 , RANDOM = 0x8 } |
| Bitmask flags specifying the strategies used to seed alignment starting transformations. More... | |
| typedef std::function< double(const AlignmentResult &)> | ScoringFunction |
| Type of the function used to score an alignment result. More... | |
Public Member Functions | |
| ScreeningSettings () | |
Constructs a ScreeningSettings instance with default values. More... | |
| void | setScoringFunction (const ScoringFunction &func) |
| Sets the scoring function used to rank alignment results. More... | |
| const ScoringFunction & | getScoringFunction () const |
| Returns the currently configured scoring function. More... | |
| void | setColorFeatureType (ColorFeatureType type) |
| Sets the color feature type to use during alignment. More... | |
| ColorFeatureType | getColorFeatureType () const |
| Returns the currently configured color feature type. More... | |
| void | setScreeningMode (ScreeningMode mode) |
| Sets the screening mode. More... | |
| ScreeningMode | getScreeningMode () const |
| Returns the currently configured screening mode. More... | |
| void | setAlignmentMode (AlignmentMode mode) |
| Sets the alignment-mode bitmask (see AlignmentMode). More... | |
| AlignmentMode | getAlignmentMode () const |
| Returns the currently configured alignment-mode bitmask. More... | |
| void | setNumRandomStarts (std::size_t num_starts) |
| Sets the number of random starting transformations when AlignmentMode::RANDOM is enabled. More... | |
| std::size_t | getNumRandomStarts () const |
| Returns the currently configured number of random starts. More... | |
| void | allCarbonMode (bool all_c) |
| Enables or disables the all-carbon mode (treats every heavy atom as carbon for shape generation). More... | |
| bool | allCarbonMode () const |
| Tells whether the all-carbon mode is enabled. More... | |
| void | singleConformerSearch (bool single_conf) |
| Specifies whether only a single conformer of each molecule is considered. More... | |
| bool | singleConformerSearch () const |
| Tells whether only a single conformer of each molecule is considered. More... | |
| void | optimizeOverlap (bool optimize) |
| Specifies whether the overlap shall be optimized iteratively after the initial alignment. More... | |
| bool | optimizeOverlap () const |
| Tells whether the overlap is optimized iteratively. More... | |
| void | greedyOptimization (bool greedy) |
| Specifies whether the overlap optimization shall use a greedy strategy that stops at the first local maximum. More... | |
| bool | greedyOptimization () const |
| Tells whether the overlap optimization uses a greedy strategy. More... | |
| void | setMaxNumOptimizationIterations (std::size_t max_iter) |
| Sets the maximum number of overlap-optimization iterations. More... | |
| std::size_t | getMaxNumOptimizationIterations () const |
| Returns the currently configured maximum number of overlap-optimization iterations. More... | |
| void | setOptimizationStopGradient (double grad_norm) |
| Sets the gradient norm at which the overlap optimization is stopped. More... | |
| double | getOptimizationStopGradient () const |
| Returns the currently configured overlap-optimization stop gradient. More... | |
| void | setScoreCutoff (double cutoff) |
| Sets the minimum score below which alignment hits are discarded (or NO_CUTOFF). More... | |
| double | getScoreCutoff () const |
| Returns the currently configured score cutoff (or NO_CUTOFF). More... | |
Static Public Attributes | |
| static const ScreeningSettings | DEFAULT |
| A static instance with default-initialized values. More... | |
| static constexpr double | NO_CUTOFF = std::numeric_limits<double>::quiet_NaN() |
| Sentinel value (NaN) used to disable the score cutoff. More... | |
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.
| typedef std::function<double(const AlignmentResult&)> CDPL::Shape::ScreeningSettings::ScoringFunction |
Type of the function used to score an alignment result.
Specifies which alignment hits are reported by the screening processor.
Specifies which kind of color (pharmacophore) features are used during shape alignment.
Bitmask flags specifying the strategies used to seed alignment starting transformations.
| CDPL::Shape::ScreeningSettings::ScreeningSettings | ( | ) |
Constructs a ScreeningSettings instance with default values.
| void CDPL::Shape::ScreeningSettings::setScoringFunction | ( | const ScoringFunction & | func | ) |
Sets the scoring function used to rank alignment results.
| func | The scoring function. |
| const ScoringFunction& CDPL::Shape::ScreeningSettings::getScoringFunction | ( | ) | const |
Returns the currently configured scoring function.
const reference to the scoring function. | void CDPL::Shape::ScreeningSettings::setColorFeatureType | ( | ColorFeatureType | type | ) |
Sets the color feature type to use during alignment.
| type | The new color-feature type. |
| ColorFeatureType CDPL::Shape::ScreeningSettings::getColorFeatureType | ( | ) | const |
Returns the currently configured color feature type.
| void CDPL::Shape::ScreeningSettings::setScreeningMode | ( | ScreeningMode | mode | ) |
Sets the screening mode.
| mode | The new screening mode. |
| ScreeningMode CDPL::Shape::ScreeningSettings::getScreeningMode | ( | ) | const |
Returns the currently configured screening mode.
| void CDPL::Shape::ScreeningSettings::setAlignmentMode | ( | AlignmentMode | mode | ) |
Sets the alignment-mode bitmask (see AlignmentMode).
| mode | The new alignment-mode bitmask. |
| AlignmentMode CDPL::Shape::ScreeningSettings::getAlignmentMode | ( | ) | const |
Returns the currently configured alignment-mode bitmask.
| void CDPL::Shape::ScreeningSettings::setNumRandomStarts | ( | std::size_t | num_starts | ) |
Sets the number of random starting transformations when AlignmentMode::RANDOM is enabled.
| num_starts | The new number of random starts. |
| std::size_t CDPL::Shape::ScreeningSettings::getNumRandomStarts | ( | ) | const |
Returns the currently configured number of random starts.
| void CDPL::Shape::ScreeningSettings::allCarbonMode | ( | bool | all_c | ) |
Enables or disables the all-carbon mode (treats every heavy atom as carbon for shape generation).
| all_c | true to enable the all-carbon mode, and false to use the actual atom types. |
| bool CDPL::Shape::ScreeningSettings::allCarbonMode | ( | ) | const |
Tells whether the all-carbon mode is enabled.
true if the all-carbon mode is enabled, and false otherwise. | void CDPL::Shape::ScreeningSettings::singleConformerSearch | ( | bool | single_conf | ) |
Specifies whether only a single conformer of each molecule is considered.
| single_conf | true to consider only a single conformer, and false to consider all conformers. |
| bool CDPL::Shape::ScreeningSettings::singleConformerSearch | ( | ) | const |
Tells whether only a single conformer of each molecule is considered.
true if only a single conformer is considered, and false otherwise. | void CDPL::Shape::ScreeningSettings::optimizeOverlap | ( | bool | optimize | ) |
Specifies whether the overlap shall be optimized iteratively after the initial alignment.
| optimize | true to optimize the overlap, and false to skip optimization. |
| bool CDPL::Shape::ScreeningSettings::optimizeOverlap | ( | ) | const |
Tells whether the overlap is optimized iteratively.
true if the overlap is optimized, and false otherwise. | void CDPL::Shape::ScreeningSettings::greedyOptimization | ( | bool | greedy | ) |
Specifies whether the overlap optimization shall use a greedy strategy that stops at the first local maximum.
| greedy | true to use the greedy strategy, and false to use the full optimization. |
| bool CDPL::Shape::ScreeningSettings::greedyOptimization | ( | ) | const |
Tells whether the overlap optimization uses a greedy strategy.
true if the greedy strategy is used, and false otherwise. | void CDPL::Shape::ScreeningSettings::setMaxNumOptimizationIterations | ( | std::size_t | max_iter | ) |
Sets the maximum number of overlap-optimization iterations.
| max_iter | The new maximum number of iterations. |
| std::size_t CDPL::Shape::ScreeningSettings::getMaxNumOptimizationIterations | ( | ) | const |
Returns the currently configured maximum number of overlap-optimization iterations.
| void CDPL::Shape::ScreeningSettings::setOptimizationStopGradient | ( | double | grad_norm | ) |
Sets the gradient norm at which the overlap optimization is stopped.
| grad_norm | The new stop gradient norm. |
| double CDPL::Shape::ScreeningSettings::getOptimizationStopGradient | ( | ) | const |
Returns the currently configured overlap-optimization stop gradient.
| void CDPL::Shape::ScreeningSettings::setScoreCutoff | ( | double | cutoff | ) |
Sets the minimum score below which alignment hits are discarded (or NO_CUTOFF).
| cutoff | The new score cutoff (or NO_CUTOFF to disable cutoff filtering). |
| double CDPL::Shape::ScreeningSettings::getScoreCutoff | ( | ) | const |
Returns the currently configured score cutoff (or NO_CUTOFF).
|
static |
A static instance with default-initialized values.
|
staticconstexpr |
Sentinel value (NaN) used to disable the score cutoff.