Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MinimizerOptions.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file core/optimization/MinimizerOptions.hh
11 /// @brief Minimizer options class
12 /// @author Phil Bradley
13 
14 
15 #ifndef INCLUDED_core_optimization_MinimizerOptions_hh
16 #define INCLUDED_core_optimization_MinimizerOptions_hh
17 
19 
20 #include <core/types.hh>
21 
22 // C++ headers
23 #include <string>
24 
25 #include <utility/pointer/owning_ptr.hh>
26 #include <utility/pointer/ReferenceCount.hh>
27 
28 namespace core {
29 namespace optimization {
30 
32 
33 public:
34  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
35  virtual ~MinimizerOptions();
36  /////////////////////////////////////////////////////////////////////////////
37  // c-tor's -- might want to add a number of c-tors or a string-switched
38  // c-tor to replicate the dependence of, eg, xx_init on the current
39  // func_switch setting
40 
42  std::string const & min_type_in,
43  Real const minimize_tolerance_in,
44  bool const use_nblist_in, // see core/scoring/NeighborList.hh
45  bool const deriv_check_in = false,
46  bool const deriv_check_verbose_in = false
47  );
48 
49  ///
51  clone() const;
52 
53  /////////////////////////////////////////////////////////////////////////////
54  // high-level params
55 
56  // the min-type, eg "dfpmin", "linmin"
57  std::string const &
58  min_type() const;
59 
60  void
61  min_type( std::string min_type_in );
62 
63  std::string &
64  min_type();
65 
66  void
67  deriv_check( bool deriv_check_in );
68 
69  void
70  deriv_check_to_stdout( bool setting );
71 
72  bool
73  deriv_check() const;
74 
75  bool
76  deriv_check_verbose() const;
77 
78  bool
79  deriv_check_to_stdout() const;
80 
81  // the tolerance for dfpmin, dfpmin_atol etc
82  Real
83  minimize_tolerance() const;
84 
85  Real &
87 
88  void
89  minimize_tolerance( Real minimize_tolerance_in );
90 
91  bool
92  use_nblist() const;
93 
94  void
95  use_nblist( bool use_nblist_in );
96 
97 
98  bool
99  nblist_auto_update() const;
100 
101  void
102  nblist_auto_update( bool setting );
103 
104  bool
105  silent() const;
106 
107  void
108  silent( bool silent_in );
109 
110  Real
112 
113  void
115 
116  /////////////////////////////////////////////////////////////////////////////
117  // low-level params
118 
119  // bracketing params for linmin
120  Real
121  ax_init() const;
122 
123  Real
124  xx_init() const;
125 
126  Real
127  bx_init() const;
128 
129 
130  // abs tolerance for brent
131  Real
132  brent_abs_tolerance() const;
133 
134  int max_iter() const;
135  void max_iter(int n);
136 
139 
140 
141  ///////
142  // data
143 
144 private:
146 
148 
150 
153 
157 
158  bool silent_; // no minimizer output
159 
160  Real gmax_cutoff_for_convergence_; // armijo line min: only converge if max grad < this value
161  // defaults to 1.0
162 
166 
168 
170 
171 }; // MinimizerOptions
172 
173 
174 } // namespace optimization
175 } // namespace core
176 
177 
178 #endif // INCLUDED_core_optimization_MinimizerOptions_HH