Skip to content

Commit cf969d5

Browse files
committed
Merge branch 'develop' into update_ModuleGint
2 parents f1cd921 + 8fc7c42 commit cf969d5

File tree

883 files changed

+10223
-8598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

883 files changed

+10223
-8598
lines changed

CMakeLists.txt

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,45 @@ project(
1010
HOMEPAGE_URL "https://github.com/deepmodeling/abacus-develop"
1111
LANGUAGES CXX)
1212

13-
option(ENABLE_LCAO "Enable LCAO calculation." ON)
14-
option(ENABLE_DEEPKS "Enable DeePKS functionality" OFF)
15-
option(ENABLE_MLKEDF "Enable Machine Learning based KEDF for OFDFT" OFF)
16-
option(ENABLE_LIBXC "Enable LibXC functionality" OFF)
17-
option(USE_CUDA "Enable support to CUDA for ABACUS." OFF)
18-
option(ENABLE_FLOAT_FFTW "Enable support to single precision FFTW library." OFF)
19-
option(USE_ROCM "Enable support to ROCm." OFF)
20-
option(USE_OPENMP "Enable OpenMP in ABACUS." ON)
13+
option(ENABLE_MPI "Enable MPI" ON)
14+
option(USE_OPENMP "Enable OpenMP" ON)
15+
option(USE_CUDA "Enable CUDA" OFF)
16+
option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
17+
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
18+
option(USE_ROCM "Enable ROCm" OFF)
19+
option(USE_DSP "Enable DSP" OFF)
20+
21+
option(USE_ABACUS_LIBM "Build libmath from source to speed up" OFF)
22+
option(ENABLE_LIBXC "Enable using the LibXC package" OFF)
23+
option(ENABLE_FLOAT_FFTW "Enable using single-precision FFTW library." OFF)
24+
option(ENABLE_DEEPKS "Enable the DeePKS algorithm" OFF)
25+
option(ENABLE_MLKEDF "Enable the Machine-Learning-based KEDF for OFDFT" OFF)
26+
27+
option(ENABLE_LCAO "Enable LCAO algorithm" ON)
28+
option(USE_ELPA "Enable ELPA for LCAO" ON)
29+
option(ENABLE_LIBRI "Enable LibRI for hybrid functional" OFF)
30+
option(ENABLE_LIBCOMM "Enable LibComm" OFF)
31+
option(ENABLE_PEXSI "Enable PEXSI for LCAO" OFF)
32+
33+
option(BUILD_TESTING "Build unittests" OFF)
34+
option(DEBUG_INFO "Print message to debug" OFF)
2135
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
22-
option(BUILD_TESTING "Build ABACUS unit tests" OFF)
23-
option(INFO "Enable gathering of math library information" OFF)
24-
option(ENABLE_COVERAGE "Enable coverage build." OFF)
25-
option(ENABLE_LIBRI "Enable EXX with LibRI." OFF)
26-
option(ENABLE_LIBCOMM "Enable communicate with LibComm." OFF)
27-
option(ENABLE_PAW "Enable PAW calculation" OFF)
28-
option(ENABLE_MPI "Enable compilation with or without MPI." ON)
29-
option(USE_ELPA "Enable ELPA" ON)
30-
option(USE_ABACUS_LIBM "Build libmath from source to speed up." OFF)
36+
option(INFO "Enable gathering math library information" OFF)
37+
option(ENABLE_COVERAGE "Enable coverage build" OFF)
3138
option(GIT_SUBMODULE "Check submodules during build" ON)
32-
option(DEBUG_INFO "Print message for developers to debug." OFF)
39+
40+
option(ENABLE_PAW "Enable PAW method" OFF)
41+
3342
# Do not enable it if generated code will run on different CPUs
3443
option(ENABLE_NATIVE_OPTIMIZATION
3544
"Enable compilation optimization for the native machine's CPU type" OFF)
45+
3646
option(COMMIT_INFO "Print commit information in log" ON)
37-
option(ENABLE_FFT_TWO_CENTER "Enable FFT-based two-center integral method." ON)
38-
option(ENABLE_GOOGLEBENCH "Enable GOOGLE-benchmark usage." OFF)
39-
option(ENABLE_RAPIDJSON "Enable rapid-json usage." OFF)
40-
option(ENABLE_CNPY "Enable cnpy usage." OFF)
41-
option(ENABLE_PEXSI "Enable support for PEXSI." OFF)
42-
option(ENABLE_CUSOLVERMP "Enable cusolvermp." OFF)
43-
option(USE_DSP "Enable DSP usage." OFF)
44-
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
45-
option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
47+
option(ENABLE_FFT_TWO_CENTER "Enable FFT-based two-center integral method" ON)
48+
option(ENABLE_GOOGLEBENCH "Enable GOOGLE-benchmark usage" OFF)
49+
option(ENABLE_RAPIDJSON "Enable rapid-json usage" OFF)
50+
option(ENABLE_CNPY "Enable cnpy usage" OFF)
51+
option(ENABLE_CUSOLVERMP "Enable cusolvermp" OFF)
4652

