Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | Static Public Attributes | List of all members
CDPL::Shape::ScreeningSettings Class Reference

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 ScoringFunctiongetScoringFunction () 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...
 

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.

Member Typedef Documentation

◆ ScoringFunction

Type of the function used to score an alignment result.

Member Enumeration Documentation

◆ ScreeningMode

Specifies which alignment hits are reported by the screening processor.

Enumerator
BEST_OVERALL_MATCH 

Report only the single best-scoring alignment hit across all queries.

BEST_MATCH_PER_QUERY 

Report the best-scoring alignment hit per query molecule.

BEST_MATCH_PER_QUERY_CONF 

Report the best-scoring alignment hit per (query, query conformer) pair.

◆ ColorFeatureType

Specifies which kind of color (pharmacophore) features are used during shape alignment.

Enumerator
NO_FEATURES 

Disable color features (shape-only alignment).

PHARMACOPHORE_EXP_CHARGES 

Use pharmacophore features derived from explicit charges.

PHARMACOPHORE_IMP_CHARGES 

Use pharmacophore features derived from perceived (implicit) charges.

◆ AlignmentMode

Bitmask flags specifying the strategies used to seed alignment starting transformations.

Enumerator
NO_ALIGNMENT 

Disable alignment entirely (overlap is computed in the input pose only).

SHAPE_CENTROID 

Place the aligned shape at the centroid of the reference shape.

ATOM_CENTERS 

Seed alignments by superimposing pairs of atom centers.

COLOR_FEATURE_CENTERS 

Seed alignments by superimposing pairs of color (pharmacophore) feature centers.

RANDOM 

Seed alignments with random rotations.

Constructor & Destructor Documentation

◆ ScreeningSettings()

CDPL::Shape::ScreeningSettings::ScreeningSettings ( )

Constructs a ScreeningSettings instance with default values.

Member Function Documentation

◆ setScoringFunction()

void CDPL::Shape::ScreeningSettings::setScoringFunction ( const ScoringFunction func)

Sets the scoring function used to rank alignment results.

Parameters
funcThe scoring function.

◆ getScoringFunction()

const ScoringFunction& CDPL::Shape::ScreeningSettings::getScoringFunction ( ) const

Returns the currently configured scoring function.

Returns
A const reference to the scoring function.

◆ setColorFeatureType()

void 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 ( ) const

Returns the currently configured color feature type.

Returns
The color-feature type.

◆ setScreeningMode()

void CDPL::Shape::ScreeningSettings::setScreeningMode ( ScreeningMode  mode)

Sets the screening mode.

Parameters
modeThe new screening mode.

◆ getScreeningMode()

ScreeningMode CDPL::Shape::ScreeningSettings::getScreeningMode ( ) const

Returns the currently configured screening mode.

Returns
The screening mode.

◆ setAlignmentMode()

void 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 ( ) const

Returns the currently configured alignment-mode bitmask.

Returns
The alignment-mode bitmask.

◆ setNumRandomStarts()

void CDPL::Shape::ScreeningSettings::setNumRandomStarts ( std::size_t  num_starts)

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

Parameters
num_startsThe new number of random starts.

◆ getNumRandomStarts()

std::size_t CDPL::Shape::ScreeningSettings::getNumRandomStarts ( ) const

Returns the currently configured number of random starts.

Returns
The number of random starts.

◆ allCarbonMode() [1/2]

void 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 ( ) const

Tells whether the all-carbon mode is enabled.

Returns
true if the all-carbon mode is enabled, and false otherwise.

◆ singleConformerSearch() [1/2]

void CDPL::Shape::ScreeningSettings::singleConformerSearch ( bool  single_conf)

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

Parameters
single_conftrue to consider only a single conformer, and false to consider all conformers.

◆ singleConformerSearch() [2/2]

bool CDPL::Shape::ScreeningSettings::singleConformerSearch ( ) const

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

Returns
true if only a single conformer is considered, and false otherwise.

◆ optimizeOverlap() [1/2]

void 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 ( ) const

Tells whether the overlap is optimized iteratively.

Returns
true if the overlap is optimized, and false otherwise.

◆ greedyOptimization() [1/2]

void 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 ( ) const

Tells whether the overlap optimization uses a greedy strategy.

Returns
true if the greedy strategy is used, and false otherwise.

◆ setMaxNumOptimizationIterations()

void CDPL::Shape::ScreeningSettings::setMaxNumOptimizationIterations ( std::size_t  max_iter)

Sets the maximum number of overlap-optimization iterations.

Parameters
max_iterThe new maximum number of iterations.

◆ getMaxNumOptimizationIterations()

std::size_t CDPL::Shape::ScreeningSettings::getMaxNumOptimizationIterations ( ) const

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

Returns
The maximum number of iterations.

◆ setOptimizationStopGradient()

void CDPL::Shape::ScreeningSettings::setOptimizationStopGradient ( double  grad_norm)

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

Parameters
grad_normThe new stop gradient norm.

◆ getOptimizationStopGradient()

double CDPL::Shape::ScreeningSettings::getOptimizationStopGradient ( ) const

Returns the currently configured overlap-optimization stop gradient.

Returns
The stop gradient norm.

◆ setScoreCutoff()

void CDPL::Shape::ScreeningSettings::setScoreCutoff ( double  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()

double CDPL::Shape::ScreeningSettings::getScoreCutoff ( ) const

Returns the currently configured score cutoff (or NO_CUTOFF).

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

Member Data Documentation

◆ DEFAULT

const ScreeningSettings CDPL::Shape::ScreeningSettings::DEFAULT
static

A static instance with default-initialized values.

◆ NO_CUTOFF

constexpr double CDPL::Shape::ScreeningSettings::NO_CUTOFF = std::numeric_limits<double>::quiet_NaN()
staticconstexpr

Sentinel value (NaN) used to disable the score cutoff.


The documentation for this class was generated from the following file: