44 std::ofstream &ofs_running);
119 std::vector<int> &steps,
126 std::ofstream &ofs_running);
145 std::ofstream &ofs_running);
185 const bool geometry_evaluated,
186 std::ofstream &ofs_running);
Optimizer for ionic position relaxation and cell parameter optimization.
Definition relax_nsync.h:26
void esolve(const int istep, ModuleESolver::ESolver *p_esolver, UnitCell &ucell, const Input_para &inp, ModuleBase::matrix &force, ModuleBase::matrix &stress, double &etot)
Perform energy solving for the current step.
Definition relax_driver.cpp:165
Relax rl
New relaxation optimizer (Relax class).
Definition relax_driver.h:57
void print_dry_run_message() const
Print the dry-run success message to screen.
Definition relax_driver.cpp:403
void stru_out(const int istep, UnitCell &ucell, const Input_para &inp, const double etot, const ModuleBase::matrix &stress, const ModuleBase::matrix &force, std::ofstream &ofs_running)
Output structure files before relaxation move.
Definition relax_driver.cpp:227
bool deepks_setorb_
Cached DeePKS setorb flag (read once from PARAM at relax_driver entry).
Definition relax_driver.h:64
bool relax_step(std::vector< int > &steps, ModuleESolver::ESolver *p_esolver, UnitCell &ucell, const Input_para &inp, const ModuleBase::matrix &force, const ModuleBase::matrix &stress, const double etot, std::ofstream &ofs_running)
Perform one relaxation step.
Definition relax_driver.cpp:189
void print_not_converged_summary(const int ionic_steps, const Input_para &inp, std::ofstream &ofs_running) const
Print the unified not-converged summary to the running log.
Definition relax_driver.cpp:378
void json_out(ModuleESolver::ESolver *p_esolver, UnitCell &ucell, const Input_para &inp, const ModuleBase::matrix &force, const ModuleBase::matrix &stress)
Output JSON format results.
Definition relax_driver.cpp:294
void init_relax(const int nat, const Input_para &inp)
Initialize the relaxation optimizer.
Definition relax_driver.cpp:130
IonCellOptimizer rl_old
Old relaxation optimizer (IonCellOptimizer class).
Definition relax_driver.h:59
void final_out(const int istep, const RelaxStopReason stop_reason, UnitCell &ucell, const Input_para &inp, const double etot, const ModuleBase::matrix &stress, const ModuleBase::matrix &force, const bool geometry_evaluated, std::ofstream &ofs_running)
Output final results after relaxation.
Definition relax_driver.cpp:310
RelaxStopReason
Definition relax_driver.h:48
@ UserExit
Definition relax_driver.h:51
@ Finished
Definition relax_driver.h:53
@ MaxSteps
Definition relax_driver.h:50
@ DryRun
Definition relax_driver.h:52
@ Converged
Definition relax_driver.h:49
int my_rank_
Cached MPI rank (read once at relax_driver entry).
Definition relax_driver.h:66
Relax_Driver()
Definition relax_driver.h:25
void relax_driver(ModuleESolver::ESolver *p_esolver, UnitCell &ucell, const Input_para &inp, std::ofstream &ofs_running)
Main driver function for relaxation calculations.
Definition relax_driver.cpp:17
~Relax_Driver()
Definition relax_driver.h:26
void iter_info(const std::vector< int > &steps, const Input_para &inp)
Print iteration information to screen.
Definition relax_driver.cpp:145
std::string out_dir_
Cached global output directory (read once from PARAM at relax_driver entry).
Definition relax_driver.h:62
Definition relax_sync.h:16
Provide the basic information about unitcell.
Definition unitcell.h:16