Chemical Data Processing Library C++ API - Version 1.4.0
ScoringFunctors.hpp
Go to the documentation of this file.
1 /*
2  * ScoringFunctors.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_SHAPE_SCORINGFUNCTORS_HPP
30 #define CDPL_SHAPE_SCORINGFUNCTORS_HPP
31 
33 
34 
35 namespace CDPL
36 {
37 
38  namespace Shape
39  {
40 
43  {
44 
45  public:
51  double operator()(const AlignmentResult& res) const
52  {
54  }
55  };
56 
59  {
60 
61  public:
67  double operator()(const AlignmentResult& res) const
68  {
69  return calcShapeTanimotoScore(res);
70  }
71  };
72 
75  {
76 
77  public:
83  double operator()(const AlignmentResult& res) const
84  {
85  return calcColorTanimotoScore(res);
86  }
87  };
88 
91  {
92 
93  public:
99  double operator()(const AlignmentResult& res) const
100  {
101  return calcTanimotoComboScore(res);
102  }
103  };
104 
107  {
108 
109  public:
115  TotalOverlapTverskyScore(double alpha = 0.95, double beta = 0.05):
116  alpha(alpha), beta(beta) {}
117 
123  double operator()(const AlignmentResult& res) const
124  {
125  return calcTotalOverlapTverskyScore(res, alpha, beta);
126  }
127 
128  private:
129  double alpha;
130  double beta;
131  };
132 
135  {
136 
137  public:
143  ShapeTverskyScore(double alpha = 0.95, double beta = 0.05):
144  alpha(alpha), beta(beta) {}
145 
151  double operator()(const AlignmentResult& res) const
152  {
153  return calcShapeTverskyScore(res, alpha, beta);
154  }
155 
156  private:
157  double alpha;
158  double beta;
159  };
160 
163  {
164 
165  public:
171  ColorTverskyScore(double alpha = 0.95, double beta = 0.05):
172  alpha(alpha), beta(beta) {}
173 
179  double operator()(const AlignmentResult& res) const
180  {
181  return calcColorTverskyScore(res, alpha, beta);
182  }
183 
184  private:
185  double alpha;
186  double beta;
187  };
188 
191  {
192 
193  public:
199  TverskyComboScore(double alpha = 0.95, double beta = 0.05):
200  alpha(alpha), beta(beta) {}
201 
207  double operator()(const AlignmentResult& res) const
208  {
209  return calcTverskyComboScore(res, alpha, beta);
210  }
211 
212  private:
213  double alpha;
214  double beta;
215  };
216 
219  {
220 
221  public:
226  ReferenceTotalOverlapTverskyScore(double alpha = 0.95):
227  alpha(alpha) {}
228 
234  double operator()(const AlignmentResult& res) const
235  {
236  return calcReferenceTotalOverlapTverskyScore(res, alpha);
237  }
238 
239  private:
240  double alpha;
241  };
242 
245  {
246 
247  public:
252  ReferenceShapeTverskyScore(double alpha = 0.95):
253  alpha(alpha) {}
254 
260  double operator()(const AlignmentResult& res) const
261  {
262  return calcReferenceShapeTverskyScore(res, alpha);
263  }
264 
265  private:
266  double alpha;
267  };
268 
271  {
272 
273  public:
278  ReferenceColorTverskyScore(double alpha = 0.95):
279  alpha(alpha) {}
280 
286  double operator()(const AlignmentResult& res) const
287  {
288  return calcReferenceColorTverskyScore(res, alpha);
289  }
290 
291  private:
292  double alpha;
293  };
294 
297  {
298 
299  public:
304  ReferenceTverskyComboScore(double alpha = 0.95):
305  alpha(alpha) {}
306 
312  double operator()(const AlignmentResult& res) const
313  {
314  return calcReferenceTverskyComboScore(res, alpha);
315  }
316 
317  private:
318  double alpha;
319  };
320 
323  {
324 
325  public:
330  AlignedTotalOverlapTverskyScore(double beta = 0.95):
331  beta(beta) {}
332 
338  double operator()(const AlignmentResult& res) const
339  {
340  return calcAlignedTotalOverlapTverskyScore(res, beta);
341  }
342 
343  private:
344  double beta;
345  };
346 
349  {
350 
351  public:
356  AlignedShapeTverskyScore(double beta = 0.95):
357  beta(beta) {}
358 
364  double operator()(const AlignmentResult& res) const
365  {
366  return calcAlignedShapeTverskyScore(res, beta);
367  }
368 
369  private:
370  double beta;
371  };
372 
375  {
376 
377  public:
382  AlignedColorTverskyScore(double beta = 0.95):
383  beta(beta) {}
384 
390  double operator()(const AlignmentResult& res) const
391  {
392  return calcAlignedColorTverskyScore(res, beta);
393  }
394 
395  private:
396  double beta;
397  };
398 
401  {
402 
403  public:
408  AlignedTverskyComboScore(double beta = 0.95):
409  beta(beta) {}
410 
416  double operator()(const AlignmentResult& res) const
417  {
418  return calcAlignedTverskyComboScore(res, beta);
419  }
420 
421  private:
422  double beta;
423  };
424  } // namespace Shape
425 } // namespace CDPL
426 
427 #endif // CDPL_SHAPE_SCORINGFUNCTORS_HPP
Definition of shape alignment scoring functions.
Functor wrapping Shape::calcAlignedColorTverskyScore().
Definition: ScoringFunctors.hpp:375
double operator()(const AlignmentResult &res) const
Returns the color aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:390
AlignedColorTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:382
Functor wrapping Shape::calcAlignedShapeTverskyScore().
Definition: ScoringFunctors.hpp:349
AlignedShapeTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:356
double operator()(const AlignmentResult &res) const
Returns the shape-only aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:364
Functor wrapping Shape::calcAlignedTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:323
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:338
AlignedTotalOverlapTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:330
Functor wrapping Shape::calcAlignedTverskyComboScore().
Definition: ScoringFunctors.hpp:401
double operator()(const AlignmentResult &res) const
Returns the combined shape + color aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:416
AlignedTverskyComboScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:408
Result of a Gaussian-shape alignment between a reference and an aligned shape.
Definition: AlignmentResult.hpp:52
Functor wrapping Shape::calcColorTanimotoScore().
Definition: ScoringFunctors.hpp:75
double operator()(const AlignmentResult &res) const
Returns the color (pharmacophore) Tanimoto score of res.
Definition: ScoringFunctors.hpp:83
Functor wrapping Shape::calcColorTverskyScore().
Definition: ScoringFunctors.hpp:163
ColorTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:171
double operator()(const AlignmentResult &res) const
Returns the color symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:179
Functor wrapping Shape::calcReferenceColorTverskyScore().
Definition: ScoringFunctors.hpp:271
ReferenceColorTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:278
double operator()(const AlignmentResult &res) const
Returns the color reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:286
Functor wrapping Shape::calcReferenceShapeTverskyScore().
Definition: ScoringFunctors.hpp:245
double operator()(const AlignmentResult &res) const
Returns the shape-only reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:260
ReferenceShapeTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:252
Functor wrapping Shape::calcReferenceTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:219
ReferenceTotalOverlapTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:226
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:234
Functor wrapping Shape::calcReferenceTverskyComboScore().
Definition: ScoringFunctors.hpp:297
ReferenceTverskyComboScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:304
double operator()(const AlignmentResult &res) const
Returns the combined shape + color reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:312
Functor wrapping Shape::calcShapeTanimotoScore().
Definition: ScoringFunctors.hpp:59
double operator()(const AlignmentResult &res) const
Returns the shape-only Tanimoto score of res.
Definition: ScoringFunctors.hpp:67
Functor wrapping Shape::calcShapeTverskyScore().
Definition: ScoringFunctors.hpp:135
double operator()(const AlignmentResult &res) const
Returns the shape-only symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:151
ShapeTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:143
Functor wrapping Shape::calcTanimotoComboScore().
Definition: ScoringFunctors.hpp:91
double operator()(const AlignmentResult &res) const
Returns the combined shape + color Tanimoto score of res.
Definition: ScoringFunctors.hpp:99
Functor wrapping Shape::calcTotalOverlapTanimotoScore().
Definition: ScoringFunctors.hpp:43
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap Tanimoto score of res.
Definition: ScoringFunctors.hpp:51
Functor wrapping Shape::calcTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:107
TotalOverlapTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:115
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:123
Functor wrapping Shape::calcTverskyComboScore().
Definition: ScoringFunctors.hpp:191
TverskyComboScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:199
double operator()(const AlignmentResult &res) const
Returns the combined shape + color symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:207
CDPL_SHAPE_API double calcColorTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
Returns the color (pharmacophore) symmetric Tversky similarity score of res.
CDPL_SHAPE_API double calcShapeTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
Returns the shape-only symmetric Tversky similarity score of res.
CDPL_SHAPE_API double calcReferenceTverskyComboScore(const AlignmentResult &res, double alpha=0.95)
Returns the combined shape + color reference-normalized Tversky score of res.
CDPL_SHAPE_API double calcAlignedTverskyComboScore(const AlignmentResult &res, double beta=0.95)
Returns the combined shape + color aligned-normalized Tversky score of res.
CDPL_SHAPE_API double calcTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
Returns the (shape + color) total-overlap symmetric Tversky similarity score of res.
CDPL_SHAPE_API double calcAlignedShapeTverskyScore(const AlignmentResult &res, double beta=0.95)
Returns the shape-only aligned-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcShapeTanimotoScore(const AlignmentResult &res)
Returns the shape-only Tanimoto similarity score of res.
CDPL_SHAPE_API double calcAlignedTotalOverlapTverskyScore(const AlignmentResult &res, double beta=0.95)
Returns the (shape + color) total-overlap aligned-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcReferenceTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95)
Returns the (shape + color) total-overlap reference-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcTotalOverlapTanimotoScore(const AlignmentResult &res)
Returns the (shape + color) total-overlap Tanimoto similarity score of res.
CDPL_SHAPE_API double calcTanimotoComboScore(const AlignmentResult &res)
Returns the combined shape + color Tanimoto score of res.
CDPL_SHAPE_API double calcReferenceColorTverskyScore(const AlignmentResult &res, double alpha=0.95)
Returns the color (pharmacophore) reference-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcColorTanimotoScore(const AlignmentResult &res)
Returns the color (pharmacophore) Tanimoto similarity score of res.
CDPL_SHAPE_API double calcReferenceShapeTverskyScore(const AlignmentResult &res, double alpha=0.95)
Returns the shape-only reference-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcAlignedColorTverskyScore(const AlignmentResult &res, double beta=0.95)
Returns the color (pharmacophore) aligned-normalized Tversky similarity score of res.
CDPL_SHAPE_API double calcTverskyComboScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
Returns the combined shape + color symmetric Tversky score of res.
The namespace of the Chemical Data Processing Library.