Skip to content

Commit 051475e

Browse files
Merge branch 'develop' into toolchain-202503-dev
2 parents 02d5bd5 + 1a49431 commit 051475e

File tree

204 files changed

+8171
-3561
lines changed

Some content is hidden

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

204 files changed

+8171
-3561
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@ jobs:
1717
volumes:
1818
- /tmp/ccache:/github/home/.ccache
1919
steps:
20-
- name: Checkout
20+
- name: Checkout repository
2121
uses: actions/checkout@v5
2222
with:
23-
submodules: recursive
2423
fetch-depth: 0
24+
# We will handle submodules manually after fixing ownership
25+
submodules: 'false'
26+
27+
- name: Take ownership of the workspace and update submodules
28+
run: |
29+
sudo chown -R $(whoami) .
30+
git submodule update --init --recursive
2531
2632
- name: Install CI tools
2733
run: |

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,12 @@ else()
481481
find_package(Lapack REQUIRED)
482482
include_directories(${FFTW3_INCLUDE_DIRS})
483483
list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK BLAS::BLAS)
484+
if(USE_DSP)
485+
target_link_libraries(${ABACUS_BIN_NAME} ${SCALAPACK_LIBRARY_DIR})
486+
else()
484487
find_package(ScaLAPACK REQUIRED)
485488
list(APPEND math_libs ScaLAPACK::ScaLAPACK)
489+
endif()
486490
if(USE_OPENMP)
487491
list(APPEND math_libs FFTW3::FFTW3_OMP)
488492
endif()

