BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | List of all members
BALL::ShiftedLVMMMinimizer Class Reference

#include <BALL/MOLMEC/MINIMIZATION/shiftedLVMM.h>

Inheritance diagram for BALL::ShiftedLVMMMinimizer:
BALL::EnergyMinimizer

Classes

struct  Default
 
struct  Option
 

Public Types

Enums
enum  UpdateMethod { RANK_1 = 1, RANK_2 = 2 }
 
enum  CorrectionParameter {
  UNIT_VALUE = 1, BALANCING_VALUE = 2, SQUARE_ROOT = 3, GEOMETRIC_MEAN = 4,
  RATIO_OF_SHIFT_PARAMS = 5
}
 

Public Member Functions

Constructors and Destructors
 ShiftedLVMMMinimizer ()
 
 ShiftedLVMMMinimizer (ForceField &force_field)
 
 ShiftedLVMMMinimizer (ForceField &force_field, SnapShotManager *ssm)
 
 ShiftedLVMMMinimizer (ForceField &force_field, SnapShotManager *ssm, const Options &options)
 
 ShiftedLVMMMinimizer (ForceField &force_field, const Options &options)
 
 ShiftedLVMMMinimizer (const ShiftedLVMMMinimizer &rhs)
 
virtual ~ShiftedLVMMMinimizer ()
 
Assignments
const ShiftedLVMMMinimizeroperator= (const ShiftedLVMMMinimizer &rhs)
 
Setup methods. They do all necessary preparations.
virtual bool specificSetup ()
 
Accessors
void setUpdateMethod (UpdateMethod updt)
 
UpdateMethod getUpdateMethod () const
 
void setCorrectionParameter (CorrectionParameter corr)
 
CorrectionParameter getCorrectionParameter () const
 
void setMaxNumOfColumns (Size num)
 
Size getMaxNumOfColumns () const
 
virtual double findStep ()
 
virtual void updateDirection ()
 
virtual bool minimize (Size iterations=0, bool resume=false)
 
- Public Member Functions inherited from BALL::EnergyMinimizer
bool operator== (const EnergyMinimizer &energy_minimizer)
 
 EnergyMinimizer ()
 
 EnergyMinimizer (ForceField &force_field)
 
 EnergyMinimizer (ForceField &force_field, const Options &options)
 
 EnergyMinimizer (const EnergyMinimizer &energy_minimizer)
 
virtual ~EnergyMinimizer ()
 
const EnergyMinimizeroperator= (const EnergyMinimizer &energy_minimizer)
 
bool isValid () const
 
bool setup (ForceField &force_field)
 
bool setup (ForceField &force_field, SnapShotManager *ssm)
 
bool setup (ForceField &force_field, SnapShotManager *ssm, const Options &options)
 
bool setup (ForceField &force_field, const Options &options)
 
virtual bool isConverged () const
 
virtual double updateEnergy ()
 
virtual void updateForces ()
 
void storeGradientEnergy ()
 
virtual void printEnergy () const
 
virtual void takeSnapShot () const
 
virtual void finishIteration ()
 
Size getNumberOfIterations () const
 
GradientgetDirection ()
 
GradientgetGradient ()
 
GradientgetInitialGradient ()
 
double getEnergy () const
 
doublegetEnergy ()
 
double getInitialEnergy () const
 
doublegetInitialEnergy ()
 
void setNumberOfIterations (Size number_of_iterations)
 
Size getMaxNumberOfIterations () const
 
void setMaxNumberOfIterations (Size number_of_iterations)
 
void setMaxSameEnergy (Size number)
 
Size getMaxSameEnergy () const
 
void setEnergyOutputFrequency (Size energy_output_frequency)
 
Size getEnergyOutputFrequency () const
 
void setEnergyDifferenceBound (float energy_difference_bound)
 
float getEnergyDifferenceBound () const
 
void setMaxGradient (float max_gradient)
 
float getMaxGradient () const
 
void setMaximumDisplacement (float maximum_displacement)
 
float getMaximumDisplacement () const
 
void setSnapShotFrequency (Size snapshot_frequency)
 
Size getSnapShotFrequency () const
 
ForceFieldgetForceField ()
 
Size getForceUpdateCounter () const
 
Size getEnergyUpdateCounter () const
 
void enableEnergyAbortCondition (bool state)
 
