75 |
|
void setVerbose(bool verbose) { bVerbose = verbose;} |
76 |
|
|
77 |
|
//get and set the coordinate |
78 |
< |
vector<double> getX() { return curX; } |
78 |
> |
std::vector<double> getX() { return curX; } |
79 |
|
void setX(vector<double>& x); |
80 |
|
|
81 |
|
//get and set the value of object function |
82 |
|
double getF() { return curF; } |
83 |
|
void setF(double f) { curF = f; } |
84 |
|
|
85 |
< |
vector<double> getG() { return curG; } |
85 |
> |
std::vector<double> getG() { return curG; } |
86 |
|
void setG(vector<double>& g); |
87 |
|
|
88 |
|
//get and set the gradient |
89 |
< |
vector<double> getGrad() { return curG; } |
89 |
> |
std::vector<double> getGrad() { return curG; } |
90 |
|
void setGrad(vector<double>& g) { curG = g; } |
91 |
|
|
92 |
|
//interal function to evaluate the energy and gradient in OOPSE |
93 |
< |
void calcEnergyGradient(vector<double>& x, vector<double>& grad, double& |
93 |
> |
void calcEnergyGradient(vector<double>& x, std::vector<double>& grad, double& |
94 |
|
energy, int& status); |
95 |
|
|
96 |
|
//calculate the value of object function |
99 |
|
|
100 |
|
//calculate the gradient |
101 |
|
virtual void calcG(); |
102 |
< |
virtual void calcG(vector<double>& x, vector<double>& g, double& f, int& status); |
102 |
> |
virtual void calcG(vector<double>& x, std::vector<double>& g, double& f, int& status); |
103 |
|
|
104 |
|
//calculate the hessian |
105 |
|
//virtual void calcH(int& status); |
106 |
< |
//virtual void calcH(vector<double>& x, vector<dobule>& g, SymMatrix& h, int& status); |
106 |
> |
//virtual void calcH(vector<double>& x, std::vector<dobule>& g, SymMatrix& h, int& status); |
107 |
|
|
108 |
|
|
109 |
|
protected: |
110 |
|
|
111 |
|
// transfrom cartesian and rotational coordinates into minimization coordinates |
112 |
< |
vector<double> getCoor(); |
112 |
> |
std::vector<double> getCoor(); |
113 |
|
|
114 |
|
// transfrom minimization coordinates into cartesian and rotational coordinates |
115 |
|
void setCoor(vector<double>& x); |
150 |
|
//current value of the function |
151 |
|
double curF; |
152 |
|
// current coordinates |
153 |
< |
vector<double> curX; |
153 |
> |
std::vector<double> curX; |
154 |
|
//gradient at curent coordinates |
155 |
< |
vector<double> curG; |
155 |
> |
std::vector<double> curG; |
156 |
|
|
157 |
|
//hessian at current coordinates |
158 |
|
//SymMatrix curH; |
176 |
|
virtual int checkConvg(); |
177 |
|
protected: |
178 |
|
|
179 |
< |
vector<double> direction; |
179 |
> |
std::vector<double> direction; |
180 |
|
double prevF; |
181 |
|
double stepSize; |
182 |
|
|
194 |
|
|
195 |
|
protected: |
196 |
|
|
197 |
< |
vector<double> direction; |
198 |
< |
vector<double> prevX; |
199 |
< |
vector<double> prevG; |
197 |
> |
std::vector<double> direction; |
198 |
> |
std::vector<double> prevX; |
199 |
> |
std::vector<double> prevG; |
200 |
|
double prevF; |
201 |
|
double stepSize; |
202 |
|
}; |