docs/advanced/input_files/input-main.md

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
- [out\_band](#out_band)
148148
- [out\_proj\_band](#out_proj_band)
149149
- [out\_stru](#out_stru)
150-
- [out\_bandgap](#out_bandgap)
151150
- [out\_level](#out_level)
152151
- [out\_alllog](#out_alllog)
153152
- [out\_mat\_hs](#out_mat_hs)
@@ -256,6 +255,9 @@
256255
- [of\_ml\_chi\_pnl](#of_ml_chi_pnl)
257256
- [of\_ml\_chi\_qnl](#of_ml_chi_qnl)
258257
- [of\_ml\_local\_test](#of_ml_local_test)
258+
- [TD-OFDFT: time dependent orbital free density functional theory](#tdofdft-time-dependent-orbital-free-density-functional-theory)
259+
- [of\_cd](#of_cd)
260+
- [of\_mcd\_alpha](#of_mcd_alpha)
259261
- [Electric Field and Dipole Correction](#electric-field-and-dipole-correction)
260262
- [efield\_flag](#efield_flag)
261263
- [dip\_cor\_flag](#dip_cor_flag)
@@ -528,6 +530,7 @@ These variables are used to control general system parameters.
528530
- **Description**: choose the energy solver.
529531
- ksdft: Kohn-Sham density functional theory
530532
- ofdft: orbital-free density functional theory
533+
- tdofdft: time-dependent orbital-free density functional theory
531534
- sdft: [stochastic density functional theory](#electronic-structure-sdft)
532535
- tddft: real-time time-dependent density functional theory (TDDFT)
533536
- lj: Leonard Jones potential
@@ -1074,7 +1077,20 @@ calculations.
10741077

10751078
- **Type**: String
10761079
- **Description**: In our package, the XC functional can either be set explicitly using the `dft_functional` keyword in `INPUT` file. If `dft_functional` is not specified, ABACUS will use the xc functional indicated in the pseudopotential file.
1077-
On the other hand, if dft_functional is specified, it will overwrite the functional from pseudopotentials and performs calculation with whichever functional the user prefers. We further offer two ways of supplying exchange-correlation functional. The first is using 'short-hand' names such as 'LDA', 'PBE', 'SCAN'. A complete list of 'short-hand' expressions can be found in [the source code](../../../source/source_hamilt/module_xc/xc_functional.cpp). The other way is only available when ***compiling with LIBXC***, and it allows for supplying exchange-correlation functionals as combinations of LIBXC keywords for functional components, joined by a plus sign, for example, dft_functional='LDA_X_1D_EXPONENTIAL+LDA_C_1D_CSC'. The list of LIBXC keywords can be found on its [website](https://libxc.gitlab.io/functionals/). In this way, **we support all the LDA,GGA and mGGA functionals provided by LIBXC**.
1080+
On the other hand, if dft_functional is specified, it will overwrite the functional from pseudopotentials and performs calculation with whichever functional the user prefers. We further offer two ways of supplying exchange-correlation functional. The first is using 'short-hand' names. A complete list of 'short-hand' expressions can be found in [the source code](../../../source/source_hamilt/module_xc/xc_functional.cpp). Supported density functionals are:
1081+
- LDA functionals
1082+
- LDA (equivalent with PZ and SLAPZNOGXNOGC), PWLDA
1083+
- GGA functionals
1084+
- PBE (equivalent with SLAPWPBXPBC), PBESOL, REVPBE, WC, BLYP, BP(referred to BP86), PW91, HCTH, OLYP, BLYP_LR
1085+
- meta-GGA functionals
1086+
- SCAN (require LIBXC)
1087+
- Hybrid functionals
1088+
- PBE0, HF
1089+
- If LIBXC is avaliale, additional short-hand names of hybrid functionals are supported: HSE(referred to HSE06), B3LYP, LC_PBE, LC_WPBE, LRC_WPBE, LRC_WPBEH, CAM_PBEH, WP22, CWP22, MULLER (equivalent with POWER)
1090+
- Hybrid meta-GGA functionals
1091+
- SCAN0 (require LIBXC)
1092+
1093+
The other way is only available when ***compiling with LIBXC***, and it allows for supplying exchange-correlation functionals as combinations of LIBXC keywords for functional components, joined by a plus sign, for example, dft_functional='LDA_X_1D_EXPONENTIAL+LDA_C_1D_CSC'. The list of LIBXC keywords can be found on its [website](https://libxc.gitlab.io/functionals/). In this way, **we support all the LDA,GGA and mGGA functionals provided by LIBXC**. Some popular functionals and their usage are: RPBE of [Hammer et al.](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.59.7413), set `dft_functional` to 'GGA_X_RPBE+GGA_C_PBE', and [r$^{2}$SCAN](https://pubs.acs.org/doi/10.1021/acs.jpclett.0c02405), set `dft_functional` to 'MGGA_X_R2SCAN+MGGA_C_R2SCAN'.
10781094

10791095
Furthermore, the old INPUT parameter exx_hybrid_type for hybrid functionals has been absorbed into dft_functional. Options are `hf` (pure Hartree-Fock), `pbe0`(PBE0), `hse` (Note: in order to use HSE functional, LIBXC is required). Note also that HSE has been tested while PBE0 has NOT been fully tested yet, and the maximum CPU cores for running exx in parallel is $N(N+1)/2$, with N being the number of atoms.
10801096

@@ -1488,15 +1504,20 @@ These variables are used to control the geometry relaxation.
14881504

14891505
### relax_method
14901506

1491-
- **Type**: String
1507+
- **Type**: Vector of string
14921508
- **Description**: The methods to do geometry optimization.
1509+
the first element:
14931510
- cg: using the conjugate gradient (CG) algorithm. Note that there are two implementations of the conjugate gradient (CG) method, see [relax_new](#relax_new).
1494-
- bfgs: using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
1495-
- bfgs_trad: using the traditional Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
1511+
- bfgs : using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
1512+
- lbfgs: using the Limited-memory Broyden–Fletcher–Goldfarb–Shanno (LBFGS) algorithm.
14961513
- cg_bfgs: using the CG method for the initial steps, and switching to BFGS method when the force convergence is smaller than [relax_cg_thr](#relax_cg_thr).
14971514
- sd: using the steepest descent (SD) algorithm.
14981515
- fire: the Fast Inertial Relaxation Engine method (FIRE), a kind of molecular-dynamics-based relaxation algorithm, is implemented in the molecular dynamics (MD) module. The algorithm can be used by setting [calculation](#calculation) to `md` and [md_type](#md_type) to `fire`. Also ionic velocities should be set in this case. See [fire](../md.md#fire) for more details.
1499-
- **Default**: cg
1516+
1517+
the second element:
1518+
when the first element is bfgs, if the second parameter is 1, it indicates the use of the new BFGS algorithm; if the second parameter is not 1, it indicates the use of the old BFGS algorithm.
1519+
- **Default**: cg 1
1520+
- **Note**:In the 3.10-LTS version, the type of this parameter is std::string. It can be set to "cg","bfgs","cg_bfgs","bfgs_trad","lbfgs","sd","fire".
15001521

15011522
### relax_new
15021523

@@ -1823,14 +1844,6 @@ These variables are used to control the output of properties.
18231844
- **Description**: Whether to output structure files per ionic step in geometry relaxation calculations into `OUT.${suffix}/STRU_ION${istep}_D`, where `${istep}` is the ionic step.
18241845
- **Default**: False
18251846

1826-
### out_bandgap
1827-
1828-
- **Type**: Boolean
1829-
- **Description**: Whether to print the bandgap per electronic iteration into `OUT.${suffix}/running_${calculation}.log`. The value of bandgaps can be obtained by searching for the keyword:
1830-
- [nupdown](#nupdown) > 0: `E_bandgap_up` and `E_bandgap_dw`
1831-
- [nupdown](#nupdown) = 0: `E_bandgap`
1832-
- **Default**: False
1833-
18341847
### out_level
18351848

18361849
- **Type**: String
@@ -2298,7 +2311,7 @@ Warning: this function is not robust enough for the current version. Please try
22982311
- 0: Don't include bandgap label
22992312
- 1: Include target bandgap label (see [deepks\_band\_range](#deepks_band_range) for more details)
23002313
- 2: Include multiple bandgap label (see [deepks\_band\_range](#deepks_band_range) for more details)
2301-
- 3: For systems containing H atoms only, HOMO is defined as the max occupation expect H atoms and the bandgap label is the energy between HOMO and (HOMO + 1)
2314+
- 3: Used for systems containing H atoms. Here HOMO is defined as the max occupation except H atoms and the bandgap label is the energy between HOMO and (HOMO + 1)
23022315
- **Default**: 0
23032316

23042317
### deepks_band_range
@@ -2730,6 +2743,25 @@ Warning: this function is not robust enough for the current version. Please try
27302743

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

2746+
## TDOFDFT: time dependent orbital free density functional theory
2747+
2748+
### of_cd
2749+
2750+
- **Type**: Boolean
2751+
- **Availability**: TDOFDFT
2752+
- **Type**: Boolean
2753+
- **Description**: Added the current dependent(CD) potential. (https://doi.org/10.1103/PhysRevB.98.144302)
2754+
- True: Added the CD potential.
2755+
- False: Not added the CD potential.
2756+
- **Default**: False
2757+
2758+
### of_mcd_alpha
2759+
2760+
- **Type**: Real
2761+
- **Availability**: TDOFDFT
2762+
- **Description**: The value of the parameter alpha in modified CD potential method. mCDPotenial=alpha*CDPotenial(proposed in paper PhysRevB.98.144302)
2763+
- **Default**: 1.0
2764+
27332765
## Electric field and dipole correction
27342766

27352767
These variables are relevant to electric field and dipole correction

docs/advanced/interface/TB2J.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ out_mul 1
6666
#Parameters (4.Relaxation)
6767
ks_solver genelpa
6868
scf_nmax 200
69-
out_bandgap 0
7069
7170
#Parameters (5.LCAO)
7271
basis_type lcao

examples/03_spin_polarized/ATOM/INPUT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ cal_force 1
4646
cal_stress 1
4747
out_stru 1 # print STRU in OUT
4848
out_chg 0 # print CHG or not
49-
out_bandgap 1 # if bandgap and mul out, chg will out
5049
out_mul 1 # print Mulliken charge and mag of atom in mulliken.txt
5150
# out_wfc_lcao 1
5251
# out_interval 1

examples/19_dftu/NiO/INPUT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dft_plus_u 1
2828
orbital_corr 2 2 -1
2929
hubbard_u 5.0 5.0 0.0
3030

31-
out_bandgap 1
3231
out_chg 1
3332
out_mul 1
3433

examples/relax/lcao_output/INPUT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ out_band 0
4040
out_stru 0
4141
out_app_flag 0
4242

43-
out_interval 1

examples/relax/pw_output/INPUT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ out_dos 1 # dos.txt g
3737
out_elf 1 # elf.txt
3838
out_band 1 # eig.txt
3939
out_stru 1 # g
40-
out_bandgap 1
4140

4241
out_app_flag 0
4342

python/pyabacus/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ list(APPEND _diago
189189
${HSOLVER_PATH}/diago_david.cpp
190190
${HSOLVER_PATH}/diag_const_nums.cpp
191191
${HSOLVER_PATH}/diago_iter_assist.cpp
192-
${HSOLVER_PATH}/kernels/dngvd_op.cpp
192+
${HSOLVER_PATH}/kernels/hegvd_op.cpp
193193
${HSOLVER_PATH}/kernels/bpcg_kernel_op.cpp
194194
${BASE_PATH}/kernels/math_kernel_op.cpp
195195
${BASE_PATH}/kernels/math_kernel_op_vec.cpp

python/pyabacus/src/hsolver/py_diago_cg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class PyDiagoCG
145145
std::copy(hpsi_ptr, hpsi_ptr + nvec * ld_psi, hpsi_out.data<std::complex<double>>());
146146
};
147147

148-
auto subspace_func = [] (const ct::Tensor& psi_in, ct::Tensor& psi_out) { /*do nothing*/ };
148+
auto subspace_func = [](const ct::Tensor& psi_in, ct::Tensor& psi_out, const bool S_orth) { /*do nothing*/ };
149149

150150
auto spsi_func = [this] (const ct::Tensor& psi_in, ct::Tensor& spsi_out) {
151151
const auto ndim = psi_in.shape().ndim();

0 commit comments

Comments
 (0)