bool energyAbortConditionEnabled () const
 Query if the MDSimulation aborts if the Energy is greater than abort_energy_. More...
 
void setEnergyToAbort (float value)
 
float getEnergyToAbort () const
 
bool wasAborted () const
 

Protected Attributes

Protected Attributes
LineSearch line_search_
 
bool first_iter_
 
Size number_of_atoms_
 
Size max_number_of_cols_
 
Size curr_number_of_cols_
 
Size updt_method_
 
Size corr_par_
 
double prev_shift_val_
 
vector< Vector3shift_s_
 
vector< Vector3grad_diff_
 
vector< floatupdt_u_
 
vector< floatupdt_v_
 
vector< Vector3shifted_direction_
 
vector< Vector3hess_factor_
 
vector< Vector3initial_atoms_
 
- Protected Attributes inherited from BALL::EnergyMinimizer
Gradient initial_grad_
 
Gradient current_grad_
 
double initial_energy_
 
double current_energy_
 
Gradient old_grad_
 
double old_energy_
 
Gradient direction_
 
bool valid_
 
SnapShotManagersnapshot_
 
ForceFieldforce_field_
 
Size number_of_iterations_
 
Size maximal_number_of_iterations_
 
Size energy_output_frequency_
 
Size snapshot_frequency_
 
double energy_difference_bound_
 
double max_gradient_
 
Size max_same_energy_
 
Size same_energy_counter_
 
float maximum_displacement_
 
Size force_update_counter_
 
Size energy_update_counter_
 
float cutlo_
 
double step_
 
bool abort_by_energy_enabled_
 
float abort_energy_
 
bool aborted_
 

Additional Inherited Members

- Public Attributes inherited from BALL::EnergyMinimizer
Options options
 

Detailed Description

Shifted limited-memory variable metric methods minimizer. A minimizer for geometry optimization based upon the shifted limited-memory variable metric methods proposed in

[1] Vlcek J., Luksan L.. New variable metric methods for unconstrained minimization covering the large-scale case. Report V-876, Prague, ICS AS CR, 2002.

[2] Vlcek J., Luksan L.. Additional properties of shifted variable metric methods. Report V-899, Prague, ICS AS CR, 2004.

[3] Vlcek J., Luksan L.. Shifted limited-memory variable metric methods for large-scale unconstrained optimization. Journal of Computational and Applied Mathematics 186 (2), pp. 365-390.

Definition at line 36 of file shiftedLVMM.h.

Member Enumeration Documentation

The different correction parameters implemented.

Enumerator
UNIT_VALUE 

Unit value, i.e. rho = 1.0.

BALANCING_VALUE 

Balancing value.

SQUARE_ROOT 

Square root.

GEOMETRIC_MEAN 

Geometric mean.

RATIO_OF_SHIFT_PARAMS 

Ratio of shift parameters.

Definition at line 106 of file shiftedLVMM.h.

The different variationally derived methods implemented.

Enumerator
RANK_1 

Rank 1 variationally derived method.

RANK_2 

Rank 2 variationally derived method.

Definition at line 93 of file shiftedLVMM.h.

Constructor & Destructor Documentation

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( )

Default constructor.

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( ForceField force_field)

Constructor expecting a valid force field

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( ForceField force_field,
SnapShotManager ssm 
)

Constructor expecting a valid force field and a snapshot manager

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( ForceField force_field,
SnapShotManager ssm,
const Options options 
)

Constructor expecting a valid force field, a snapshot manager and options

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( ForceField force_field,
const Options options 
)

Constructor expecting a valid force field and options

BALL::ShiftedLVMMMinimizer::ShiftedLVMMMinimizer ( const ShiftedLVMMMinimizer rhs)

Copy constructor

virtual BALL::ShiftedLVMMMinimizer::~ShiftedLVMMMinimizer ( )
virtual

Destructor.

Member Function Documentation

virtual double BALL::ShiftedLVMMMinimizer::findStep ( )
virtual

Calculate the next step. First, this method updates the model. Second, it performs a line search along the calculated direction afterwards.

Returns
double $\geq 0$ if the line search found an acceptable solution, otherwise -1.
See also
EnergyMinimizer::findStep

Reimplemented from BALL::EnergyMinimizer.

CorrectionParameter BALL::ShiftedLVMMMinimizer::getCorrectionParameter ( ) const

