BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
strangLBFGS.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: strangLBFGS.h,v 1.1.4.6 2007/08/07 09:12:36 aleru Exp $
5 //
6 
7 #ifndef BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_H
8 #define BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_H
9 
10 #ifndef BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
12 #endif
13 
14 #ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
16 #endif
17 
18 namespace BALL
19 {
39  : public EnergyMinimizer
40  {
41  public:
42 
44 
45 
48 
49 
54  struct Option
55  {
58  static const char* IMPROVED;
59 
62  static const char* NUM_OF_STORED_VECT_PAIRS;
63  };
64 
66  {
70  static const bool IMPROVED;
71 
76  };
77 
79 
82 
86 
89  StrangLBFGSMinimizer(ForceField& force_field);
90 
94 
97  StrangLBFGSMinimizer(ForceField& force_field, SnapShotManager* ssm, const Options& options);
98 
101  StrangLBFGSMinimizer(ForceField& force_field, const Options& options);
102 
106 
109  virtual ~StrangLBFGSMinimizer();
110 
112 
115 
118  const StrangLBFGSMinimizer& operator=(const StrangLBFGSMinimizer& rhs);
119 
121 
124 
127  virtual bool specificSetup();
128 
130 
133 
136  void setMaxNumOfStoredVectPairs(Size num);
137 
140  Size getMaxNumOfStoredVectPairs() const;
141 
144  void setImprovedFlag(bool flag);
145 
148  bool getImprovedFlag() const;
149 
156  virtual double findStep();
157 
163  virtual void updateDirection();
164 
173  virtual bool minimize(Size iterations = 0, bool resume = false);
174 
175  protected:
176 
178 
181 
185 
189 
193 
197 
201 
204  bool improved_;
205 
208  vector<float> rho_;
209 
212  vector<Vector3> stored_s_;
213 
217  vector<Vector3> stored_y_;
218 
222  vector<float> work_val_;
223 
228 
232  std::vector<Vector3> initial_atoms_;
233 
235 
236  };
237 } // end of namespace BALL
238 
239 #endif // BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_H
#define BALL_CREATE(name)
Definition: create.h:62
static const char * NUM_OF_STORED_VECT_PAIRS
Definition: strangLBFGS.h:62
static const char * IMPROVED
Definition: strangLBFGS.h:58
vector< float > work_val_
Definition: strangLBFGS.h:222
vector< Vector3 > stored_s_
Definition: strangLBFGS.h:212
vector< Vector3 > stored_y_
Definition: strangLBFGS.h:217
std::vector< Vector3 > initial_atoms_
Definition: strangLBFGS.h:232
static const Size NUM_OF_STORED_VECT_PAIRS
Definition: strangLBFGS.h:75
#define BALL_EXPORT
Definition: COMMON/global.h:50