#include <strangLBFGS.h>
Inheritance diagram for StrangLBFGSMinimizer:
Public Member Functions | |
Constructors and Destructors | |
StrangLBFGSMinimizer () | |
Default constructor. | |
StrangLBFGSMinimizer (ForceField &force_field) | |
Constructor expecting a valid force field. | |
StrangLBFGSMinimizer (ForceField &force_field, SnapShotManager *ssm) | |
Constructor expecting a valid force field and a snapshot manager. | |
StrangLBFGSMinimizer (ForceField &force_field, SnapShotManager *ssm, const Options &options) | |
Constructor expecting a valid force field, a snapshot manager and options. | |
StrangLBFGSMinimizer (ForceField &force_field, const Options &options) | |
Constructor expecting a valid force field and options. | |
StrangLBFGSMinimizer (const StrangLBFGSMinimizer &rhs) | |
Copy constructor. | |
virtual | ~StrangLBFGSMinimizer () |
Destructor. | |
Assignments | |
const StrangLBFGSMinimizer & | operator= (const StrangLBFGSMinimizer &rhs) |
Assignment operator. | |
Setup methods. They do all necessary preparations. | |
virtual bool | specificSetup () |
Specific setup. | |
Accessors | |
void | setMaxNumOfStoredVectPairs (Size num) |
Set the maximum number of stored vector pairs. | |
Size | getMaxNumOfStoredVectPairs () const |
Return the maximum number of stored vector pairs. | |
void | setImprovedFlag (bool flag) |
Set the improved flag. | |
bool | getImprovedFlag () const |
Return the improved flag. | |
virtual double | findStep () |
Calculate the next step. | |
virtual void | updateDirection () |
Update the stored vector pairs, either by adding a new pair or if there is no space left by replacing the oldest pair. | |
virtual bool | minimize (Size iterations=0, bool resume=false) |
Minimize the energy of the system. | |
Protected Attributes | |
Protected Attributes | |
LineSearch | line_search_ |
The line search. | |
bool | first_iter_ |
Is this an initial first iteration? | |
Size | number_of_atoms_ |
Number of movable atoms. | |
Size | max_num_of_vect_pairs_ |
Maximum number of stored vector pairs. | |
Size | curr_num_of_vect_pairs_ |
Current number of stored vector pairs. | |
bool | improved_ |
Should the improved version be used? | |
vector< float > | rho_ |
Old and new scaling values. | |
vector< Vector3 > | stored_s_ |
Stored former steps. | |
vector< Vector3 > | stored_y_ |
Stored former changes in gradients. | |
vector< float > | work_val_ |
Temporarily used memory for saving scalars associated with the stored vector pairs. | |
Size | index_of_free_vect_ |
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 > | initial_atoms_ |
Positions of movable atoms when starting an iteration. |
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.
|
Default constructor.
|
|
Destructor.
|
|
Calculate the next step. First, this method updates the model. Second, it performs a line search along the calculated direction afterwards.
Reimplemented from EnergyMinimizer. |
|
Minimize the energy of the system.
This method executes at most
Reimplemented from EnergyMinimizer. |
|
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 EnergyMinimizer. |
|
Current number of stored vector pairs.
|
|
Index of the vector pair which will be used for saving the data of the current step (usually by replacing old data).
|
|
Positions of movable atoms when starting an iteration. This is used to reduce slightly rounding errors |
|
Maximum number of stored vector pairs.
|
|
Number of movable atoms.
|
|
Old and new scaling values. Also used in the Strang recurrence formula. |
|
Stored former steps. Vectors stored in column order. |
|
Stored former changes in gradients. Vectors stored in column order. |
|
Temporarily used memory for saving scalars associated with the stored vector pairs.
|