Return the correction parameter

Size BALL::ShiftedLVMMMinimizer::getMaxNumOfColumns ( ) const

Return the maximum number of columns of the factor of the shifted inverse hessian approximation.

UpdateMethod BALL::ShiftedLVMMMinimizer::getUpdateMethod ( ) const

Return the update method

virtual bool BALL::ShiftedLVMMMinimizer::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.

Parameters
iterationsthe maximum number of iterations
resumetrue to resume a previous run
See also
EnergyMinimizer::minimize

Reimplemented from BALL::EnergyMinimizer.

const ShiftedLVMMMinimizer& BALL::ShiftedLVMMMinimizer::operator= ( const ShiftedLVMMMinimizer rhs)

Assignment operator

void BALL::ShiftedLVMMMinimizer::setCorrectionParameter ( CorrectionParameter  corr)

Set explicitly the correction parameter

void BALL::ShiftedLVMMMinimizer::setMaxNumOfColumns ( Size  num)

Set explicitly the maximum number of columns of the factor of the shifted inverse hessian approximation.

void BALL::ShiftedLVMMMinimizer::setUpdateMethod ( UpdateMethod  updt)

Set explicitly the update method

virtual bool BALL::ShiftedLVMMMinimizer::specificSetup ( )
virtual

Specific setup

Reimplemented from BALL::EnergyMinimizer.

virtual void BALL::ShiftedLVMMMinimizer::updateDirection ( )
virtual

Update the shifted inverse hessian approximation. Afterwards, compute the search direction.

Reimplemented from BALL::EnergyMinimizer.

Member Data Documentation

Size BALL::ShiftedLVMMMinimizer::corr_par_
protected

Correction parameter

Definition at line 269 of file shiftedLVMM.h.

Size BALL::ShiftedLVMMMinimizer::curr_number_of_cols_
protected

Current number of columns of the factor of the shifted inverse hessian approximation.

Definition at line 261 of file shiftedLVMM.h.

bool BALL::ShiftedLVMMMinimizer::first_iter_
protected

Is this an initial first iteration?

Definition at line 247 of file shiftedLVMM.h.

vector<Vector3> BALL::ShiftedLVMMMinimizer::grad_diff_
protected

Current gradient difference.

Definition at line 281 of file shiftedLVMM.h.

vector<Vector3> BALL::ShiftedLVMMMinimizer::hess_factor_
protected

Factor of the shifted inverse hessian approximation in column order, $U_k$ in [3].

Definition at line 298 of file shiftedLVMM.h.

vector<Vector3> BALL::ShiftedLVMMMinimizer::initial_atoms_
protected

Positions of the movable atoms when we start an iteration. This is used to reduce slightly rounding errors

Definition at line 303 of file shiftedLVMM.h.

LineSearch BALL::ShiftedLVMMMinimizer::line_search_
protected

The line search

Definition at line 243 of file shiftedLVMM.h.

Size BALL::ShiftedLVMMMinimizer::max_number_of_cols_
protected

Maximum number of columns of the factor of the shifted inverse hessian approximation.

Definition at line 256 of file shiftedLVMM.h.

Size BALL::ShiftedLVMMMinimizer::number_of_atoms_
protected

Number of movable atoms.

Definition at line 251 of file shiftedLVMM.h.

double BALL::ShiftedLVMMMinimizer::prev_shift_val_
protected

Shift value of the previous iteration.

Definition at line 273 of file shiftedLVMM.h.

vector<Vector3> BALL::ShiftedLVMMMinimizer::shift_s_
protected

Shifted previous step.

Definition at line 277 of file shiftedLVMM.h.

vector<Vector3> BALL::ShiftedLVMMMinimizer::shifted_direction_
protected

Direction of the shifted step, i. e. $-U_k \cdot U_k^T \cdot g_k$.

Definition at line 293 of file shiftedLVMM.h.

Size BALL::ShiftedLVMMMinimizer::updt_method_
protected

Update method

Definition at line 265 of file shiftedLVMM.h.

vector<float> BALL::ShiftedLVMMMinimizer::updt_u_
protected

Needed vector for the update.

Definition at line 285 of file shiftedLVMM.h.

vector<float> BALL::ShiftedLVMMMinimizer::updt_v_
protected

Needed vector for the update.

Definition at line 289 of file shiftedLVMM.h.