ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Ions_Move_BFGS Class Reference

#include <ions_move_bfgs.h>

Inheritance diagram for Ions_Move_BFGS:
Collaboration diagram for Ions_Move_BFGS:

Public Member Functions

 Ions_Move_BFGS ()
 ~Ions_Move_BFGS ()
void allocate (void)
void reset (void)
bool start (UnitCell &ucell, const ModuleBase::matrix &force, const double &energy_in, const int istep, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, const Relax_Criteria &criteria)
bool & get_init_done ()
 whether allocate() has already run
bool & get_first_step ()
 whether this is the first step of the relaxation
void bfgs_routine_for_testing (const double &lat0, const int istep, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, const std::string &out_level, const int test_relax_method)
void restart_bfgs_for_testing (const double &lat0, int &update_iter, std::ofstream &ofs, const int test_relax_method)
Public Member Functions inherited from BFGS_Basic
 BFGS_Basic ()
 ~BFGS_Basic ()=default
std::vector< double > & get_pos ()
 3N coordinates of the system ( x )
std::vector< double > & get_grad ()
 3N components of ( grad( V(x) ) )
std::vector< double > & get_move ()
 the step taken, pos = pos_p + move
std::vector< double > & get_pos_p ()
 coordinates of the previous step
std::vector< double > & get_grad_p ()
 gradient of the previous step
std::vector< double > & get_move_p ()
 step taken at the previous step
bool & get_save_flag ()
 whether a bfgs state has been saved
bool & get_tr_min_hit ()
 whether the trust radius already hit its minimum last step
bool & get_wolfe_flag ()
 whether the Wolfe conditions were satisfied
ModuleBase::matrix & get_inv_hess ()
 the inverse Hessian of the BFGS update
int & get_bfgs_ndim ()
 number of previous steps kept by the BFGS update
void allocate_basic_for_testing ()
void new_step_for_testing (const double &lat0, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, const int test_relax_method)
void reset_hessian_for_testing ()
void save_bfgs_for_testing ()
void update_inverse_hessian_for_testing (const double &lat0, std::ofstream &ofs)
void check_wolfe_conditions_for_testing (std::ofstream &ofs, std::vector< double > &etot_info)
void compute_trust_radius_for_testing (std::ofstream &ofs, std::vector< double > &etot_info, const int test_relax_method)

Private Member Functions

void bfgs_routine (const double &lat0, const int istep, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, const std::string &out_level, const int test_relax_method)
void restart_bfgs (const double &lat0, int &update_iter, std::ofstream &ofs, const int test_relax_method)

Private Attributes

bool init_done
bool first_step = true

Additional Inherited Members

Static Public Attributes inherited from BFGS_Basic
static double relax_bfgs_w1 = -1.0
static double relax_bfgs_w2 = -1.0
Protected Member Functions inherited from BFGS_Basic
void allocate_basic (void)
void new_step (const double &lat0, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, const int test_relax_method)
void reset_hessian (void)
void save_bfgs (void)
double check_move (const double &lat0, const double &pos, const double &pos_p)
Protected Attributes inherited from BFGS_Basic
std::vector< double > pos
std::vector< double > grad
std::vector< double > move
std::vector< double > pos_p
std::vector< double > grad_p
std::vector< double > move_p
bool save_flag = false
bool tr_min_hit = false

Constructor & Destructor Documentation

◆ Ions_Move_BFGS()

Ions_Move_BFGS::Ions_Move_BFGS ( )

◆ ~Ions_Move_BFGS()

Ions_Move_BFGS::~Ions_Move_BFGS ( )

Member Function Documentation

◆ allocate()

void Ions_Move_BFGS::allocate ( void )
Here is the call graph for this function:

◆ bfgs_routine()

void Ions_Move_BFGS::bfgs_routine ( const double & lat0,
const int istep,
int & update_iter,
std::ofstream & ofs,
std::vector< double > & etot_info,
const std::string & out_level,
const int test_relax_method )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bfgs_routine_for_testing()

void Ions_Move_BFGS::bfgs_routine_for_testing ( const double & lat0,
const int istep,
int & update_iter,
std::ofstream & ofs,
std::vector< double > & etot_info,
const std::string & out_level,
const int test_relax_method )
inline
Here is the call graph for this function:

◆ get_first_step()

bool & Ions_Move_BFGS::get_first_step ( )
inline

whether this is the first step of the relaxation

Here is the caller graph for this function:

◆ get_init_done()

bool & Ions_Move_BFGS::get_init_done ( )
inline

whether allocate() has already run

◆ reset()

void Ions_Move_BFGS::reset ( void )
Here is the call graph for this function:

◆ restart_bfgs()

void Ions_Move_BFGS::restart_bfgs ( const double & lat0,
int & update_iter,
std::ofstream & ofs,
const int test_relax_method )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restart_bfgs_for_testing()

void Ions_Move_BFGS::restart_bfgs_for_testing ( const double & lat0,
int & update_iter,
std::ofstream & ofs,
const int test_relax_method )
inline
Here is the call graph for this function:

◆ start()

bool Ions_Move_BFGS::start ( UnitCell & ucell,
const ModuleBase::matrix & force,
const double & energy_in,
const int istep,
int & update_iter,
std::ofstream & ofs,
std::vector< double > & etot_info,
const Relax_Criteria & criteria )
Here is the call graph for this function:

Member Data Documentation

◆ first_step

bool Ions_Move_BFGS::first_step = true
private

◆ init_done

bool Ions_Move_BFGS::init_done
private

The documentation for this class was generated from the following files: