Loading...
Searching...
No Matches
strangLBFGS.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: strangLBFGS.h,v 1.1.4.6 2007/08/07 09:12:36 aleru Exp $
//
#ifndef BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_H
#define BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_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 StrangLBFGSMinimizer
: public EnergyMinimizer
{
public:
BALL_CREATE(StrangLBFGSMinimizer)
struct Option
{
static const char* IMPROVED;
static const char* NUM_OF_STORED_VECT_PAIRS;
};
struct BALL_EXPORT Default
{
static const bool IMPROVED;
static const Size NUM_OF_STORED_VECT_PAIRS;
};
StrangLBFGSMinimizer();
StrangLBFGSMinimizer(ForceField& force_field);
StrangLBFGSMinimizer(ForceField& force_field, SnapShotManager *ssm);
StrangLBFGSMinimizer(ForceField& force_field, SnapShotManager* ssm, const Options& options);
StrangLBFGSMinimizer(ForceField& force_field, const Options& options);
StrangLBFGSMinimizer(const StrangLBFGSMinimizer& rhs);
virtual ~StrangLBFGSMinimizer();
const StrangLBFGSMinimizer& operator=(const StrangLBFGSMinimizer& rhs);
virtual bool specificSetup();
void setMaxNumOfStoredVectPairs(Size num);
Size getMaxNumOfStoredVectPairs() const;
void setImprovedFlag(bool flag);
bool getImprovedFlag() const;
virtual double findStep();
virtual void updateDirection();
virtual bool minimize(Size iterations = 0, bool resume = false);
protected:
LineSearch line_search_;
bool first_iter_;
Size number_of_atoms_;
Size max_num_of_vect_pairs_;
Size curr_num_of_vect_pairs_;
bool improved_;
vector<float> rho_;
vector<Vector3> stored_s_;
vector<Vector3> stored_y_;
vector<float> work_val_;
Size index_of_free_vect_;
std::vector<Vector3> initial_atoms_;
};
} // end of namespace BALL
#endif // BALL_MOLMEC_MINIMIZATION_STRANGLBFGS_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::EnergyMinimizer::EnergyMinimizer
EnergyMinimizer()
BALL::EnergyMinimizer::options
Options options
Definition energyMinimizer.h:434
BALL::ForceField
Definition forceField.h:86
BALL::LineSearch
Definition lineSearch.h:33
BALL::Options
Definition options.h:48
BALL::SnapShotManager
Definition snapShotManager.h:34
BALL::StrangLBFGSMinimizer::stored_y_
vector< Vector3 > stored_y_
Definition strangLBFGS.h:217
BALL::StrangLBFGSMinimizer::findStep
virtual double findStep()
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer(ForceField &force_field, const Options &options)
BALL::StrangLBFGSMinimizer::operator=
const StrangLBFGSMinimizer & operator=(const StrangLBFGSMinimizer &rhs)
BALL::StrangLBFGSMinimizer::work_val_
vector< float > work_val_
Definition strangLBFGS.h:222
BALL::StrangLBFGSMinimizer::setImprovedFlag
void setImprovedFlag(bool flag)
BALL::StrangLBFGSMinimizer::max_num_of_vect_pairs_
Size max_num_of_vect_pairs_
Definition strangLBFGS.h:196
BALL::StrangLBFGSMinimizer::first_iter_
bool first_iter_
Definition strangLBFGS.h:188
BALL::StrangLBFGSMinimizer::~StrangLBFGSMinimizer
virtual ~StrangLBFGSMinimizer()
BALL::StrangLBFGSMinimizer::updateDirection
virtual void updateDirection()
BALL::StrangLBFGSMinimizer::initial_atoms_
std::vector< Vector3 > initial_atoms_
Definition strangLBFGS.h:232
BALL::StrangLBFGSMinimizer::minimize
virtual bool minimize(Size iterations=0, bool resume=false)
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer(ForceField &force_field)
BALL::StrangLBFGSMinimizer::stored_s_
vector< Vector3 > stored_s_
Definition strangLBFGS.h:212
BALL::StrangLBFGSMinimizer::curr_num_of_vect_pairs_
Size curr_num_of_vect_pairs_
Definition strangLBFGS.h:200
BALL::StrangLBFGSMinimizer::specificSetup
virtual bool specificSetup()
BALL::StrangLBFGSMinimizer::improved_
bool improved_
Definition strangLBFGS.h:204
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer(ForceField &force_field, SnapShotManager *ssm, const Options &options)
BALL::StrangLBFGSMinimizer::setMaxNumOfStoredVectPairs
void setMaxNumOfStoredVectPairs(Size num)
BALL::StrangLBFGSMinimizer::getImprovedFlag
bool getImprovedFlag() const
BALL::StrangLBFGSMinimizer::getMaxNumOfStoredVectPairs
Size getMaxNumOfStoredVectPairs() const
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer()
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer(ForceField &force_field, SnapShotManager *ssm)
BALL::StrangLBFGSMinimizer::line_search_
LineSearch line_search_
Definition strangLBFGS.h:184
BALL::StrangLBFGSMinimizer::number_of_atoms_
Size number_of_atoms_
Definition strangLBFGS.h:192
BALL::StrangLBFGSMinimizer::rho_
vector< float > rho_
Definition strangLBFGS.h:208
BALL::StrangLBFGSMinimizer::index_of_free_vect_
Size index_of_free_vect_
Definition strangLBFGS.h:227
BALL::StrangLBFGSMinimizer::StrangLBFGSMinimizer
StrangLBFGSMinimizer(const StrangLBFGSMinimizer &rhs)
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::StrangLBFGSMinimizer::Default
Definition strangLBFGS.h:66
BALL::StrangLBFGSMinimizer::Default::NUM_OF_STORED_VECT_PAIRS
static const Size NUM_OF_STORED_VECT_PAIRS
Definition strangLBFGS.h:75
BALL::StrangLBFGSMinimizer::Default::IMPROVED
static const bool IMPROVED
Definition strangLBFGS.h:70
BALL::StrangLBFGSMinimizer::Option
Definition strangLBFGS.h:55
BALL::StrangLBFGSMinimizer::Option::IMPROVED
static const char * IMPROVED
Definition strangLBFGS.h:58
BALL::StrangLBFGSMinimizer::Option::NUM_OF_STORED_VECT_PAIRS
static const char * NUM_OF_STORED_VECT_PAIRS
Definition strangLBFGS.h:62