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 
45  {
46 
47  public:
53  double operator()(const AlignmentResult& res) const
54  {
56  }
57  };
58 
63  {
64 
65  public:
71  double operator()(const AlignmentResult& res) const
72  {
73  return calcShapeTanimotoScore(res);
74  }
75  };
76 
81  {
82 
83  public:
89  double operator()(const AlignmentResult& res) const
90  {
91  return calcColorTanimotoScore(res);
92  }
93  };
94 
99  {
100 
101  public:
107  double operator()(const AlignmentResult& res) const
108  {
109  return calcTanimotoComboScore(res);
110  }
111  };
112 
117  {
118 
119  public:
125  TotalOverlapTverskyScore(double alpha = 0.95, double beta = 0.05):
126  alpha(alpha), beta(beta) {}
127 
133  double operator()(const AlignmentResult& res) const
134  {
135  return calcTotalOverlapTverskyScore(res, alpha, beta);
136  }
137 
138  private:
139  double alpha;
140  double beta;
141  };
142 
147  {
148 
149  public:
155  ShapeTverskyScore(double alpha = 0.95, double beta = 0.05):
156  alpha(alpha), beta(beta) {}
157 
163  double operator()(const AlignmentResult& res) const
164  {
165  return calcShapeTverskyScore(res, alpha, beta);
166  }
167 
168  private:
169  double alpha;
170  double beta;
171  };
172 
177  {
178 
179  public:
185  ColorTverskyScore(double alpha = 0.95, double beta = 0.05):
186  alpha(alpha), beta(beta) {}
187 
193  double operator()(const AlignmentResult& res) const
194  {
195  return calcColorTverskyScore(res, alpha, beta);
196  }
197 
198  private:
199  double alpha;
200  double beta;
201  };
202 
207  {
208 
209  public:
215  TverskyComboScore(double alpha = 0.95, double beta = 0.05):
216  alpha(alpha), beta(beta) {}
217 
223  double operator()(const AlignmentResult& res) const
224  {
225  return calcTverskyComboScore(res, alpha, beta);
226  }
227 
228  private:
229  double alpha;
230  double beta;
231  };
232 
237  {
238 
239  public:
244  ReferenceTotalOverlapTverskyScore(double alpha = 0.95):
245  alpha(alpha) {}
246 
252  double operator()(const AlignmentResult& res) const
253  {
254  return calcReferenceTotalOverlapTverskyScore(res, alpha);
255  }
256 
257  private:
258  double alpha;
259  };
260 
265  {
266 
267  public:
272  ReferenceShapeTverskyScore(double alpha = 0.95):
273  alpha(alpha) {}
274 
280  double operator()(const AlignmentResult& res) const
281  {
282  return calcReferenceShapeTverskyScore(res, alpha);
283  }
284 
285  private:
286  double alpha;
287  };
288 
293  {
294 
295  public:
300  ReferenceColorTverskyScore(double alpha = 0.95):
301  alpha(alpha) {}
302 
308  double operator()(const AlignmentResult& res) const
309  {
310  return calcReferenceColorTverskyScore(res, alpha);
311  }
312 
313  private:
314  double alpha;
315  };
316 
321  {
322 
323  public:
328  ReferenceTverskyComboScore(double alpha = 0.95):
329  alpha(alpha) {}
330 
336  double operator()(const AlignmentResult& res) const
337  {
338  return calcReferenceTverskyComboScore(res, alpha);
339  }
340 
341  private:
342  double alpha;
343  };
344 
349  {
350 
351  public:
356  AlignedTotalOverlapTverskyScore(double beta = 0.95):
357  beta(beta) {}
358 
364  double operator()(const AlignmentResult& res) const
365  {
366  return calcAlignedTotalOverlapTverskyScore(res, beta);
367  }
368 
369  private:
370  double beta;
371  };
372 
377  {
378 
379  public:
384  AlignedShapeTverskyScore(double beta = 0.95):
385  beta(beta) {}
386 
392  double operator()(const AlignmentResult& res) const
393  {
394  return calcAlignedShapeTverskyScore(res, beta);
395  }
396 
397  private:
398  double beta;
399  };
400 
405  {
406 
407  public:
412  AlignedColorTverskyScore(double beta = 0.95):
413  beta(beta) {}
414 
420  double operator()(const AlignmentResult& res) const
421  {
422  return calcAlignedColorTverskyScore(res, beta);
423  }
424 
425  private:
426  double beta;
427  };
428 
433  {
434 
435  public:
440  AlignedTverskyComboScore(double beta = 0.95):
441  beta(beta) {}
442 
448  double operator()(const AlignmentResult& res) const
449  {
450  return calcAlignedTverskyComboScore(res, beta);
451  }
452 
453  private:
454  double beta;
455  };
456  } // namespace Shape
457 } // namespace CDPL
458 
459 #endif // CDPL_SHAPE_SCORINGFUNCTORS_HPP
Definition of shape alignment scoring functions.
Functor wrapping Shape::calcAlignedColorTverskyScore().
Definition: ScoringFunctors.hpp:405
double operator()(const AlignmentResult &res) const
Returns the color aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:420
AlignedColorTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:412
Functor wrapping Shape::calcAlignedShapeTverskyScore().
Definition: ScoringFunctors.hpp:377
AlignedShapeTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:384
double operator()(const AlignmentResult &res) const
Returns the shape-only aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:392
Functor wrapping Shape::calcAlignedTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:349
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:364
AlignedTotalOverlapTverskyScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:356
Functor wrapping Shape::calcAlignedTverskyComboScore().
Definition: ScoringFunctors.hpp:433
double operator()(const AlignmentResult &res) const
Returns the combined shape + color aligned-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:448
AlignedTverskyComboScore(double beta=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:440
Result of a Gaussian-shape alignment between a reference and an aligned shape.
Definition: AlignmentResult.hpp:52
Functor wrapping Shape::calcColorTanimotoScore().
Definition: ScoringFunctors.hpp:81
double operator()(const AlignmentResult &res) const
Returns the color (pharmacophore) Tanimoto score of res.
Definition: ScoringFunctors.hpp:89
Functor wrapping Shape::calcColorTverskyScore().
Definition: ScoringFunctors.hpp:177
ColorTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:185
double operator()(const AlignmentResult &res) const
Returns the color symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:193
Functor wrapping Shape::calcReferenceColorTverskyScore().
Definition: ScoringFunctors.hpp:293
ReferenceColorTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:300
double operator()(const AlignmentResult &res) const
Returns the color reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:308
Functor wrapping Shape::calcReferenceShapeTverskyScore().
Definition: ScoringFunctors.hpp:265
double operator()(const AlignmentResult &res) const
Returns the shape-only reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:280
ReferenceShapeTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:272
Functor wrapping Shape::calcReferenceTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:237
ReferenceTotalOverlapTverskyScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:244
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:252
Functor wrapping Shape::calcReferenceTverskyComboScore().
Definition: ScoringFunctors.hpp:321
ReferenceTverskyComboScore(double alpha=0.95)
Constructs the functor with the given Tversky weighting factor.
Definition: ScoringFunctors.hpp:328
double operator()(const AlignmentResult &res) const
Returns the combined shape + color reference-normalized Tversky score of res.
Definition: ScoringFunctors.hpp:336
Functor wrapping Shape::calcShapeTanimotoScore().
Definition: ScoringFunctors.hpp:63
double operator()(const AlignmentResult &res) const
Returns the shape-only Tanimoto score of res.
Definition: ScoringFunctors.hpp:71
Functor wrapping Shape::calcShapeTverskyScore().
Definition: ScoringFunctors.hpp:147
double operator()(const AlignmentResult &res) const
Returns the shape-only symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:163
ShapeTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:155
Functor wrapping Shape::calcTanimotoComboScore().
Definition: ScoringFunctors.hpp:99
double operator()(const AlignmentResult &res) const
Returns the combined shape + color Tanimoto score of res.
Definition: ScoringFunctors.hpp:107
Functor wrapping Shape::calcTotalOverlapTanimotoScore().
Definition: ScoringFunctors.hpp:45
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap Tanimoto score of res.
Definition: ScoringFunctors.hpp:53
Functor wrapping Shape::calcTotalOverlapTverskyScore().
Definition: ScoringFunctors.hpp:117
TotalOverlapTverskyScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:125
double operator()(const AlignmentResult &res) const
Returns the (shape + color) total-overlap symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:133
Functor wrapping Shape::calcTverskyComboScore().
Definition: ScoringFunctors.hpp:207
TverskyComboScore(double alpha=0.95, double beta=0.05)
Constructs the functor with the given Tversky weighting factors.
Definition: ScoringFunctors.hpp:215
double operator()(const AlignmentResult &res) const
Returns the combined shape + color symmetric Tversky score of res.
Definition: ScoringFunctors.hpp:223
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.