forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc : update session on scf convergence (#1313)
* doc : update for VdW correction * doc : fix bug in index.rst * doc : add another layer in example/vdw * doc : add link for vdw example * doc : add part for XC functionals * docs : update deeph and out_mat_XX * docs : update session for converging SCF Co-authored-by: wenfei-li <liwenfei@gmail.com>
- Loading branch information
Showing
17 changed files
with
242 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# Converging SCF | ||
|
||
As in any non-linear systems, numerical instabilities during SCF iterations may lead to nonconvergence. In ABACUS, we offer the following options to facilitate SCF convergence. | ||
|
||
## Charge Mixing | ||
|
||
## Smearing | ||
By mixing the electron density with that obtained from previous steps, numerical instabilities can be ameliorated. ABACUS offers several mixing schemes, and users may make a selection by adjusting the [mixing_type](../input_files/input-main.md#mixingtype) keyword in INPUT file. | ||
|
||
For each of the mixing types, we also provide variables for controlling relevant parameters, including `mixing_beta`, `mixing_ndim`, and `mixing_gg0`. | ||
|
||
The default choice is `pulay`, which should work fine in most cases. If convergence issue arises in metallic systems, inclusion of Kerker preconditioning may be helpful, namely, to use `kerker` or `pulay-kerker` mixing methods. | ||
|
||
A large `mixing_beta` means a larger change in electron density for each SCF step. For well-behaved systems, a larger `mixing_beta` leads to faster convergence. However, for some difficult cases, a smaller `mixing_beta` is preferred to avoid numerical instabilities. | ||
|
||
An example showcasing different charge mixing methods can be found in our [repository](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/charge_mixing/pw_Al). Four INPUT files are provided, with description given in README. | ||
|
||
## Smearing | ||
|
||
Thermal smearing is an efficient tool for accelerating SCF convergence by allowing fractional occupation of molecular orbitals near the band edge. It is important for metallic systems. | ||
|
||
In ABACUS, we provide a few smearing methods, which can be controlled using the keyword [smearing_method](../input_files/input-main.md#smearingmethod). We also provide keyword `smearing_sigma` or `smearing_sigma_temp` to control the energy range of smearing. A larger value of smearing sigma leads to a more diffused occupation curve. | ||
|
||
> Note : The two keywords `smearing_sigma` and `smearing_sigma_temp` should not be used concurrently. | ||
We provide an example showing the importance of smearing in our [repository](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/smearing/lcao_fe). Two INPUT fiels rae provided, with description given in README. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INPUT_PARAMETERS | ||
#Parameters (1.General) | ||
suffix autotest | ||
calculation scf | ||
ntype 1 | ||
nbands 8 | ||
symmetry 1 | ||
pseudo_dir ../../../tests/PP_ORB | ||
|
||
#Parameters (2.Iteration) | ||
ecutwfc 30 | ||
scf_thr 1e-9 | ||
scf_nmax 100 | ||
|
||
#Parameters (3.Basis) | ||
basis_type pw | ||
latname fcc | ||
|
||
#Parameters (4.Smearing) | ||
smearing_method gauss | ||
smearing_sigma 0.002 | ||
|
||
#Parameters (5.Mixing) | ||
mixing_type pulay | ||
mixing_beta 0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INPUT_PARAMETERS | ||
#Parameters (1.General) | ||
suffix autotest | ||
calculation scf | ||
ntype 1 | ||
nbands 8 | ||
symmetry 1 | ||
pseudo_dir ../../../tests/PP_ORB | ||
|
||
#Parameters (2.Iteration) | ||
ecutwfc 30 | ||
scf_thr 1e-9 | ||
scf_nmax 100 | ||
|
||
#Parameters (3.Basis) | ||
basis_type pw | ||
latname fcc | ||
|
||
#Parameters (4.Smearing) | ||
smearing_method gauss | ||
smearing_sigma 0.002 | ||
|
||
#Parameters (5.Mixing) | ||
mixing_type plain | ||
mixing_beta 0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INPUT_PARAMETERS | ||
#Parameters (1.General) | ||
suffix autotest | ||
calculation scf | ||
ntype 1 | ||
nbands 8 | ||
symmetry 1 | ||
pseudo_dir ../../../tests/PP_ORB | ||
|
||
#Parameters (2.Iteration) | ||
ecutwfc 30 | ||
scf_thr 1e-9 | ||
scf_nmax 100 | ||
|
||
#Parameters (3.Basis) | ||
basis_type pw | ||
latname fcc | ||
|
||
#Parameters (4.Smearing) | ||
smearing_method gauss | ||
smearing_sigma 0.002 | ||
|
||
#Parameters (5.Mixing) | ||
mixing_type pulay | ||
mixing_beta 0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INPUT_PARAMETERS | ||
#Parameters (1.General) | ||
suffix autotest | ||
calculation scf | ||
ntype 1 | ||
nbands 8 | ||
symmetry 1 | ||
pseudo_dir ../../../tests/PP_ORB | ||
|
||
#Parameters (2.Iteration) | ||
ecutwfc 30 | ||
scf_thr 1e-9 | ||
scf_nmax 100 | ||
|
||
#Parameters (3.Basis) | ||
basis_type pw | ||
latname fcc | ||
|
||
#Parameters (4.Smearing) | ||
smearing_method gauss | ||
smearing_sigma 0.002 | ||
|
||
#Parameters (5.Mixing) | ||
mixing_type plain | ||
mixing_beta 0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
K_POINTS | ||
0 | ||
Gamma | ||
2 2 2 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Showcasing different charge mixing methods | ||
- INPUT_1 : pulay mixing with beta=0.7, takes 5 steps to converge | ||
- INPUT_2 : plain mixing with beta=0.7, takes 8 steps to converge | ||
- INPUT_3 : pulay mixing with beta=0.2, takes 6 steps to converge | ||
- INPUT_4 : plain mixing with beta=0.2, takes 37 steps to converge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ATOMIC_SPECIES | ||
Al 26.98 Al.pz-vbc.UPF upf201 | ||
|
||
LATTICE_CONSTANT | ||
7.50 | ||
|
||
|
||
ATOMIC_POSITIONS | ||
Direct | ||
|
||
Al | ||
0.0 | ||
1 | ||
0.00 0.00 0.00 1 1 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
etotref -57.66876692615671 | ||
etotperatomref -57.6687669262 | ||
totaltimeref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
INPUT_PARAMETERS | ||
suffix autotest | ||
ntype 2 | ||
|
||
calculation scf | ||
ecutwfc 20 | ||
scf_thr 1.0e-8 | ||
scf_nmax 50 | ||
out_chg 0 | ||
|
||
smearing_method gaussian | ||
smearing_sigma 0.02 | ||
|
||
mixing_type pulay | ||
mixing_beta 0.4 | ||
|
||
ks_solver genelpa | ||
basis_type lcao | ||
gamma_only 1 | ||
nspin 2 | ||
pseudo_dir ../../../tests/PP_ORB | ||
orbital_dir ../../../tests/PP_ORB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
INPUT_PARAMETERS | ||
suffix autotest | ||
ntype 2 | ||
|
||
calculation scf | ||
ecutwfc 20 | ||
scf_thr 1.0e-8 | ||
scf_nmax 50 | ||
out_chg 0 | ||
|
||
smearing_method fixed | ||
|
||
mixing_type pulay | ||
mixing_beta 0.4 | ||
|
||
ks_solver genelpa | ||
basis_type lcao | ||
gamma_only 1 | ||
nspin 2 | ||
pseudo_dir ../../../tests/PP_ORB | ||
orbital_dir ../../../tests/PP_ORB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
K_POINTS | ||
0 | ||
Gamma | ||
1 1 1 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Example showing the importance of thermal smearing. | ||
- INPUT_1 : Gaussian smearing with smearing sigma = 0.02; takes 21 steps to converged | ||
- INPUT_2 : Fixed occupation (no smearing), not converging even at 50 steps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ATOMIC_SPECIES | ||
Fe1 1.000 Fe_ONCV_PBE-1.0.upf | ||
Fe2 1.000 Fe_ONCV_PBE-1.0.upf | ||
|
||
NUMERICAL_ORBITAL | ||
Fe_gga_9au_100Ry_4s2p2d1f.orb | ||
Fe_gga_9au_100Ry_4s2p2d1f.orb | ||
|
||
LATTICE_CONSTANT | ||
15 | ||
|
||
LATTICE_VECTORS | ||
1.00 0.50 0.50 | ||
0.50 1.00 0.50 | ||
0.50 0.50 1.00 | ||
ATOMIC_POSITIONS | ||
Direct | ||
|
||
Fe1 | ||
1.0 | ||
1 | ||
0.00 0.00 0.00 1 1 1 | ||
|
||
Fe2 | ||
-1.0 | ||
1 | ||
0.50 0.50 0.50 1 1 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
etotref -6372.520190290697 | ||
etotperatomref -3186.2600951453 | ||
totaltimeref 10.865 |