Skip to content

Commit 2373c13

Browse files
authored
Merge pull request #10 from ESROAMER/no_force
merge from ESROAMER:no_force
2 parents ebfdadc + 09aa1a1 commit 2373c13

File tree

24 files changed

+340
-5
lines changed

24 files changed

+340
-5
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
- [scf\_thr](#scf_thr)
8989
- [scf\_ene\_thr](#scf_ene_thr)
9090
- [scf\_thr\_type](#scf_thr_type)
91+
- [scf\_os\_stop](#scf_os_stop)
92+
- [scf\_os\_thr](#scf_os_thr)
93+
- [scf\_os\_ndim](#scf_os_ndim)
9194
- [chg\_extrap](#chg_extrap)
9295
- [lspinorb](#lspinorb)
9396
- [noncolin](#noncolin)
@@ -1205,6 +1208,29 @@ Note: In new angle mixing, you should set `mixing_beta_mag >> mixing_beta`. The
12051208

12061209
- **Default**: 1 (plane-wave basis), or 2 (localized atomic orbital basis).
12071210

1211+
### scf_os_stop
1212+
1213+
- **Type**: bool
1214+
- **Description**: For systems that are difficult to converge, the SCF process may exhibit oscillations in charge density, preventing further progress toward the specified convergence criteria and resulting in continuous oscillation until the maximum number of steps is reached; this greatly wastes computational resources. To address this issue, this function allows ABACUS to terminate the SCF process early upon detecting oscillations, thus reducing subsequent meaningless calculations. The detection of oscillations is based on the slope of the logarithm of historical drho values.. To this end, Least Squares Method is used to calculate the slope of the logarithmically taken drho for the previous `scf_os_ndim` iterations. If the calculated slope is larger than `scf_os_thr`, stop the SCF.
1215+
1216+
- **0**: The SCF will continue to run regardless of whether there is oscillation or not.
1217+
- **1**: If the calculated slope is larger than `scf_os_thr`, stop the SCF.
1218+
1219+
- **Default**: false
1220+
1221+
### scf_os_thr
1222+
1223+
- **Type**: double
1224+
- **Description**: The slope threshold to determine if the SCF is stuck in a charge density oscillation. If the calculated slope is larger than `scf_os_thr`, stop the SCF.
1225+
1226+
- **Default**: -0.01
1227+
1228+
### scf_os_ndim
1229+
1230+
- **Type**: int
1231+
- **Description**: To determine the number of old iterations' `drho` used in slope calculations.
1232+
- **Default**: `mixing_ndim`
1233+
12081234
### chg_extrap
12091235

12101236
- **Type**: String
File renamed without changes.

examples/vdw/si2/INPUT2 renamed to examples/vdw/si2-vdwd2/INPUT2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#INPUT file for applying D3(BJ) correction
2-
#with default VdW parameters
1+
#INPUT file for applying D2 correction
2+
#where I chose to manually set the C6 parameter
3+
#in file c6.txt
34
#in pw basis
45

56
INPUT_PARAMETERS
@@ -12,4 +13,5 @@ ecutwfc 50
1213
scf_nmax 100
1314
scf_thr 1e-6
1415
basis_type pw
15-
vdw_method d3_bj
16+
vdw_method d2
17+
vdw_C6_file c6.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/vdw/si2-vdwd3/INPUT1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#INPUT file for applying D3(BJ) correction
2+
#in lcao basis
3+
4+
INPUT_PARAMETERS
5+
#Parameters (General)
6+
pseudo_dir ../../../tests/PP_ORB
7+
orbital_dir ../../../tests/PP_ORB
8+
ntype 1
9+
#Parameters (Accuracy)
10+
ecutwfc 50
11+
scf_nmax 100
12+
scf_thr 1e-6
13+
basis_type lcao
14+
vdw_method d3_bj
15+
dft_functional MGGA_X_SCAN+MGGA_C_SCAN

examples/vdw/si2-vdwd3/INPUT2

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#INPUT file for applying D3(BJ) correction
2+
#in pw basis
3+
4+
INPUT_PARAMETERS
5+
#Parameters (General)
6+
pseudo_dir ../../../tests/PP_ORB
7+
orbital_dir ../../../tests/PP_ORB
8+
ntype 1
9+
#Parameters (Accuracy)
10+
ecutwfc 50
11+
scf_nmax 100
12+
scf_thr 1e-6
13+
basis_type pw
14+
vdw_method d3_bj
15+
dft_functional pbe

examples/vdw/si2-vdwd3/INPUT3

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#INPUT file for applying D3(BJ) correction
2+
#in lcao basis. This example illustrates
3+
#the manually setting on vdw parameters
4+
5+
INPUT_PARAMETERS
6+
#Parameters (General)
7+
pseudo_dir ../../../tests/PP_ORB
8+
orbital_dir ../../../tests/PP_ORB
9+
ntype 1
10+
#Parameters (Accuracy)
11+
ecutwfc 50
12+
scf_nmax 100
13+
scf_thr 1e-6
14+
basis_type lcao
15+
vdw_method d3_bj
16+
dft_functional pbe
17+
vdw_s6 1.000
18+
vdw_s8 0.722
19+
vdw_a1 1.217
20+
vdw_a2 1.000
21+

0 commit comments

Comments
 (0)