Skip to content

Commit df82b74

Browse files
sunliang98Copilot
andauthored
Doc: Enhance the doc of scf_thr and scf_ene_thr (#7280)
* Doc: Enhance the doc of scf_thr and scf_ene_thr * Doc: Update the doc * Update source/source_io/module_parameter/read_input_item_elec_stru.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/parameters.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/advanced/input_files/input-main.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 43791aa commit df82b74

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/advanced/input_files/input-main.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,14 +1361,14 @@
13611361
### scf_thr
13621362

13631363
- **Type**: Real
1364-
- **Description**: It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. Usually for local orbitals, usually 1e-6 may be accurate enough.
1364+
- **Description**: It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. This criterion is always enabled. If `scf_ene_thr` is set, its total-energy criterion is applied as an additional convergence check only after the charge-density criterion (`scf_thr`) has been satisfied, and only from the second SCF iteration onward (`iter > 1`). For local-orbital calculations, 1e-6 is usually accurate enough.
13651365
- **Default**: 1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis).
13661366
- **Unit**: Ry if scf_thr_type=1, dimensionless if scf_thr_type=2
13671367

13681368
### scf_ene_thr
13691369

13701370
- **Type**: Real
1371-
- **Description**: It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations.
1371+
- **Description**: It's the energy threshold for electronic iteration. The compared quantity is the total-energy difference evaluated from the charge densities before and after the `Hpsi` operation in one SCF step. It is not the same as the screen-output `EDIFF`, which is the energy difference before `Hpsi` and after charge mixing (i.e., across both `Hpsi` and charge-mixing operations).
13721372
- **Default**: -1.0. If the user does not set this parameter, it will not take effect.
13731373
- **Unit**: eV
13741374

docs/parameters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,15 +823,15 @@ parameters:
823823
category: Electronic structure
824824
type: Real
825825
description: |
826-
It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. Usually for local orbitals, usually 1e-6 may be accurate enough.
826+
It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. This criterion is always enabled. If `scf_ene_thr` is set, the total-energy criterion (`scf_ene_thr`) is evaluated conditionally after the charge-density criterion (`scf_thr`) is satisfied, and not on the first iteration. For local-orbital calculations, 1e-6 is usually accurate enough.
827827
default_value: "1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis)."
828828
unit: "Ry if scf_thr_type=1, dimensionless if scf_thr_type=2"
829829
availability: ""
830830
- name: scf_ene_thr
831831
category: Electronic structure
832832
type: Real
833833
description: |
834-
It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations.
834+
It's the energy threshold for electronic iteration. The compared quantity is the total-energy difference evaluated from the charge densities before and after the `Hpsi` operation in one SCF step. It is not the same as the screen-output `EDIFF`, which is the energy difference before `Hpsi` and after charge mixing (i.e., across both `Hpsi` and charge-mixing operations).
835835
default_value: "-1.0. If the user does not set this parameter, it will not take effect."
836836
unit: eV
837837
availability: ""

source/source_io/module_parameter/read_input_item_elec_stru.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ Note: If gamma_only is set to 1, the KPT file will be overwritten. So make sure
831831
item.annotation = "charge density error";
832832
item.category = "Electronic structure";
833833
item.type = "Real";
834-
item.description = "It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. Usually for local orbitals, usually 1e-6 may be accurate enough.";
834+
item.description = "It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. This criterion is always enabled. If scf_ene_thr is set, the total-energy criterion (scf_ene_thr) is additionally checked only after the first SCF iteration and only when the charge-density criterion (scf_thr) has already been satisfied. For local-orbital calculations, 1e-6 is usually accurate enough.";
835835
item.default_value = "1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis).";
836836
item.unit = "Ry if scf_thr_type=1, dimensionless if scf_thr_type=2";
837837
item.availability = "";
@@ -865,7 +865,7 @@ Note: If gamma_only is set to 1, the KPT file will be overwritten. So make sure
865865
item.annotation = "total energy error threshold";
866866
item.category = "Electronic structure";
867867
item.type = "Real";
868-
item.description = "It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations.";
868+
item.description = "It's the energy threshold for electronic iteration. The compared quantity is the total-energy difference evaluated from the charge densities before and after the Hpsi operation in one SCF step. It is not the same as the screen-output EDIFF, which is the energy difference before Hpsi and after charge mixing (i.e., across both Hpsi and charge-mixing operations).";
869869
item.default_value = "-1.0. If the user does not set this parameter, it will not take effect.";
870870
item.unit = "eV";
871871
item.availability = "";

0 commit comments

Comments
 (0)