#include <BALL/MOLMEC/MINIMIZATION/strangLBFGS.h>
Limited-memory BFGS minimizer based on the Strang recurrence. A minimizer for geometry optimization based on the limited-memory BFGS method proposed in
[1] Nocedal J.: Updating quasi-Newton matrices with limited storage. Math. Comp. 35 (1980) 773-782.
[2] Liu D.C., Nocedal J.: On the limited memory BFGS method for large scale optimization. Math. Programming 45 (1989) 503-528.
If the 'improved' option is set, ideas proposed in
[3] Mehiddin Al-Baali: Improved Hessian approximations for the limited memory BFGS method. Numerical Algorithms 22 (1999) 99-112
are adopted.
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | ) |
Default constructor.
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | ForceField & | force_field | ) |
Constructor expecting a valid force field
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | ForceField & | force_field, | |
| SnapShotManager * | ssm | |||
| ) |
Constructor expecting a valid force field and a snapshot manager
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | ForceField & | force_field, | |
| SnapShotManager * | ssm, | |||
| const Options & | options | |||
| ) |
Constructor expecting a valid force field, a snapshot manager and options
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | ForceField & | force_field, | |
| const Options & | options | |||
| ) |
Constructor expecting a valid force field and options
| BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer | ( | const StrangLBFGSMinimizer & | rhs | ) |
Copy constructor
| virtual BALL::StrangLBFGSMinimizer::~StrangLBFGSMinimizer | ( | ) | [virtual] |
Destructor.
| virtual double BALL::StrangLBFGSMinimizer::findStep | ( | ) | [virtual] |
Calculate the next step. First, this method updates the model. Second, it performs a line search along the calculated direction afterwards.
if the line search found an acceptable solution, otherwise -1. Reimplemented from BALL::EnergyMinimizer.
| bool BALL::StrangLBFGSMinimizer::getImprovedFlag | ( | ) | const |
Return the improved flag
| Size BALL::StrangLBFGSMinimizer::getMaxNumOfStoredVectPairs | ( | ) | const |
Return the maximum number of stored vector pairs
| virtual bool BALL::StrangLBFGSMinimizer::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 StrangLBFGSMinimizer& BALL::StrangLBFGSMinimizer::operator= | ( | const StrangLBFGSMinimizer & | rhs | ) |
Assignment operator
| void BALL::StrangLBFGSMinimizer::setImprovedFlag | ( | bool | flag | ) |
Set the improved flag
| void BALL::StrangLBFGSMinimizer::setMaxNumOfStoredVectPairs | ( | Size | num | ) |
Set the maximum number of stored vector pairs
| virtual bool BALL::StrangLBFGSMinimizer::specificSetup | ( | ) | [virtual] |
Specific setup
Reimplemented from BALL::EnergyMinimizer.
| virtual void BALL::StrangLBFGSMinimizer::updateDirection | ( | ) | [virtual] |
Update the stored vector pairs, either by adding a new pair or if there is no space left by replacing the oldest pair. Compute the search direction afterwards by using the Strang recurrence formula (optional: with an improvement idea of Al-Baali).
Reimplemented from BALL::EnergyMinimizer.
Current number of stored vector pairs.
bool BALL::StrangLBFGSMinimizer::first_iter_ [protected] |
Is this an initial first iteration?
bool BALL::StrangLBFGSMinimizer::improved_ [protected] |
Should the improved version be used?
Size BALL::StrangLBFGSMinimizer::index_of_free_vect_ [protected] |
Index of the vector pair which will be used for saving the data of the current step (usually by replacing old data).
std::vector<Vector3> BALL::StrangLBFGSMinimizer::initial_atoms_ [protected] |
Positions of movable atoms when starting an iteration. This is used to reduce slightly rounding errors
LineSearch BALL::StrangLBFGSMinimizer::line_search_ [protected] |
The line search
Maximum number of stored vector pairs.
Size BALL::StrangLBFGSMinimizer::number_of_atoms_ [protected] |
Number of movable atoms.
vector<float> BALL::StrangLBFGSMinimizer::rho_ [protected] |
Old and new scaling values. Also used in the Strang recurrence formula.
vector<Vector3> BALL::StrangLBFGSMinimizer::stored_s_ [protected] |
Stored former steps. Vectors stored in column order.
vector<Vector3> BALL::StrangLBFGSMinimizer::stored_y_ [protected] |
Stored former changes in gradients. Vectors stored in column order.
vector<float> BALL::StrangLBFGSMinimizer::work_val_ [protected] |
Temporarily used memory for saving scalars associated with the stored vector pairs.