Skip to content

Commit 6f3b743

Browse files
authored
Fix: Replace out-dated parameter bands_to_print with out_pchg and update related codes and docs (#6211)
* Replace param bands_to_print with out_pchg and update docs * Fix get_wf typo in docs
1 parent f6e345f commit 6f3b743

File tree

8 files changed

+100
-149
lines changed

8 files changed

+100
-149
lines changed

docs/advanced/input_files/input-main.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
- [restart\_save](#restart_save)
167167
- [rpa](#rpa)
168168
- [nbands\_istate](#nbands_istate)
169-
- [bands\_to\_print](#bands_to_print)
169+
- [out\_pchg](#out_pchg)
170170
- [if\_separate\_k](#if_separate_k)
171171
- [out\_elf](#out_elf)
172172
- [Density of states](#density-of-states)
@@ -497,8 +497,8 @@ These variables are used to control general system parameters.
497497
- relax: perform structure relaxation calculations, the `relax_nmax` parameter depicts the maximal number of ionic iterations
498498
- cell-relax: perform cell relaxation calculations
499499
- md: perform molecular dynamics simulations
500-
- get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See `nbands_istate` and `bands_to_print` for more information
501-
- get_wf: obtain wave functions (for LCAO basis only). See `nbands_istate` and `bands_to_print` for more information
500+
- get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See `nbands_istate` and `out_pchg` for more information
501+
- get_wf: obtain wave functions (for LCAO basis only). See `nbands_istate`, `out_wfc_norm` and `out_wfc_re_im` for more information
502502
- 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)
503503
- 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
504504
- test_memory: obtain a rough estimation of memory consuption for the calculation
@@ -1901,11 +1901,25 @@ The band (KS orbital) energy for each (k-point, spin, band) will be printed in t
19011901
- **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`.
19021902
- **Default**: 5
19031903

1904-
### bands_to_print
1904+
### out_pchg
19051905

19061906
- **Type**: String
1907-
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf` or `calculation = get_pchg`.
1908-
- **Description**: Specifies the bands to calculate the wave functions/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.
1907+
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_pchg`.
1908+
- **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.
1909+
- **Default**: none
1910+
1911+
### out_wfc_norm
1912+
1913+
- **Type**: String
1914+
- **Availability**: For LCAO, used when `calculation = get_wf`.
1915+
- **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.
1916+
- **Default**: none
1917+
1918+
### out_wfc_re_im
1919+
1920+
- **Type**: String
1921+
- **Availability**: For LCAO, used when `calculation = get_wf`.
1922+
- **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.
19091923
- **Default**: none
19101924

19111925
### if_separate_k

0 commit comments

Comments
 (0)