4753
# enable json support
4854
if(ENABLE_RAPIDJSON)
@@ -108,11 +114,13 @@ You can install Git first and reinstall abacus.")
108114
endif()
109115
endif()
110116

117+
# Serial version of ABACUS will not use ELPA
111118
if(NOT ENABLE_MPI)
112119
set(USE_ELPA OFF)
113120
set(ENABLE_DEEPKS OFF)
114121
endif()
115122

123+
# Different exe files of ABACUS
116124
if(ENABLE_LCAO AND ENABLE_MPI)
117125
set(ABACUS_BIN_NAME abacus)
118126
elseif(NOT ENABLE_LCAO AND ENABLE_MPI)
@@ -123,6 +131,7 @@ elseif(ENABLE_LCAO AND NOT ENABLE_MPI)
123131
set(ABACUS_BIN_NAME abacus_serial)
124132
endif()
125133

134+
# Use DSP hardware
126135
if (USE_DSP)
127136
set(USE_ELPA OFF)
128137
set(ENABLE_LCAO OFF)
@@ -206,7 +215,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
206215
add_compile_options(-fp-model=strict)
207216
set(USE_ABACUS_LIBM OFF) # Force turn off USE_ABACUS_LIBM on Intel Compiler
208217
set(CMAKE_CXX_FLAGS
209-
"${CMAKE_CXX_FLAGS} -Wno-write-strings -Wno-tautological-constant-compare"
218+
"${CMAKE_CXX_FLAGS} -Wno-write-strings "
210219
)
211220
endif()
212221

