Chemical Data Processing Library C++ API - Version 1.1.1
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
CDPL::Shape::ScreeningSettings::ColorFeatureType
ColorFeatureType
Definition: ScreeningSettings.hpp:65
CDPL::Shape::ScreeningSettings::AlignmentMode
AlignmentMode
Definition: ScreeningSettings.hpp:73
CDPL::Shape::ScreeningSettings::getScoringFunction
const ScoringFunction & getScoringFunction() const
CDPL::Shape::ScreeningSettings::DEFAULT
static const ScreeningSettings DEFAULT
Definition: ScreeningSettings.hpp:51
CDPL::Shape::ScreeningSettings::NO_FEATURES
@ NO_FEATURES
Definition: ScreeningSettings.hpp:67
CDPL::Shape::ScreeningSettings::ScreeningMode
ScreeningMode
Definition: ScreeningSettings.hpp:57
CDPL::Shape::ScreeningSettings::getScoreCutoff
double getScoreCutoff() const
CDPL::Shape::ScreeningSettings::optimizeOverlap
bool optimizeOverlap() const
CDPL::Shape::ScreeningSettings::setScoringFunction
void setScoringFunction(const ScoringFunction &func)
CDPL::Shape::ScreeningSettings::setMaxNumOptimizationIterations
void setMaxNumOptimizationIterations(std::size_t max_iter)
CDPL::Shape::ScreeningSettings::greedyOptimization
bool greedyOptimization() const
CDPL::Shape::ScreeningSettings::getScreeningMode
ScreeningMode getScreeningMode() const
double
CDPL::Shape::ScreeningSettings::singleConformerSearch
void singleConformerSearch(bool single_conf)
CDPL::Shape::ScreeningSettings::optimizeOverlap
void optimizeOverlap(bool optimize)
CDPL::Shape::ScreeningSettings::ScreeningSettings
ScreeningSettings()
CDPL::Shape::ScreeningSettings::setColorFeatureType
void setColorFeatureType(ColorFeatureType type)
CDPL::Shape::ScreeningSettings::greedyOptimization
void greedyOptimization(bool greedy)
CDPL::Shape::ScreeningSettings::allCarbonMode
void allCarbonMode(bool all_c)
CDPL::Shape::ScreeningSettings::getMaxNumOptimizationIterations
std::size_t getMaxNumOptimizationIterations() const
CDPL::Shape::ScreeningSettings::setNumRandomStarts
void setNumRandomStarts(std::size_t num_starts)
CDPL::Shape::ScreeningSettings::PHARMACOPHORE_EXP_CHARGES
@ PHARMACOPHORE_EXP_CHARGES
Definition: ScreeningSettings.hpp:68
CDPL::Shape::ScreeningSettings::ScoringFunction
std::function< double(const AlignmentResult &)> ScoringFunction
Definition: ScreeningSettings.hpp:54
CDPL::Shape::ScreeningSettings::BEST_MATCH_PER_QUERY
@ BEST_MATCH_PER_QUERY
Definition: ScreeningSettings.hpp:60
CDPL::Shape::ScreeningSettings::setOptimizationStopGradient
void setOptimizationStopGradient(double grad_norm)
CDPL_SHAPE_API
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Shape::ScreeningSettings::getNumRandomStarts
std::size_t getNumRandomStarts() const
CDPL::Shape::ScreeningSettings::setScoreCutoff
void setScoreCutoff(double cutoff)
CDPL::Shape::ScreeningSettings::getColorFeatureType
ColorFeatureType getColorFeatureType() const
CDPL
The namespace of the Chemical Data Processing Library.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_SHAPE_API.
CDPL::Shape::AlignmentResult
Definition: AlignmentResult.hpp:45
CDPL::Shape::ScreeningSettings::setScreeningMode
void setScreeningMode(ScreeningMode mode)
CDPL::Shape::ScreeningSettings::getAlignmentMode
AlignmentMode getAlignmentMode() const
CDPL::Shape::ScreeningSettings::allCarbonMode
bool allCarbonMode() const
CDPL::Shape::ScreeningSettings::setAlignmentMode
void setAlignmentMode(AlignmentMode mode)
CDPL::Shape::ScreeningSettings::getOptimizationStopGradient
double getOptimizationStopGradient() const
CDPL::Shape::ScreeningSettings::singleConformerSearch
bool singleConformerSearch() const
CDPL::Shape::ScreeningSettings
Definition: ScreeningSettings.hpp:48
CDPL::Shape::ScreeningSettings::BEST_OVERALL_MATCH
@ BEST_OVERALL_MATCH
Definition: ScreeningSettings.hpp:59