Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1dbe371
Add multi-k decomposed charge density calculation for LCAO (draft only)
AsTonyshment Jul 8, 2024
b6a9f50
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 8, 2024
cdaa1cd
Add multi-k decomposed charge density calculation for LCAO (draft 2)
AsTonyshment Jul 9, 2024
e717e2d
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 9, 2024
1df5013
Fix wrong cube file name for get_pchg calculation when nspin=2
AsTonyshment Jul 9, 2024
205e23a
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 9, 2024
1b71e21
Add multi-k decomposed charge density calculation for LCAO (draft 3)
AsTonyshment Jul 9, 2024
dc87e2f
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 9, 2024
462a7a2
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 10, 2024
00ae81d
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 11, 2024
76d2eec
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 13, 2024
8aabbda
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 14, 2024
3b19e24
Fix the issue of parameter bands_to_print not working after the refac…
AsTonyshment Jul 14, 2024
6bb5b93
Refactor istate_charge begin function into several individual functio…
AsTonyshment Jul 14, 2024
6c6b65b
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 14, 2024
4711afa
Fix the issue of parameter bands_to_print not working after the refac…
AsTonyshment Jul 14, 2024
950bd3f
Some slight modifications, and added some doxygen-style annotation fo…
AsTonyshment Jul 15, 2024
744c166
Add INPUT parameter if_sep_k
AsTonyshment Jul 15, 2024
27a7161
And INPUT test for if_separate_k
AsTonyshment Jul 15, 2024
1e7ca06
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jul 15, 2024
92a58c2
Explicitly instantiate the template function Input_Conv::parse_expres…
AsTonyshment Jul 15, 2024
ad2e258
Fix a ; problem
AsTonyshment Jul 15, 2024
d90b74e
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 15, 2024
d743816
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jul 15, 2024
8403566
Explicitly instantiate the template function Input_Conv::parse_expres…
AsTonyshment Jul 15, 2024
8abdab1
Merge branch 'multi-k-charge' of github.com:AsTonyshment/abacus-devel…
AsTonyshment Jul 15, 2024
391f443
Move definition of Input_Conv::parse_expression into the header file …
AsTonyshment Jul 15, 2024
9fdc80a
Delete out_band_kb_size from system parameter due to latest INPUT ref…
AsTonyshment Jul 15, 2024
6a3b819
Merge branch 'develop' into multi-k-charge
AsTonyshment Jul 15, 2024
0b0430b
Merge branch 'develop' into multi-k-charge
AsTonyshment Jul 15, 2024
ecf2f9f
Merge branch 'deepmodeling:develop' into multi-k-charge
AsTonyshment Jul 16, 2024
8efe88e
Fix a testing problem related to get_pchg due to output file name change
AsTonyshment Jul 16, 2024
6cdf5ae
Merge branch 'develop' into multi-k-charge
AsTonyshment Jul 16, 2024
81a341a
Replace the pointer array double** rho_save with std::vector<std::vec…
AsTonyshment Jul 16, 2024
8a6f732
Add the const keyword before some variables
AsTonyshment Jul 16, 2024
740eec6
Did nothing, just to restart GitHub auto check
AsTonyshment Jul 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
- [rpa](#rpa)
- [nbands\_istate](#nbands_istate)
- [bands\_to\_print](#bands_to_print)
- [if\_separate\_k](#if_separate_k)
- [Density of states](#density-of-states)
- [dos\_edelta\_ev](#dos_edelta_ev)
- [dos\_sigma](#dos_sigma)
Expand Down Expand Up @@ -449,8 +450,8 @@ These variables are used to control general system parameters.
- **relax**: perform structure relaxation calculations, the `relax_nmax` parameter depicts the maximal number of ionic iterations
- **cell-relax**: perform cell relaxation calculations
- **md**: perform molecular dynamics simulations
- **get_pchg**: obtain partial charge density (for LCAO basis only). See `nbands_istate` and `bands_to_print` for more information
- **get_wf**: obtain wave functions (for LCAO basis only). See `nbands_istate` for more information
- **get_pchg**: obtain partial (band-decomposed) charge densities (for LCAO basis only). See `nbands_istate` and `bands_to_print` for more information
- **get_wf**: obtain wave functions (for LCAO basis only). See `nbands_istate` and `bands_to_print` for more information
- **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)
- **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
- **test_memory** : obtain a rough estimation of memory consuption for the calculation
Expand Down Expand Up @@ -1755,10 +1756,17 @@ The band (KS orbital) energy for each (k-point, spin, band) will be printed in t
### bands_to_print

- **Type**: String
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, only used when `calculation = get_pchg`.
- **Description**: Specifies the bands to calculate the charge density 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.
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf` or `calculation = get_pchg`.
- **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.
- **Default**: none

### if_separate_k

- **Type**: Boolean
- **Availability**: Only for LCAO, used only when `calculation = get_pchg` and `gamma_only` is turned off.
- **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`.
- **Default**: false

[back to top](#full-list-of-input-keywords)

## Density of states
Expand Down
7 changes: 7 additions & 0 deletions source/module_base/global_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ static inline void DCOPY(const T& a, T& b, const int& dim)
}
}

template <typename T>
inline void DCOPY(const T* a, T* b, const int& dim) {
for (int i = 0; i < dim; ++i) {
b[i] = a[i];
}
}

template <typename T>
inline void COPYARRAY(const T* a, T* b, const long dim);

Expand Down
Loading