#include <BALL/MOLMEC/MINIMIZATION/conjugateGradient.h>
A minimizer for geometry optimization based on different conjugate gradient (CG) algorithms. See
[1] Fletcher, R. and Reeves, C.M. "Function Minimization by Conjugate Gradients" Comp. J., 7, 149-154, 1964
[2] David Shanno "Conjugate Gradient Methods With Inexact Searches" Mathematics of Operations Research, Vol. 3, No. 3, August 1978, pp. 244-256
[3] S. Watowich et. al "A Stable Rapidly Converging Conjugate Gradient Method for Energy Minimization" Journal of Computational Chemistry, Vol. 9, No. 6, pp. 650-661 (1988)
[4] M.J.D. Powell "Convergence properties of algorithms for nonlinear optimization" Report No. DAMPT 1985/NA1, University of Cambridge, 1985
[5] D.F. Shanno "Globally convergent conjugate gradient algorithms" Mathematical Programming 33 (1985), pp. 61-67
Definition at line 40 of file conjugateGradient.h.
The different conjugate gradient methods implemented.
Definition at line 52 of file conjugateGradient.h.
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | ) |
Default constructor.
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | ForceField & | force_field | ) |
Constructor expecting a valid force field
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | ForceField & | force_field, | |
SnapShotManager * | ssm | |||
) |
Constructor expecting a valid force field and a snapshot manager
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | ForceField & | force_field, | |
SnapShotManager * | ssm, | |||
const Options & | options | |||
) |
Constructor expecting a valid force field, a snapshot manager and options
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | ForceField & | force_field, | |
const Options & | options | |||
) |
Constructor expecting a valid force field and options
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer | ( | const ConjugateGradientMinimizer & | rhs | ) |
Copy constructor
virtual BALL::ConjugateGradientMinimizer::~ConjugateGradientMinimizer | ( | ) | [virtual] |
Destructor.
virtual double BALL::ConjugateGradientMinimizer::findStep | ( | ) | [virtual] |
Calculate the next step. First, this method updates the model. Second, it performs a line search along the calculated direction afterwards.
Reimplemented from BALL::EnergyMinimizer.
UpdateMethod BALL::ConjugateGradientMinimizer::getUpdateMethod | ( | ) | const |
Returns the current method for updateDirection.
virtual bool BALL::ConjugateGradientMinimizer::minimize | ( | Size | iterations = 0 , |
|
bool | resume = false | |||
) | [virtual] |
Minimize the energy of the system. This method executes at most iterations
minimization steps. If the number of iterations is not given, the number specified in the options is taken.
iterations | the maximum number of iterations | |
resume | true to resume a previous run |
Reimplemented from BALL::EnergyMinimizer.
const ConjugateGradientMinimizer& BALL::ConjugateGradientMinimizer::operator= | ( | const ConjugateGradientMinimizer & | rhs | ) |
Assignment operator
void BALL::ConjugateGradientMinimizer::setUpdateMethod | ( | UpdateMethod | method | ) |
Set explicitly the criterion used for updateDirection. If the method is not recognized, this function fails.
virtual bool BALL::ConjugateGradientMinimizer::specificSetup | ( | ) | [virtual] |
Specific setup
Reimplemented from BALL::EnergyMinimizer.
virtual void BALL::ConjugateGradientMinimizer::updateDirection | ( | ) | [virtual] |
Update the search direction. This method updates the search direction. It uses the different conjugate gradient caculations dependend on the options.
Reimplemented from BALL::EnergyMinimizer.
vector<Vector3> BALL::ConjugateGradientMinimizer::a_i_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 216 of file conjugateGradient.h.
vector<Vector3> BALL::ConjugateGradientMinimizer::b_i_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 220 of file conjugateGradient.h.
double BALL::ConjugateGradientMinimizer::D_1_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 240 of file conjugateGradient.h.
double BALL::ConjugateGradientMinimizer::D_4_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 244 of file conjugateGradient.h.
bool BALL::ConjugateGradientMinimizer::first_iter_ [protected] |
Is this the (initial) first iteration?
Definition at line 208 of file conjugateGradient.h.
We count the iterations since the last restart. There are other necessities for a restart so the iteration counter may not coincide (by modulo) with the restart frequency.
Definition at line 255 of file conjugateGradient.h.
The line search
Definition at line 192 of file conjugateGradient.h.
Number of movable atoms.
Definition at line 200 of file conjugateGradient.h.
double BALL::ConjugateGradientMinimizer::old_gtg_ [protected] |
where is the gradient of the last iteration
Definition at line 212 of file conjugateGradient.h.
vector<Vector3> BALL::ConjugateGradientMinimizer::p_i_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 232 of file conjugateGradient.h.
vector<Vector3> BALL::ConjugateGradientMinimizer::p_t_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 224 of file conjugateGradient.h.
Frequency for restarts.
Definition at line 248 of file conjugateGradient.h.
Unscaled last search direction
Definition at line 196 of file conjugateGradient.h.
Size BALL::ConjugateGradientMinimizer::updt_method_ [protected] |
Update method used for the CG
Definition at line 204 of file conjugateGradient.h.
vector<Vector3> BALL::ConjugateGradientMinimizer::y_i_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 236 of file conjugateGradient.h.
vector<Vector3> BALL::ConjugateGradientMinimizer::y_t_ [protected] |
Variable needed for the Shanno direction calculation
Definition at line 228 of file conjugateGradient.h.