diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 3d59ceb5e52..b5f458c21ea 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1361,14 +1361,14 @@ ### scf_thr - **Type**: Real -- **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. +- **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. - **Default**: 1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis). - **Unit**: Ry if scf_thr_type=1, dimensionless if scf_thr_type=2 ### scf_ene_thr - **Type**: Real -- **Description**: It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations. +- **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). - **Default**: -1.0. If the user does not set this parameter, it will not take effect. - **Unit**: eV diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 8059ea953b6..63ee83376c5 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -823,7 +823,7 @@ parameters: category: Electronic structure type: Real 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. + 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. default_value: "1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis)." unit: "Ry if scf_thr_type=1, dimensionless if scf_thr_type=2" availability: "" @@ -831,7 +831,7 @@ parameters: category: Electronic structure type: Real description: | - It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations. + 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). default_value: "-1.0. If the user does not set this parameter, it will not take effect." unit: eV availability: "" diff --git a/source/source_io/module_parameter/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp index 0fe7ad35aa8..39f37febc54 100644 --- a/source/source_io/module_parameter/read_input_item_elec_stru.cpp +++ b/source/source_io/module_parameter/read_input_item_elec_stru.cpp @@ -831,7 +831,7 @@ Note: If gamma_only is set to 1, the KPT file will be overwritten. So make sure item.annotation = "charge density error"; item.category = "Electronic structure"; item.type = "Real"; - 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."; + 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."; item.default_value = "1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis)."; item.unit = "Ry if scf_thr_type=1, dimensionless if scf_thr_type=2"; item.availability = ""; @@ -865,7 +865,7 @@ Note: If gamma_only is set to 1, the KPT file will be overwritten. So make sure item.annotation = "total energy error threshold"; item.category = "Electronic structure"; item.type = "Real"; - item.description = "It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations."; + 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)."; item.default_value = "-1.0. If the user does not set this parameter, it will not take effect."; item.unit = "eV"; item.availability = "";