Skip to content

Commit eb9b228

Browse files
authored
Add deepks_out_freq_elec for outputting deepks labels during electronic steps (#6325)
* add parameter "deepks_out_freq_elec" * set global_deepks_label_elec_dir, make the directory named "DeePKS_Label_Elec" when needed * output files during electronic steps, add function get_filename to simplify the process * modify get_filename * change the output process of deepks_dm_eig.npy, making it consistent with other outputs * support output deepks labels during electronic steps * add test for deepks_out_freq_elec > 0 * optimize LCAO_deepks_interface * modify test script for deepks * add doc for deepks_out_freq_elec * Update input-main.md
1 parent 7f417b2 commit eb9b228

File tree

26 files changed

+867
-416
lines changed

26 files changed

+867
-416
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
- [bessel\_nao\_sigma](#bessel_nao_sigma)
189189
- [DeePKS](#deepks)
190190
- [deepks\_out\_labels](#deepks_out_labels)
191+
- [deepks\_out\_freq\_elec](#deepks_out_freq_elec)
191192
- [deepks\_scf](#deepks_scf)
192193
- [deepks\_equiv](#deepks_equiv)
193194
- [deepks\_model](#deepks_model)
@@ -2141,7 +2142,7 @@ Warning: this function is not robust enough for the current version. Please try
21412142
### deepks_out_labels
21422143

21432144
- **Type**: Integer
2144-
- **Availability**: numerical atomic orbital basis
2145+
- **Availability**: Numerical atomic orbital basis
21452146
- **Description**: Print labels and descriptors for DeePKS in OUT.${suffix}. The names of these files start with "deepks".
21462147
- 0 : No output.
21472148
- 1 : Output intermediate files needed during DeePKS training.
@@ -2159,26 +2160,33 @@ Warning: this function is not robust enough for the current version. Please try
21592160
This is not needed when `deepks_out_labels` equals 2.
21602161
- **Default**: 0
21612162

2163+
### deepks_out_freq_elec
2164+
2165+
- **Type**: Integer
2166+
- **Availability**: Numerical atomic orbital basis
2167+
- **Description**: When `deepks_out_freq_elec` is greater than 0, print labels and descriptors for DeePKS in OUT.${suffix}/DeePKS_Labels_Elec per `deepks_out_freq_elec` electronic iterations, with suffix `_e*` to distinguish different steps. Often used with `deepks_out_labels` equals 1.
2168+
- **Default**: 0
2169+
21622170
### deepks_scf
21632171

21642172
- **Type**: Boolean
2165-
- **Availability**: numerical atomic orbital basis
2173+
- **Availability**: Numerical atomic orbital basis
21662174
- **Description**: perform self-consistent field iteration in DeePKS method
21672175
- **Note**: A trained, traced model file is needed.
21682176
- **Default**: False
21692177

21702178
### deepks_equiv
21712179

21722180
- **Type**: Boolean
2173-
- **Availability**: numerical atomic orbital basis
2181+
- **Availability**: Numerical atomic orbital basis
21742182
- **Description**: whether to use equivariant version of DeePKS
21752183
- **Note**: the equivariant version of DeePKS-kit is still under development, so this feature is currently only intended for internal usage.
21762184
- **Default**: False
21772185

21782186
### deepks_model
21792187

21802188
- **Type**: String
2181-
- **Availability**: numerical atomic orbital basis and `deepks_scf` is true
2189+
- **Availability**: Numerical atomic orbital basis and `deepks_scf` is true
21822190
- **Description**: the path of the trained, traced neural network model file generated by [deepks-kit](https://github.com/deepmodeling/deepks-kit)
21832191
- **Default**: None
21842192

@@ -2231,7 +2239,7 @@ Warning: this function is not robust enough for the current version. Please try
22312239
### deepks_bandgap
22322240

22332241
- **Type**: Int
2234-
- **Availability**: numerical atomic orbital basis and `deepks_scf` is true
2242+
- **Availability**: Numerical atomic orbital basis and `deepks_scf` is true
22352243
- **Description**: include bandgap label for DeePKS training
22362244
- 0: Don't include bandgap label
22372245
- 1: Include target bandgap label (see [deepks\_band\_range](#deepks_band_range) for more details)
@@ -2242,7 +2250,7 @@ Warning: this function is not robust enough for the current version. Please try
22422250
### deepks_band_range
22432251

22442252
- **Type**: Int*2
2245-
- **Availability**: numerical atomic orbital basis, `deepks_scf` is true, and `deepks_bandgap` is 1 or 2
2253+
- **Availability**: Numerical atomic orbital basis, `deepks_scf` is true, and `deepks_bandgap` is 1 or 2
22462254
- **Description**: The first value should not be larger than the second one and the meaning differs in different cases below
22472255
- `deepks_bandgap` is 1: Bandgap label is the energy between `LUMO + deepks_band_range[0]` and `LUMO + deepks_band_range[1]`. If not set, it will calculate energy between HOMO and LUMO states.
22482256
- `deepks_bandgap` is 2: Bandgap labels are energies between HOMO and all states in range [`LUMO + deepks_band_range[0]`, `LUMO + deepks_band_range[1]`] (Thus there are `deepks_band_range[1] - deepks_band_range[0] + 1` bandgaps in total). If HOMO is included in the setting range, it will be ignored since it will always be zero and has no valuable messages (`deepks_band_range[1] - deepks_band_range[0]` bandgaps in this case). *NOTICE: The set range can be greater than, less than, or include the value of HOMO. In the bandgap label, we always calculate the energy of the state in the set range minus the energy of HOMO state, so the bandgap can be negative if the state is lower than HOMO.*
@@ -2251,7 +2259,7 @@ Warning: this function is not robust enough for the current version. Please try
22512259
### deepks_v_delta
22522260

22532261
- **Type**: int
2254-
- **Availability**: numerical atomic orbital basis
2262+
- **Availability**: Numerical atomic orbital basis
22552263
- **Description**: Include V_delta/V_delta_R (Hamiltonian in k/real space) label for DeePKS training. When `deepks_out_labels` is true and `deepks_v_delta` > 0 (k space), ABACUS will output `deepks_hbase.npy`, `deepks_vdelta.npy` and `deepks_htot.npy`(htot=hbase+vdelta). When `deepks_out_labels` is true and `deepks_v_delta` < 0 (real space), ABACUS will output `deepks_hrtot.csr`, `deepks_hrdelta.csr`. Some more files output for different settings.
22562264
- `deepks_v_delta` = 1: `deepks_vdpre.npy`, which is used to calculate V_delta during DeePKS training.
22572265
- `deepks_v_delta` = 2: `deepks_phialpha.npy` and `deepks_gevdm.npy`, which can be used to calculate `deepks_vdpre.npy`. A recommanded method for memory saving.

0 commit comments

Comments
 (0)