Chemical Data Processing Library C++ API - Version 1.2.0
ScreeningSettings.hpp
Go to the documentation of this file.
1 /*
2  * ScreeningSettings.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_SCREENINGSETTINGS_HPP
30 #define CDPL_SHAPE_SCREENINGSETTINGS_HPP
31 
32 #include <cstddef>
33 #include <limits>
34 #include <functional>
35 
36 #include "CDPL/Shape/APIPrefix.hpp"
37 
38 
39 namespace CDPL
40 {
41 
42  namespace Shape
43  {
44 
45  class AlignmentResult;
46 
48  {
49 
50  public:
51  static const ScreeningSettings DEFAULT;
52  static constexpr double NO_CUTOFF = std::numeric_limits<double>::quiet_NaN();
53 
54  typedef std::function<double(const AlignmentResult&)> ScoringFunction;
55 
57  {
58 
61  BEST_MATCH_PER_QUERY_CONF
62  };
63 
65  {
66 
69  PHARMACOPHORE_IMP_CHARGES
70  };
71 
73  {
74 
75  NO_ALIGNMENT = 0x0,
76  SHAPE_CENTROID = 0x1,
77  ATOM_CENTERS = 0x2,
78  COLOR_FEATURE_CENTERS = 0x4,
79  RANDOM = 0x8
80  };
81 
83 
85 
87 
89 
91 
93 
95 
97 
99 
100  void setNumRandomStarts(std::size_t num_starts);
101 
102  std::size_t getNumRandomStarts() const;
103 
104  void allCarbonMode(bool all_c);
105 
106  bool allCarbonMode() const;
107 
108  void singleConformerSearch(bool single_conf);
109 
110  bool singleConformerSearch() const;
111 
112  void optimizeOverlap(bool optimize);
113 
114  bool optimizeOverlap() const;
115 
116  void greedyOptimization(bool greedy);
117 
118  bool greedyOptimization() const;
119 
120  void setMaxNumOptimizationIterations(std::size_t max_iter);
121 
122  std::size_t getMaxNumOptimizationIterations() const;
123 
124  void setOptimizationStopGradient(double grad_norm);
125 
127 
128  void setScoreCutoff(double cutoff);
129 
130  double getScoreCutoff() const;
131 
132  private:
133  ScoringFunction scoringFunc;
134  ColorFeatureType colorFtrType;
135  ScreeningMode screeningMode;
136  AlignmentMode almntMode;
137  std::size_t numRandomStarts;
138  bool allCarbon;
139  bool singleConfSearch;
140  bool optOverlap;
141  bool greedyOpt;
142  std::size_t numOptIter;
143  double optStopGrad;
144  double scoreCutoff;
145  };
146  } // namespace Shape
147 } // namespace CDPL
148 
149 #endif // CDPL_SHAPE_SCREENINGSETTINGS_HPP
Definition of the preprocessor macro CDPL_SHAPE_API.
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition: AlignmentResult.hpp:45
Definition: ScreeningSettings.hpp:48
void setScreeningMode(ScreeningMode mode)
std::size_t getMaxNumOptimizationIterations() const
static const ScreeningSettings DEFAULT
Definition: ScreeningSettings.hpp:51
AlignmentMode getAlignmentMode() const
void setMaxNumOptimizationIterations(std::size_t max_iter)
ScreeningMode getScreeningMode() const
void greedyOptimization(bool greedy)
ScreeningMode
Definition: ScreeningSettings.hpp:57
@ BEST_MATCH_PER_QUERY
Definition: ScreeningSettings.hpp:60
@ BEST_OVERALL_MATCH
Definition: ScreeningSettings.hpp:59
void setColorFeatureType(ColorFeatureType type)
std::size_t getNumRandomStarts() const
void setScoreCutoff(double cutoff)
void optimizeOverlap(bool optimize)
ColorFeatureType getColorFeatureType() const
void setNumRandomStarts(std::size_t num_starts)
void setAlignmentMode(AlignmentMode mode)
void singleConformerSearch(bool single_conf)
void setScoringFunction(const ScoringFunction &func)
const ScoringFunction & getScoringFunction() const
ColorFeatureType
Definition: ScreeningSettings.hpp:65
@ NO_FEATURES
Definition: ScreeningSettings.hpp:67
@ PHARMACOPHORE_EXP_CHARGES
Definition: ScreeningSettings.hpp:68
void setOptimizationStopGradient(double grad_norm)
std::function< double(const AlignmentResult &)> ScoringFunction
Definition: ScreeningSettings.hpp:54
void allCarbonMode(bool all_c)
double getOptimizationStopGradient() const
AlignmentMode
Definition: ScreeningSettings.hpp:73
The namespace of the Chemical Data Processing Library.