docs/advanced/acceleration/cuda.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/devel
4646
PW basis:
4747
- Only k point parallelization is supported, so the input keyword `kpar` will be set to match the number of MPI tasks automatically.
4848
- By default, CUDA architectures 60, 70, 75, 80, 86, and 89 are compiled (if supported). It can be overriden using the CMake variable [`CMAKE_CUDA_ARCHITECTURES`](https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html) or the environmental variable [`CUDAARCHS`](https://cmake.org/cmake/help/latest/envvar/CUDAARCHS.html).
49+
4950
LCAO basis:
5051
- Unless there is a specific reason, avoid using multiple GPUs, as it can be slower than using a single GPU. This is because the generalized eigenvalue solution of the LCAO basis set will incur additional communication overhead when calculated on multiple cards. When the memory limit of a GPU card makes it insufficient to complete the task, it is recommended to use multiple cards for calculation.
5152
- When using elpa on GPUs, some ELPA internal logs will be output.

docs/advanced/input_files/input-main.md

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
- [lcao\_dr](#lcao_dr)
5353
- [lcao\_rmax](#lcao_rmax)
5454
- [search\_radius](#search_radius)
55-
- [search\_pbc](#search_pbc)
5655
- [bx, by, bz](#bx-by-bz)
5756
- [elpa\_num\_thread](#elpa_num_thread)
5857
- [num\_stream](#num_stream)
@@ -140,6 +139,7 @@
140139
- [out\_wfc\_r](#out_wfc_r)
141140
- [out\_wfc\_lcao](#out_wfc_lcao)
142141
- [out\_dos](#out_dos)
142+
- [out\_ldos](#out_ldos)
143143
- [out\_band](#out_band)
144144
- [out\_proj\_band](#out_proj_band)
145145
- [out\_stru](#out_stru)
@@ -152,8 +152,10 @@
152152
- [out\_mat\_hs2](#out_mat_hs2)
153153
- [out\_mat\_t](#out_mat_t)
154154
- [out\_mat\_dh](#out_mat_dh)
155+
- [out\_mat\_ds](#out_mat_ds)
155156
- [out\_mat\_xc](#out_mat_xc)
156157
- [out\_mat\_xc2](#out_mat_xc2)
158+
- [out\_mat\_l](#out_mat_l)
157159
- [out\_eband\_terms](#out_eband_terms)
158160
- [out\_hr\_npz/out\_dm\_npz](#out_hr_npzout_dm_npz)
159161
- [dm\_to\_rho](#dm_to_rho)
@@ -174,6 +176,7 @@
174176
- [dos\_emin\_ev](#dos_emin_ev)
175177
- [dos\_emax\_ev](#dos_emax_ev)
176178
- [dos\_nche](#dos_nche)
179+
- [stm\_bias](#stm_bias)
177180
- [NAOs](#naos)
178181
- [bessel\_nao\_ecut](#bessel_nao_ecut)
179182
- [bessel\_nao\_tolerence](#bessel_nao_tolerence)
@@ -920,12 +923,6 @@ These variables are used to control the numerical atomic orbitals related parame
920923
- **Default**: -1
921924
- **Unit**: Bohr
922925

923-
### search_pbc
924-
925-
- **Type**: Boolean
926-
- **Description**: If True, periodic images will be included in searching for the neighbouring atoms. If False, periodic images will be ignored.
927-
- **Default**: True
928-
929926
### bx, by, bz
930927

931928
- **Type**: Integer
@@ -1702,10 +1699,16 @@ These variables are used to control the output of properties.
17021699
- **Description**: Whether to output the density of states (DOS). For more information, refer to the [dos.md](../elec_properties/dos.md).
17031700
- 0: no output
17041701
- 1: output the density of states (DOS)
1705-
- 2:
1706-
- lcao-only: output the density of states (DOS) and the projected density of states (PDOS)
1702+
- 2: (LCAO) output the density of states (DOS) and the projected density of states (PDOS)
1703+
- 3: output the Fermi surface file (fermi.bxsf) in BXSF format that can be visualized by XCrySDen
17071704
- **Default**: 0
17081705

1706+
### out_ldos
1707+
1708+
- **Type**: Boolean
1709+
- **Description**: Whether to output the local density of states for given bias in cube file format, which is controlled by [stm_bias](#stm_bias).
1710+
- **Default**: False
1711+
17091712
### out_band
17101713

17111714
- **Type**: Boolean \[Integer\](optional)
@@ -1792,6 +1795,13 @@ These variables are used to control the output of properties.
17921795
- **Description**: Whether to print files containing the derivatives of the Hamiltonian matrix (in Ry/Bohr). The format will be the same as the Hamiltonian matrix $H(R)$ and overlap matrix $S(R)$ as mentioned in [out_mat_hs2](#out_mat_hs2). The name of the files will be `data-dHRx-sparse_SPIN0.csr` and so on. Also controled by [out_interval](#out_interval) and [out_app_flag](#out_app_flag).
17931796
- **Default**: False
17941797

1798+
### out_mat_ds
1799+
1800+
- **Type**: Boolean
1801+
- **Availability**: Numerical atomic orbital basis (not gamma-only algorithm)
1802+
- **Description**: Whether to print files containing the derivatives of the Overlap matrix (in Ry/Bohr). The format will be the same as the Overlap matrix $dH(R)$ as mentioned in [out_mat_dh](#out_mat_dh). The name of the files will be `data-dSRx-sparse_SPIN0.csr` and so on. Also controled by [out_interval](#out_interval) and [out_app_flag](#out_app_flag). This feature can be used with `calculation get_S`.
1803+
- **Default**: False
1804+
17951805
### out_mat_xc
17961806

17971807
- **Type**: Boolean
@@ -1807,6 +1817,13 @@ The band (KS orbital) energy for each (k-point, spin, band) will be printed in t
18071817
- **Description**: Whether to print the exchange-correlation matrices in **numerical orbital representation** (unit: Ry): $\braket{\phi_i|V_\text{xc}^\text{(semi-)local}+V_\text{exx}+V_\text{DFTU}|\phi_j}(\mathbf{R})$ in CSR format (the same format as [out_mat_hs2](../elec_properties/hs_matrix.md#out_mat_hs2)) in the directory `OUT.${suffix}`. (Note that currently DeePKS term is not included. ) The files are named `Vxc_R_spin$s`.
18081818
- **Default**: False
18091819

1820+
### out_mat_l
1821+
1822+
- **Type**: Boolean [Integer\](optional)
1823+
- **Availability**: Numerical atomic orbital (NAO) basis
1824+
- **Description**: Whether to print the expectation value of the angular momentum operator $\hat{L}_x$, $\hat{L}_y$, and $\hat{L}_z$ in the basis of the localized atomic orbitals. The files are named `OUT.${suffix}/${suffix}_Lx.dat`, `OUT.${suffix}/${suffix}_Ly.dat`, and `OUT.${suffix}/${suffix}_Lz.dat`. The second integer controls the precision of the output.
1825+
- **Default**: False 8
1826+
18101827
### out_eband_terms
18111828

18121829
- **Type**: Boolean
@@ -1955,9 +1972,20 @@ These variables are used to control the calculation of DOS. [Detailed introducti
19551972
### dos_nche
19561973

19571974
- **Type**: Integer
1958-
The order of Chebyshev expansions when using Stochastic Density Functional Theory (SDFT) to calculate DOS.
1975+
- **Description**: The order of Chebyshev expansions when using Stochastic Density Functional Theory (SDFT) to calculate DOS.
19591976
- **Default**: 100
19601977

1978+
### stm_bias
1979+
1980+
- **Type**: Real Real(optional) Integer(optional)
1981+
- **Description**: The bias voltage used to calculate local density of states to simulate scanning tunneling microscope, see details in [out_ldos](#out_ldos). When using three parameters:
1982+
1983+
- The first parameter specifies the initial bias voltage value.
1984+
- The second parameter defines the voltage increment (step size between consecutive bias values).
1985+
- The third parameter determines the total number of voltage points
1986+
- **Default**: 1.0
1987+
- **Unit**: V
1988+
19611989
[back to top](#full-list-of-input-keywords)
19621990

19631991
## NAOs
@@ -2004,10 +2032,13 @@ Warning: this function is not robust enough for the current version. Please try
20042032

20052033
### deepks_out_labels
20062034

2007-
- **Type**: Boolean
2035+
- **Type**: Integer
20082036
- **Availability**: numerical atomic orbital basis
2009-
- **Description**: Print labels and descriptors for DeePKS training in OUT.${suffix}. The names of these files start with "deepks".
2010-
- **Note**: In `LCAO` calculation, the path of a numerical descriptor (an `orb` file) is needed to be specified under the `NUMERICAL_DESCRIPTOR` tag in the `STRU` file. For example:
2037+
- **Description**: Print labels and descriptors for DeePKS in OUT.${suffix}. The names of these files start with "deepks".
2038+
- 0 : No output.
2039+
- 1 : Output intermediate files needed during DeePKS training.
2040+
- 2 : Output target labels for label preperation. The label files are named as `deepks_<property>.npy`, where the units and formats are the same as label files `<property>.npy` required for training, except that the first dimension (`nframes`) is excluded. System structrue files are also given in `deepks_atom.npy` and `deepks_box.npy` in the unit of *Bohr*, which means `lattice_constant` should be set to 1 when training.
2041+
- **Note**: When `deepks_out_labels` equals **1**, the path of a numerical descriptor (an `orb` file) is needed to be specified under the `NUMERICAL_DESCRIPTOR` tag in the `STRU` file. For example:
20112042

20122043
```text
20132044
NUMERICAL_ORBITAL
@@ -2017,8 +2048,8 @@ Warning: this function is not robust enough for the current version. Please try
20172048
NUMERICAL_DESCRIPTOR
20182049
jle.orb
20192050
```
2020-
2021-
- **Default**: False
2051+
This is not needed when `deepks_out_labels` equals 2.
2052+
- **Default**: 0
20222053

20232054
### deepks_scf
20242055

@@ -3548,19 +3579,23 @@ These variables are used to control berry phase and wannier90 interface paramete
35483579
- **Type**: Real
35493580
- **Description**:
35503581
`td_lcut1` is the lower bound of the interval in the length gauge RT-TDDFT, where $x$ is the fractional coordinate:
3582+
35513583
$$
35523584
E(x)=\begin{cases}E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & 0 < x < \mathtt{cut1~~or~~cut2} < x < 1 \end{cases}
35533585
$$
3586+
35543587
- **Default**: 0.05
35553588

35563589
### td_lcut2
35573590

35583591
- **Type**: Real
35593592
- **Description**:
35603593
`td_lcut2` is the upper bound of the interval in the length gauge RT-TDDFT, where $x$ is the fractional coordinate:
3594+
35613595
$$
35623596
E(x)=\begin{cases}E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & 0 < x < \mathtt{cut1~~or~~cut2} < x < 1 \end{cases}
35633597
$$
3598+
35643599
- **Default**: 0.95
35653600

35663601
### td_gauss_freq
@@ -3858,12 +3893,6 @@ These variables are used to control berry phase and wannier90 interface paramete
38583893
- 1: Yes.
38593894
- **Default**: 0
38603895

3861-
- **Type**: Boolean
3862-
- **Description**: Specify whether to set the colorful output in terminal.
3863-
- 0: No.
3864-
- 1: Yes.
3865-
- **Default**: 0
3866-
38673896
### test_skip_ewald
38683897

38693898
- **Type**: Boolean

docs/quick_start/output.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ The following files are the central output files for ABACUS. After executing the
66

77
Different from `INPUT` given by the users, `OUT.suffix/INPUT` contains all parameters in ABACUS.
88

9-
> **Note:** `OUT.suffix/INPUT` contain the initial default of ABACUS instead of the real parameters used in calculations. This file is stored for reproduction in case the default value is changed during development. If you want to figure out the real parameters used in calculations, you can open `OUT.suffix/runing_scf.log` and research corresponding parameter you are interested.
9+
> **Note:** `OUT.suffix/INPUT` contains the **actual parameters used in the calculation**, including:
10+
> 1. **User-specified parameters** (explicitly defined in your input file or command-line arguments, overriding default parameters).
11+
> 2. **System default parameters** (automatically applied when not explicitly provided by the user).
12+
13+
14+
This file ensures calculations can be fully reproduced, even if default values change in future ABACUS versions.
15+
Also notice that in rare cases, a small number of parameters may be dynamically reset to appropriate values during runtime.
1016

1117
For a complete list of input parameters, please consult this [instruction](../advanced/input_files/input-main.md).
1218

source/Makefile.Objects

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ OBJS_ESOLVER=esolver.o\
259259
esolver_of_tool.o\
260260
esolver_of_interface.o\
261261
pw_others.o\
262+
pw_setup.o\
262263

263264
OBJS_ESOLVER_LCAO=esolver_ks_lcao.o\
264265
esolver_ks_lcao_tddft.o\
@@ -495,10 +496,13 @@ OBJS_IO=input_conv.o\
495496
bessel_basis.o\
496497
cal_test.o\
497498
write_dos_pw.o\
499+
nscf_fermi_surf.o\
498500
nscf_band.o\
499501
cal_dos.o\
502+
cal_pdos_gamma.o\
503+
cal_pdos_multik.o\
504+
cal_ldos.o\
500505
cif_io.o\
501-
dos_nao.o\
502506
numerical_descriptor.o\
503507
numerical_basis.o\
504508
numerical_basis_jyjy.o\
@@ -554,13 +558,13 @@ OBJS_IO=input_conv.o\
554558
read_input_item_output.o\
555559
read_set_globalv.o\
556560
orb_io.o\
561+
cal_pLpR.o\
557562

558563
OBJS_IO_LCAO=cal_r_overlap_R.o\
559564
write_orb_info.o\
560565
write_dos_lcao.o\
561566
write_proj_band_lcao.o\
562567
write_istate_info.o\
563-
nscf_fermi_surf.o\
564568
get_pchg_lcao.o\
565569
get_wf_lcao.o\
566570
io_dmk.o\

0 commit comments

Comments
 (0)