BALL 1.5.0
conjugateGradient.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: conjugateGradient.h,v 1.29.20.6 2007/08/07 09:12:33 aleru Exp $
5//
6
7#ifndef BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
8#define BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
9
10#ifndef BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
12#endif
13
14#ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
16#endif
17
18namespace BALL
19{
41 : public EnergyMinimizer
42 {
43 public:
44
48
53 {
56 POLAK_RIBIERE = 1,
57
60 FLETCHER_REEVES = 2,
61
64 SHANNO = 3
65 };
66
68
71
74 struct Option
75 {
78 static const char* UPDATE_METHOD;
79 };
80
84 {
87 static const Size UPDATE_METHOD;
88 };
89
91
94
96
97
100
104
108
112 SnapShotManager* ssm, const Options& options);
113
116 ConjugateGradientMinimizer(ForceField& force_field, const Options& options);
117
121
125
127
130
134
136
139
142 virtual bool specificSetup();
143
145
148
152 void setUpdateMethod(UpdateMethod method);
153
156 UpdateMethod getUpdateMethod() const;
157
164 virtual double findStep();
165
171 virtual void updateDirection();
172
181 virtual bool minimize(Size iterations = 0, bool resume = false);
182
183 protected:
184
186
189
192 LineSearch line_search_;
193
196 Gradient unscaled_direction_;
197
200 Size number_of_atoms_;
201
204 Size updt_method_;
205
208 bool first_iter_;
209
212 double old_gtg_;
213
216 vector<Vector3> a_i_;
217
220 vector<Vector3> b_i_;
221
224 vector<Vector3> p_t_;
225
228 vector<Vector3> y_t_;
229
232 vector<Vector3> p_i_;
233
236 vector<Vector3> y_i_;
237
240 double D_1_;
241
244 double D_4_;
245
248 Size restart_frequency_;
249
255 Size last_restart_iter_;
256
258
259 };
260} // end of namespace BALL
261
262#endif // BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
#define BALL_CREATE(name)
Definition: create.h:62
Definition: constants.h:13
#define BALL_EXPORT
Definition: COMMON/global.h:50