Skip to content

Commit 9631697

Browse files
authored
Remove INPUT parameter nbands_istate and unify the naming of real space wave function and partial charge density (#6336)
* Refactor get_pchg for LCAO, remove nbands_istate * Delete useless CASES_mylist.txt * Refactor get_pchg for PW, remove useless function input * Remove useless header files in get_pchg_lcao.h * Rename IState_Charge to Get_pchg_lcao * Refactor get_wf for LCAO, remove nbands_istate * Remove useless header files and cout message in get_wf_lcao * Unify wf naming in get_wf_pw * Remove nbands_istate from ABACUS
1 parent 37bc08a commit 9631697

File tree

27 files changed

+446
-727
lines changed

27 files changed

+446
-727
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@
166166
- [out\_element\_info](#out_element_info)
167167
- [restart\_save](#restart_save)
168168
- [rpa](#rpa)
169-
- [nbands\_istate](#nbands_istate)
170169
- [out\_pchg](#out_pchg)
170+
- [out\_wfc_norm](#out_wfc_norm)
171+
- [out\_wfc_re_im](#out_wfc_re_im)
171172
- [if\_separate\_k](#if_separate_k)
172173
- [out\_elf](#out_elf)
173174
- [Density of States](#density-of-states)
@@ -503,8 +504,8 @@ These variables are used to control general system parameters.
503504
- relax: perform structure relaxation calculations, the `relax_nmax` parameter depicts the maximal number of ionic iterations
504505
- cell-relax: perform cell relaxation calculations
505506
- md: perform molecular dynamics simulations
506-
- get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See `nbands_istate` and `out_pchg` for more information
507-
- get_wf: obtain wave functions (for LCAO basis only). See `nbands_istate`, `out_wfc_norm` and `out_wfc_re_im` for more information
507+
- get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See `out_pchg` for more information
508+
- get_wf: obtain real space wave functions (for LCAO basis only). See `out_wfc_norm` and `out_wfc_re_im` for more information
508509
- get_s: obtain the overlap matrix formed by localized orbitals (for LCAO basis with multiple k points). the file name is `SR.csr` with file format being the same as that generated by [out_mat_hs2](#out_mat_hs2). Note: in the 3.10-LTS version, the command was named `get_S`
509510
- gen_bessel: generates projectors, i.e., a series of Bessel functions, for the DeePKS method (for LCAO basis only); see also keywords `bessel_descriptor_lmax`, `bessel_descriptor_rcut` and `bessel_descriptor_tolerence`. A file named `jle.orb` will be generated which contains the projectors. An example is provided in examples/H2O-deepks-pw
510511
- test_memory: obtain a rough estimation of memory consuption for the calculation
@@ -1969,39 +1970,32 @@ These variables are used to control the output of properties.
19691970
- **Description**: Generate output files used in rpa calculations.
19701971
- **Default**: False
19711972

1972-
### nbands_istate
1973-
1974-
- **Type**: Integer
1975-
- **Availability**: Only for LCAO, used when `calculation = get_wf` or `calculation = get_pchg`.
1976-
- **Description**: The number of bands around the Fermi level you would like to calculate. `get_wf` means to calculate the envelope functions of wave functions $\Psi_{i}=\Sigma_{\mu}C_{i\mu}\Phi_{\mu}$, where $\Psi_{i}$ is the ith wave function with the band index $i$ and $\Phi_{\mu}$ is the localized atomic orbital set. `get_pchg` means to calculate the density of each wave function $|\Psi_{i}|^{2}$. Specifically, suppose we have highest occupied bands at 100th wave functions. And if you set this variable to 5, it will print five wave functions from 96th to 105th. But before all this can be carried out, the wave functions coefficients should be first calculated and written into a file by setting the flag `out_wfc_lcao = 1`.
1977-
- **Default**: 5
1978-
19791973
### out_pchg
19801974

19811975
- **Type**: String
19821976
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_pchg`.
1983-
- **Description**: Specifies the bands to calculate the charge densities for, using a space-separated string of 0s and 1s, providing a more flexible selection compared to `nbands_istate`. Each digit in the string corresponds to a band, starting from the first band. A `1` indicates that the charge density should be calculated for that band, while a `0` means the band will be ignored. The parameter allows a compact and flexible notation (similar to [`ocp_set`](#ocp_set)), for example the syntax `1 4*0 5*1 0` is used to denote the selection of bands: `1` means calculate for the first band, `4*0` skips the next four bands, `5*1` means calculate for the following five bands, and the final `0` skips the next band. It's essential that the total count of bands does not exceed the total number of bands (`nbands`); otherwise, it results in an error, and the process exits. The input string must contain only numbers and the asterisk (`*`) for repetition, ensuring correct format and intention of band selection.
1977+
- **Description**: Specifies the electronic states to calculate the charge densities $|\psi_{i}(\boldsymbol{r})|^{2}$ with state index $i$ for, using a space-separated string of 0s and 1s. Each digit in the string corresponds to a state, starting from the first state. A `1` indicates that the charge density should be calculated for that state, while a `0` means the state will be ignored. The parameter allows a compact and flexible notation (similar to [`ocp_set`](#ocp_set)), for example the syntax `1 4*0 5*1 0` is used to denote the selection of states: `1` means calculate for the first state, `4*0` skips the next four states, `5*1` means calculate for the following five states, and the final `0` skips the next state. It's essential that the total count of states does not exceed the total number of states (`nbands`); otherwise, it results in an error, and the process exits. The input string must contain only numbers and the asterisk (`*`) for repetition, ensuring correct format and intention of state selection. The outputs comprise multiple `.cube` files following the naming convention `pchgi[state]s[spin]k[kpoint].cube`.
19841978
- **Default**: none
19851979

19861980
### out_wfc_norm
19871981

19881982
- **Type**: String
19891983
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf`.
1990-
- **Description**: Specifies the bands to calculate the real-space wave function modulus (norm, or known as the envelope function) $|\psi(r)|$. The syntax and band selection rules are identical to [`out_pchg`](#out_pchg), but the output is the norm of the wave function.
1984+
- **Description**: Specifies the electronic states to calculate the real-space wave function modulus (norm, or known as the envelope function) $|\psi_i(\boldsymbol{r})|$ with state index $i$. The syntax and state selection rules are identical to [`out_pchg`](#out_pchg), but the output is the norm of the wave function. The outputs comprise multiple `.cube` files following the naming convention `wfi[state]s[spin]k[kpoint].cube`.
19911985
- **Default**: none
19921986

19931987
### out_wfc_re_im
19941988

19951989
- **Type**: String
19961990
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf`.
1997-
- **Description**: Specifies the bands to calculate the real and imaginary parts of the wave function $\text{Re}(\psi(r))$ and $\text{Im}(\psi(r))$. The syntax and band selection rules are identical to [`out_pchg`](#out_pchg), but the output contains both the real and imaginary components of the wave function.
1991+
- **Description**: Specifies the electronic states to calculate the real and imaginary parts of the wave function $\text{Re}(\psi_i(\boldsymbol{r}))$ and $\text{Im}(\psi_i(\boldsymbol{r}))$ with state index $i$. The syntax and state selection rules are identical to [`out_pchg`](#out_pchg), but the output contains both the real and imaginary components of the wave function. The outputs comprise multiple `.cube` files following the naming convention `wfi[state]s[spin]k[kpoint][re/im].cube`.
19981992
- **Default**: none
19991993

20001994
### if_separate_k
20011995

20021996
- **Type**: Boolean
2003-
- **Availability**: For both PW and LCAO. When `basis_type = pw`, used if `out_pchg` is set. When `basis_type = lcao`, used only when `calculation = get_pchg` and `gamma_only` is turned off.
2004-
- **Description**: Specifies whether to write the partial charge densities for all k-points to individual files or merge them. **Warning**: Enabling symmetry may produce incorrect results due to incorrect k-point weights. Therefore, when calculating partial charge densities, it is strongly recommended to set `symmetry = -1`.
1997+
- **Availability**: For both PW and LCAO. When `basis_type = pw`, used if `out_pchg` is set. When `basis_type = lcao`, used only when `calculation = get_pchg` and `gamma_only = 0`.
1998+
- **Description**: Specifies whether to write the partial charge densities for all k-points to individual files or merge them. **Warning**: Enabling symmetry may produce unwanted results due to reduced k-point weights and symmetry operations in real space. Therefore when calculating partial charge densities, if you are not sure what you want exactly, it is strongly recommended to set `symmetry = -1`. It is noteworthy that your `symmetry` setting should remain the same as that in the SCF procedure.
20051999
- **Default**: false
20062000

20072001
### out_elf

0 commit comments

Comments
 (0)