29 #ifndef CDPL_GRAIL_FEATUREINTERACTIONSCOREGRIDCALCULATOR_HPP
30 #define CDPL_GRAIL_FEATUREINTERACTIONSCOREGRIDCALCULATOR_HPP
49 template <
typename PT,
typename CT,
typename ST>
56 class FeatureContainer;
79 static constexpr
double DEF_DISTANCE_CUTOFF = 10.0;
84 typedef std::shared_ptr<FeatureInteractionScoreGridCalculator>
SharedPointer;
229 typedef std::vector<const Pharm::Feature*> FeatureList;
230 typedef Internal::Octree<Math::Vector3D, Math::Vector3DArray, double> Octree;
231 typedef std::shared_ptr<Octree> OctreePtr;
232 typedef std::vector<std::size_t> FeatureIndexList;
234 FeatureList tgtFeatures;
242 FeatureIndexList featureIndices;
Definition of the preprocessor macro CDPL_GRAIL_API.
#define CDPL_GRAIL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of a spatial grid data type.
Definition of class CDPL::Math::VectorArray.
Definition of vector data types.
Calculator that fills a spatial grid with per-cell feature-interaction scores against a set of target...
Definition: FeatureInteractionScoreGridCalculator.hpp:73
const ScoringFunction & getScoringFunction() const
Returns the currently configured scoring function.
FeatureInteractionScoreGridCalculator(const ScoringFunction &func)
Constructs the FeatureInteractionScoreGridCalculator instance with the given scoring function.
void setFeatureSelectionPredicate(const FeaturePredicate &pred)
Sets the predicate that decides whether a target feature shall be considered.
void normalizeScores(bool normalize)
Enables or disables normalization of the combined per-cell scores to the range [0,...
FeatureInteractionScoreGridCalculator & operator=(const FeatureInteractionScoreGridCalculator &calc)
Copy assignment operator.
void setScoringFunction(const ScoringFunction &func)
Sets the scoring function used to score the interaction between a grid cell and a target feature.
double getDistanceCutoff() const
Returns the currently configured cutoff distance.
std::function< double(const Math::Vector3D &, const Pharm::Feature &)> ScoringFunction
Type of the generic functor that scores the interaction between a grid cell and a target feature.
Definition: FeatureInteractionScoreGridCalculator.hpp:94
std::function< double(const Math::DVector &)> ScoreCombinationFunction
Type of the generic functor that combines per-feature scores into a single grid cell value.
Definition: FeatureInteractionScoreGridCalculator.hpp:99
bool scoresNormalized() const
Tells whether the combined per-cell scores are normalized.
void setScoreCombinationFunction(const ScoreCombinationFunction &func)
Sets the function used to combine per-feature scores into a single grid cell value.
~FeatureInteractionScoreGridCalculator()
Destructor.
FeatureInteractionScoreGridCalculator()
Constructs the FeatureInteractionScoreGridCalculator instance.
const ScoreCombinationFunction & getScoreCombinationFunction() const
Returns the currently configured score-combination function.
std::shared_ptr< FeatureInteractionScoreGridCalculator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureInteractionScoreGridCalcul...
Definition: FeatureInteractionScoreGridCalculator.hpp:84
void setDistanceCutoff(double dist)
Sets the cutoff distance beyond which target features are not considered.
std::function< bool(const Pharm::Feature &)> FeaturePredicate
Type of the generic functor that decides whether a target feature shall be considered.
Definition: FeatureInteractionScoreGridCalculator.hpp:89
const FeaturePredicate & getFeatureSelectionPredicate() const
Returns the currently configured feature-selection predicate.
FeatureInteractionScoreGridCalculator(const ScoringFunction &scoring_func, const ScoreCombinationFunction &comb_func)
Constructs the FeatureInteractionScoreGridCalculator instance with the given scoring and score-combin...
FeatureInteractionScoreGridCalculator(const FeatureInteractionScoreGridCalculator &calc)
Constructs a copy of the FeatureInteractionScoreGridCalculator instance calc.
void calculate(const Pharm::FeatureContainer &tgt_ftrs, Grid::DSpatialGrid &grid)
Calculates the feature-interaction score at each cell of grid against tgt_ftrs.
Abstract base class for attributed grids whose elements have a defined 3D position in space.
Definition: SpatialGrid.hpp:53
Abstract base class for containers holding a sequence of Pharm::Feature objects with associated prope...
Definition: FeatureContainer.hpp:55
Abstract base class representing a single pharmacophore feature within a parent Pharm::Pharmacophore.
Definition: Feature.hpp:48
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
MatrixNormInfinity< E >::ResultType normInf(const MatrixExpression< E > &e)
Returns the L∞ (maximum absolute row sum) norm of the matrix expression e.
Definition: MatrixExpression.hpp:1650
GridElementSum< E >::ResultType sum(const GridExpression< E > &e)
Returns the sum of all elements of the grid expression e.
Definition: GridExpression.hpp:720
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
The namespace of the Chemical Data Processing Library.
Score-combination functor returning the maximum (infinity norm) of the per-feature scores.
Definition: FeatureInteractionScoreGridCalculator.hpp:105
double operator()(const Math::DVector &scores) const
Definition: FeatureInteractionScoreGridCalculator.hpp:107
Score-combination functor returning the sum of the per-feature scores.
Definition: FeatureInteractionScoreGridCalculator.hpp:117
double operator()(const Math::DVector &scores) const
Definition: FeatureInteractionScoreGridCalculator.hpp:119