ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
fire.h
Go to the documentation of this file.
1#ifndef FIRE_H
2#define FIRE_H
3
4#include "md_base.h"
5
13class FIRE : public MD_base
14{
15 public:
17 FIRE(
18 const MD_para &mdp_in,
19 const bool cal_stress_in,
20 const bool init_vel,
21 const int my_rank_in,
22 const double force_thr_in,
23 MDCell &mdcell_in);
24
25 ~FIRE();
26
28 double get_alpha() const { return alpha; }
29
31 double get_dt_max() const { return dt_max; }
32
34 int get_negative_count() const { return negative_count; }
35
36 private:
37 void setup(ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp);
38
39 void first_half(std::ofstream &ofs);
40
41 void second_half();
42
43 void print_md(std::ofstream &ofs, const bool &cal_stress);
44
45 void restart(const std::string &global_readin_dir);
46
47 void write_restart(const std::string &global_out_dir);
48
52 void check_force(void);
53
57 void check_fire(void);
58
59 double max;
60 double alpha_start;
61 double alpha;
62 double finc;
63 double fdec;
64 double f_alpha;
65 int n_min;
66 double dt_max;
68 double force_thr;
69};
70
71#endif
Domain decomposition for distributed and single-domain neighbor input.
Definition dom_decomp.h:32
void second_half()
the second half of equation of motion, update velocities
Definition fire.cpp:68
FIRE(const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, const double force_thr_in, MDCell &mdcell_in)
Definition fire.cpp:9
int get_negative_count() const
number of consecutive steps with negative power
Definition fire.h:34
int n_min
n_min
Definition fire.h:65
double alpha_start
alpha_start begin
Definition fire.h:60
void restart(const std::string &global_readin_dir)
restart MD when md_restart is true
Definition fire.cpp:117
double alpha
alpha begin
Definition fire.h:61
~FIRE()
Definition fire.cpp:36
void check_force(void)
check the atomic forces converged or not
Definition fire.cpp:164
void write_restart(const std::string &global_out_dir)
write the information into files used for MD restarting
Definition fire.cpp:94
double get_dt_max() const
largest time step the adaptive scheme is allowed to reach
Definition fire.h:31
void print_md(std::ofstream &ofs, const bool &cal_stress)
output MD information such as energy, temperature, and pressure
Definition fire.cpp:82
double f_alpha
f_alpha
Definition fire.h:64
double dt_max
dt_max
Definition fire.h:66
double finc
finc begin
Definition fire.h:62
void first_half(std::ofstream &ofs)
the first half of equation of motion, update velocities and positions
Definition fire.cpp:52
void check_fire(void)
update related parameters
Definition fire.cpp:222
double force_thr
force convergence threshold in FIRE method
Definition fire.h:68
double get_alpha() const
mixing coefficient of the FIRE velocity update
Definition fire.h:28
void setup(ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp)
init before running md, calculate energy, force, and stress of the initial configuration.
Definition fire.cpp:38
int negative_count
Negative count.
Definition fire.h:67
double max
max force
Definition fire.h:59
double fdec
fdec begin
Definition fire.h:63
Definition mdcell.h:29
bool cal_stress
whether calculate stress
Definition md_base.h:117
MD_base(const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
construct the integrator from the values it actually uses
Definition md_base.cpp:13
Definition esolver.h:13
input parameters used in md
Definition md_parameter.h:12