Chemical Data Processing Library C++ API - Version 1.4.0
Public Member Functions | List of all members
CDPL::Pharm::FeaturePositionMatchFunctor Class Reference

Match functor that quantifies the goodness of the 3D-position match between two pharmacophore features by comparing their separation against the configured per-feature tolerance. More...

#include <FeaturePositionMatchFunctor.hpp>

Public Member Functions

 FeaturePositionMatchFunctor (bool query_mode)
 Constructs the FeaturePositionMatchFunctor instance. More...
 
bool queryMode () const
 Tells whether the functor operates in query mode. More...
 
double operator() (const Feature &ftr1, const Feature &ftr2) const
 Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity. More...
 
double operator() (const Feature &ftr1, const Feature &ftr2, const Math::Matrix4D &xform) const
 Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity. More...
 

Detailed Description

Match functor that quantifies the goodness of the 3D-position match between two pharmacophore features by comparing their separation against the configured per-feature tolerance.

Constructor & Destructor Documentation

◆ FeaturePositionMatchFunctor()

CDPL::Pharm::FeaturePositionMatchFunctor::FeaturePositionMatchFunctor ( bool  query_mode)
inline

Constructs the FeaturePositionMatchFunctor instance.

Parameters
query_modeIf true, the tolerance of the first feature defines the allowed maximum distance; if false, the maximum of the two feature tolerances is used.

Member Function Documentation

◆ queryMode()

bool CDPL::Pharm::FeaturePositionMatchFunctor::queryMode ( ) const

Tells whether the functor operates in query mode.

Returns
true if query mode is active, and false otherwise.

◆ operator()() [1/2]

double CDPL::Pharm::FeaturePositionMatchFunctor::operator() ( const Feature ftr1,
const Feature ftr2 
) const

Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity.

If in 'query mode', the tolerance of ftr1 specifies the allowed maximum distance. Otherwise, the maximum tolerance of the features takes effect.

Parameters
ftr1The first feature.
ftr2The second feature.
Returns
A score from 0 (=outside effective tolerance) and 1 (exact position match) that specifies the proximity of the features.
See also
Pharm::getPosition(const Feature&), Pharm::getTolerance(const Feature&)

◆ operator()() [2/2]

double CDPL::Pharm::FeaturePositionMatchFunctor::operator() ( const Feature ftr1,
const Feature ftr2,
const Math::Matrix4D xform 
) const

Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity.

If in 'query mode', the tolerance of ftr1 specifies the allowed maximum distance. Otherwise, the maximum tolerance of the features takes effect.

Parameters
ftr1The first feature.
ftr2The second feature.
xformThe transformation to apply to the position of the second feature.
Returns
A score from 0 (=outside effective tolerance) and 1 (exact position match) that specifies the proximity of the features.
See also
Pharm::getPosition(const Feature&), Pharm::getTolerance(const Feature&)

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