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

#include <ions_move_bfgs2.h>

Collaboration diagram for Ions_Move_BFGS2:

Public Member Functions

void allocate (const int _size)
 initialize H0、H、pos0、force0、force
void reset ()
bool relax_step (const ModuleBase::matrix &_force, UnitCell &ucell, std::ofstream &ofs_running, const Relax_Criteria &criteria)
bool get_is_initialized () const
 whether allocate() has run and the optimiser holds live state. reset() clears it; ions_move_methods_test checks that.

Private Member Functions

void PrepareStep (std::vector< ModuleBase::Vector3< double > > &force, std::vector< ModuleBase::Vector3< double > > &pos, std::vector< std::vector< double > > &H, std::vector< double > &pos0, std::vector< double > &force0, std::vector< double > &steplength, std::vector< ModuleBase::Vector3< double > > &dpos, int &size, UnitCell &ucell)
bool IsRestrain (const double force_thr_ev)
void CalculateLargestGrad (const ModuleBase::matrix &_force, UnitCell &ucell)
void GetPos (UnitCell &ucell, std::vector< ModuleBase::Vector3< double > > &pos)
void GetPostaud (UnitCell &ucell, std::vector< ModuleBase::Vector3< double > > &pos_taud)
void Update (std::vector< double > &pos, std::vector< double > &force, std::vector< std::vector< double > > &H, UnitCell &ucell)
void DetermineStep (std::vector< double > &steplength, std::vector< ModuleBase::Vector3< double > > &dpos, double &maxstep)
void UpdatePos (UnitCell &ucell)

Private Attributes

bool sign
double alpha
double maxstep
int size
bool is_initialized = false
std::vector< double > steplength
std::vector< std::vector< double > > H
std::vector< double > force0
std::vector< ModuleBase::Vector3< double > > force
std::vector< double > pos0
std::vector< ModuleBase::Vector3< double > > pos
std::vector< double > pos_taud0
std::vector< ModuleBase::Vector3< double > > pos_taud
std::vector< ModuleBase::Vector3< double > > dpos

Friends

class BFGSTest

Member Function Documentation

◆ allocate()

void Ions_Move_BFGS2::allocate ( const int _size)

initialize H0、H、pos0、force0、force

Here is the caller graph for this function:

◆ CalculateLargestGrad()

void Ions_Move_BFGS2::CalculateLargestGrad ( const ModuleBase::matrix & _force,
UnitCell & ucell )
private
Here is the caller graph for this function:

◆ DetermineStep()

void Ions_Move_BFGS2::DetermineStep ( std::vector< double > & steplength,
std::vector< ModuleBase::Vector3< double > > & dpos,
double & maxstep )
private
Here is the caller graph for this function:

◆ get_is_initialized()

bool Ions_Move_BFGS2::get_is_initialized ( ) const
inline

whether allocate() has run and the optimiser holds live state. reset() clears it; ions_move_methods_test checks that.

◆ GetPos()

void Ions_Move_BFGS2::GetPos ( UnitCell & ucell,
std::vector< ModuleBase::Vector3< double > > & pos )
private
Here is the caller graph for this function:

◆ GetPostaud()

void Ions_Move_BFGS2::GetPostaud ( UnitCell & ucell,
std::vector< ModuleBase::Vector3< double > > & pos_taud )
private
Here is the caller graph for this function:

◆ IsRestrain()

bool Ions_Move_BFGS2::IsRestrain ( const double force_thr_ev)
private
Here is the caller graph for this function:

◆ PrepareStep()

void Ions_Move_BFGS2::PrepareStep ( std::vector< ModuleBase::Vector3< double > > & force,
std::vector< ModuleBase::Vector3< double > > & pos,
std::vector< std::vector< double > > & H,
std::vector< double > & pos0,
std::vector< double > & force0,
std::vector< double > & steplength,
std::vector< ModuleBase::Vector3< double > > & dpos,
int & size,
UnitCell & ucell )
private

call dysev

Here is the call graph for this function:
Here is the caller graph for this function:

◆ relax_step()

bool Ions_Move_BFGS2::relax_step ( const ModuleBase::matrix & _force,
UnitCell & ucell,
std::ofstream & ofs_running,
const Relax_Criteria & criteria )
Here is the call graph for this function:

◆ reset()

void Ions_Move_BFGS2::reset ( )

◆ Update()

void Ions_Move_BFGS2::Update ( std::vector< double > & pos,
std::vector< double > & force,
std::vector< std::vector< double > > & H,
UnitCell & ucell )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePos()

void Ions_Move_BFGS2::UpdatePos ( UnitCell & ucell)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BFGSTest

friend class BFGSTest
friend

Member Data Documentation

◆ alpha

double Ions_Move_BFGS2::alpha
private

◆ dpos

std::vector<ModuleBase::Vector3<double> > Ions_Move_BFGS2::dpos
private

◆ force

std::vector<ModuleBase::Vector3<double> > Ions_Move_BFGS2::force
private

◆ force0

std::vector<double> Ions_Move_BFGS2::force0
private

◆ H

std::vector<std::vector<double> > Ions_Move_BFGS2::H
private

◆ is_initialized

bool Ions_Move_BFGS2::is_initialized = false
private

◆ maxstep

double Ions_Move_BFGS2::maxstep
private

◆ pos

std::vector<ModuleBase::Vector3<double> > Ions_Move_BFGS2::pos
private

◆ pos0

std::vector<double> Ions_Move_BFGS2::pos0
private

◆ pos_taud

std::vector<ModuleBase::Vector3<double> > Ions_Move_BFGS2::pos_taud
private

◆ pos_taud0

std::vector<double> Ions_Move_BFGS2::pos_taud0
private

◆ sign

bool Ions_Move_BFGS2::sign
private

◆ size

int Ions_Move_BFGS2::size
private

◆ steplength

std::vector<double> Ions_Move_BFGS2::steplength
private

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