forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfire.h
More file actions
56 lines (42 loc) · 1.42 KB
/
Copy pathfire.h
File metadata and controls
56 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef FIRE_H
#define FIRE_H
#include "md_base.h"
/**
* @brief FIRE method
*
* A MD-based relaxation algorithm, named fast inertial relaxation engine. [Phys. Rev. Lett. 97, 170201 (2006)]
* It is based on conventional molecular dynamics with additional velocity modifications and adaptive time steps.
* The MD trajectory will descend to an energy-minimum.
*/
class FIRE : public MD_base
{
public:
FIRE(const Parameter& param_in, UnitCell& unit_in);
~FIRE();
private:
void setup(ModuleESolver::ESolver* p_esolver, const std::string& global_readin_dir);
void first_half(std::ofstream& ofs);
void second_half();
void print_md(std::ofstream& ofs, const bool& cal_stress);
void restart(const std::string& global_readin_dir);
void write_restart(const std::string& global_out_dir);
/**
* @brief check the atomic forces converged or not
*/
void check_force(void);
/**
* @brief update related parameters
*/
void check_fire(void);
double max; ///< max force
double alpha_start; ///< alpha_start begin
double alpha; ///< alpha begin
double finc; ///< finc begin
double fdec; ///< fdec begin
double f_alpha; ///< f_alpha
int n_min; ///< n_min
double dt_max; ///< dt_max
int negative_count; ///< Negative count
double force_thr; ///< force convergence threshold in FIRE method
};
#endif