Skip to content

Commit 7411b20

Browse files
committed
Refactor: change the name of keyword force_thr_ev2 to force_zero_out for clarity
1 parent d3c9d0f commit 7411b20

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
- [cal\_force](#cal_force)
117117
- [force\_thr](#force_thr)
118118
- [force\_thr\_ev](#force_thr_ev)
119-
- [force\_thr\_ev2](#force_thr_ev2)
119+
- [force\_zero\_out](#force_zero_out)
120120
- [relax\_bfgs\_w1](#relax_bfgs_w1)
121121
- [relax\_bfgs\_w2](#relax_bfgs_w2)
122122
- [relax\_bfgs\_rmax](#relax_bfgs_rmax)
@@ -1485,10 +1485,10 @@ These variables are used to control the geometry relaxation.
14851485
- **Default**: 0.0257112
14861486
- **Unit**: eV/Angstrom (0.03889 Ry/Bohr)
14871487

1488-
### force_thr_ev2
1488+
### force_zero_out
14891489

14901490
- **Type**: Real
1491-
- **Description**: The calculated force will be set to 0 when it is smaller than the parameter `force_thr_ev2`.
1491+
- **Description**: The force whose value is smaller than `force_zero_out` will be treated as zero.
14921492
- **Default**: 0.0
14931493
- **Unit**: eV/Angstrom
14941494

source/module_io/input_conv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ void Input_Conv::Convert()
177177

178178

179179
#ifdef __LCAO
180-
Force_Stress_LCAO<double>::force_invalid_threshold_ev = PARAM.inp.force_thr_ev2;
181-
Force_Stress_LCAO<std::complex<double>>::force_invalid_threshold_ev = PARAM.inp.force_thr_ev2;
180+
Force_Stress_LCAO<double>::force_invalid_threshold_ev = PARAM.inp.force_zero_out;
181+
Force_Stress_LCAO<std::complex<double>>::force_invalid_threshold_ev = PARAM.inp.force_zero_out;
182182
#endif
183183

184184
BFGS_Basic::relax_bfgs_w1 = PARAM.inp.relax_bfgs_w1;

source/module_io/read_input_item_relax.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ void ReadInput::item_relax()
109109
this->add_item(item);
110110
}
111111
{
112-
Input_Item item("force_thr_ev2");
112+
Input_Item item("force_zero_out");
113113
item.annotation = "force invalid threshold, unit: eV/Angstrom";
114-
read_sync_double(input.force_thr_ev2);
114+
read_sync_double(input.force_zero_out);
115115
this->add_item(item);
116116
}
117117
{

source/module_parameter/input_parameter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ struct Input_para
157157
double relax_cg_thr = 0.5; ///< threshold when cg to bfgs, pengfei add 2011-08-15
158158
double force_thr = -1; ///< threshold of force in unit (Ry/Bohr)
159159
double force_thr_ev = -1; ///< threshold of force in unit (eV/Angstrom)
160-
double force_thr_ev2 = 0; ///< invalid force threshold, mohan add 2011-04-17
160+
double force_zero_out = 0; ///< invalid force threshold, mohan add 2011-04-17
161161
double stress_thr = 0.5; ///< Pengfei Li 2017-11-01 ///<LiuXh update 20180515
162162
double press1 = 0;
163163
double press2 = 0;

0 commit comments

Comments
 (0)