Loading...
Searching...
No Matches
conjugateGradient.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: conjugateGradient.h,v 1.29.20.6 2007/08/07 09:12:33 aleru Exp $
//
#ifndef BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
#define BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
#ifndef BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
# include <BALL/MOLMEC/MINIMIZATION/energyMinimizer.h>
#endif
#ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
# include <BALL/MOLMEC/MINIMIZATION/lineSearch.h>
#endif
namespace BALL
{
class BALL_EXPORT ConjugateGradientMinimizer
: public EnergyMinimizer
{
public:
enum UpdateMethod
{
POLAK_RIBIERE = 1,
FLETCHER_REEVES = 2,
SHANNO = 3
};
struct Option
{
static const char* UPDATE_METHOD;
};
struct BALL_EXPORT Default
{
static const Size UPDATE_METHOD;
};
BALL_CREATE(ConjugateGradientMinimizer)
ConjugateGradientMinimizer();
ConjugateGradientMinimizer(ForceField& force_field);
ConjugateGradientMinimizer(ForceField& force_field,SnapShotManager *ssm);
ConjugateGradientMinimizer(ForceField& force_field,
SnapShotManager* ssm, const Options& options);
ConjugateGradientMinimizer(ForceField& force_field, const Options& options);
ConjugateGradientMinimizer(const ConjugateGradientMinimizer& rhs);
virtual ~ConjugateGradientMinimizer();
const ConjugateGradientMinimizer& operator = (const ConjugateGradientMinimizer& rhs);
virtual bool specificSetup();
void setUpdateMethod(UpdateMethod method);
UpdateMethod getUpdateMethod() const;
virtual double findStep();
virtual void updateDirection();
virtual bool minimize(Size iterations = 0, bool resume = false);
protected:
LineSearch line_search_;
Gradient unscaled_direction_;
Size number_of_atoms_;
Size updt_method_;
bool first_iter_;
double old_gtg_;
vector<Vector3> a_i_;
vector<Vector3> b_i_;
vector<Vector3> p_t_;
vector<Vector3> y_t_;
vector<Vector3> p_i_;
vector<Vector3> y_i_;
double D_1_;
double D_4_;
Size restart_frequency_;
Size last_restart_iter_;
};
} // end of namespace BALL
#endif // BALL_MOLMEC_MINIMIZATION_CONJUGATEGRADIENT_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::ConjugateGradientMinimizer::b_i_
vector< Vector3 > b_i_
Definition conjugateGradient.h:220
BALL::ConjugateGradientMinimizer::getUpdateMethod
UpdateMethod getUpdateMethod() const
BALL::ConjugateGradientMinimizer::old_gtg_
double old_gtg_
Definition conjugateGradient.h:212
BALL::ConjugateGradientMinimizer::specificSetup
virtual bool specificSetup()
BALL::ConjugateGradientMinimizer::findStep
virtual double findStep()
BALL::ConjugateGradientMinimizer::a_i_
vector< Vector3 > a_i_
Definition conjugateGradient.h:216
BALL::ConjugateGradientMinimizer::minimize
virtual bool minimize(Size iterations=0, bool resume=false)
BALL::ConjugateGradientMinimizer::last_restart_iter_
Size last_restart_iter_
Definition conjugateGradient.h:255
BALL::ConjugateGradientMinimizer::p_t_
vector< Vector3 > p_t_
Definition conjugateGradient.h:224
BALL::ConjugateGradientMinimizer::y_i_
vector< Vector3 > y_i_
Definition conjugateGradient.h:236
BALL::ConjugateGradientMinimizer::restart_frequency_
Size restart_frequency_
Definition conjugateGradient.h:248
BALL::ConjugateGradientMinimizer::p_i_
vector< Vector3 > p_i_
Definition conjugateGradient.h:232
BALL::ConjugateGradientMinimizer::updateDirection
virtual void updateDirection()
BALL::ConjugateGradientMinimizer::ConjugateGradientMinimizer
ConjugateGradientMinimizer()
BALL::ConjugateGradientMinimizer::first_iter_
bool first_iter_
Definition conjugateGradient.h:208
BALL::ConjugateGradientMinimizer::D_4_
double D_4_
Definition conjugateGradient.h:244
BALL::ConjugateGradientMinimizer::D_1_
double D_1_
Definition conjugateGradient.h:240
BALL::ConjugateGradientMinimizer::unscaled_direction_
Gradient unscaled_direction_
Definition conjugateGradient.h:196
BALL::ConjugateGradientMinimizer::updt_method_
Size updt_method_
Definition conjugateGradient.h:204
BALL::ConjugateGradientMinimizer::UpdateMethod
UpdateMethod
Definition conjugateGradient.h:53
BALL::ConjugateGradientMinimizer::POLAK_RIBIERE
@ POLAK_RIBIERE
Definition conjugateGradient.h:56
BALL::ConjugateGradientMinimizer::SHANNO
@ SHANNO
Definition conjugateGradient.h:64
BALL::ConjugateGradientMinimizer::FLETCHER_REEVES
@ FLETCHER_REEVES
Definition conjugateGradient.h:60
BALL::ConjugateGradientMinimizer::y_t_
vector< Vector3 > y_t_
Definition conjugateGradient.h:228
BALL::ConjugateGradientMinimizer::number_of_atoms_
Size number_of_atoms_
Definition conjugateGradient.h:200
BALL::ConjugateGradientMinimizer::setUpdateMethod
void setUpdateMethod(UpdateMethod method)
BALL::ConjugateGradientMinimizer::line_search_
LineSearch line_search_
Definition conjugateGradient.h:192
BALL::EnergyMinimizer::EnergyMinimizer
EnergyMinimizer()
BALL::EnergyMinimizer::options
Options options
Definition energyMinimizer.h:434
BALL::ForceField
Definition forceField.h:86
BALL::Gradient
Definition gradient.h:45
BALL::LineSearch
Definition lineSearch.h:33
BALL::Options
Definition options.h:48
BALL::SnapShotManager
Definition snapShotManager.h:34
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
energyMinimizer.h
lineSearch.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::ConjugateGradientMinimizer::Default
Definition conjugateGradient.h:84
BALL::ConjugateGradientMinimizer::Default::UPDATE_METHOD
static const Size UPDATE_METHOD
Definition conjugateGradient.h:87
BALL::ConjugateGradientMinimizer::Option
Definition conjugateGradient.h:75
BALL::ConjugateGradientMinimizer::Option::UPDATE_METHOD
static const char * UPDATE_METHOD
Definition conjugateGradient.h:78