Skip to content

Commit 3452389

Browse files
Merge branch 'develop' into charge_mixing
2 parents 1631c5e + 32ba8d4 commit 3452389

File tree

114 files changed

+2622
-2272
lines changed

Some content is hidden

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

114 files changed

+2622
-2272
lines changed

.gitmodules

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
[submodule "deps/LibRI"]
2-
path = deps/LibRI
3-
url = https://github.com/abacusmodeling/LibRI.git
4-
branch = master
5-
[submodule "deps/LibComm"]
6-
path = deps/LibComm
7-
url = https://github.com/abacusmodeling/LibComm.git
8-
branch = master
91
[submodule "deps/libpaw_interface"]
102
path = deps/libpaw_interface
113
url = https://github.com/wenfei-li/libpaw_interface

CMakeLists.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -538,13 +538,10 @@ endif()
538538
if(ENABLE_LIBRI)
539539
set_if_higher(CMAKE_CXX_STANDARD 14)
540540
if(LIBRI_DIR)
541-
include_directories(${LIBRI_DIR}/include)
542-
elseif(GIT_SUBMODULE)
543-
git_submodule_update()
544-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/deps/LibRI/include)
545541
else()
546-
message(FATAL_ERROR "Must provide LIBRI_DIR for RI related features.")
542+
find_package(LibRI REQUIRED)
547543
endif()
544+
include_directories(${LIBRI_DIR}/include)
548545
target_link_libraries(${ABACUS_BIN_NAME} ri module_exx_symmetry)
549546
add_compile_definitions(__EXX EXX_DM=3 EXX_H_COMM=2 TEST_EXX_LCAO=0
550547
TEST_EXX_RADIAL=1)
@@ -555,13 +552,10 @@ if(ENABLE_LIBRI OR DEFINED LIBCOMM_DIR)
555552
endif()
556553
if(ENABLE_LIBCOMM)
557554
if(LIBCOMM_DIR)
558-
include_directories(${LIBCOMM_DIR}/include)
559-
elseif(GIT_SUBMODULE)
560-
git_submodule_update()
561-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/deps/LibComm/include)
562555
else()
563-
message(FATAL_ERROR "Must provide LIBCOMM_DIR for RI related features.")
556+
find_package(LibComm REQUIRED)
564557
endif()
558+
include_directories(${LIBCOMM_DIR}/include)
565559
endif()
566560

567561
if(ENABLE_PAW)

cmake/FindLibComm.cmake

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
###############################################################################
2+
# - Find LibComm
3+
# Find the native LibComm files.
4+
#
5+
# LIBCOMM_FOUND - True if LibComm is found.
6+
# LIBCOMM_DIR - Where to find LibComm files.
7+
8+
find_path(LIBCOMM_DIR
9+
include/Comm/Comm_Tools.h
10+
HINTS ${LIBCOMM_DIR}
11+
HINTS ${LibComm_DIR}
12+
HINTS ${libcomm_DIR}
13+
)
14+
15+
if(NOT LIBCOMM_DIR)
16+
include(FetchContent)
17+
FetchContent_Declare(
18+
LibComm
19+
URL https://github.com/abacusmodeling/LibComm/archive/refs/tags/v0.1.1.tar.gz
20+
)
21+
FetchContent_Populate(LibComm)
22+
set(LIBCOMM_DIR ${libcomm_SOURCE_DIR})
23+
endif()
24+
# Handle the QUIET and REQUIRED arguments and
25+
# set LIBCOMM_FOUND to TRUE if all variables are non-zero.
26+
include(FindPackageHandleStandardArgs)
27+
find_package_handle_standard_args(LibComm DEFAULT_MSG LIBCOMM_DIR)
28+
29+
# Copy the results to the output variables and target.
30+
mark_as_advanced(LIBCOMM_DIR)

cmake/FindLibRI.cmake

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
###############################################################################
2+
# - Find LibRI
3+
# Find the native LibRI files.
4+
#
5+
# LIBRI_FOUND - True if LibRI is found.
6+
# LIBRI_DIR - Where to find LibRI files.
7+
8+
find_path(LIBRI_DIR
9+
include/RI/version.h
10+
HINTS ${LIBRI_DIR}
11+
HINTS ${LibRI_DIR}
12+
HINTS ${libri_DIR}
13+
)
14+
15+
if(NOT LIBRI_DIR)
16+
include(FetchContent)
17+
FetchContent_Declare(
18+
LibRI
19+
URL https://github.com/abacusmodeling/LibRI/archive/refs/tags/v0.2.1.1.tar.gz
20+
)
21+
FetchContent_Populate(LibRI)
22+
set(LIBRI_DIR ${libri_SOURCE_DIR})
23+
endif()
24+
# Handle the QUIET and REQUIRED arguments and
25+
# set LIBRI_FOUND to TRUE if all variables are non-zero.
26+
include(FindPackageHandleStandardArgs)
27+
find_package_handle_standard_args(LibRI DEFAULT_MSG LIBRI_DIR)
28+
29+
# Copy the results to the output variables and target.
30+
mark_as_advanced(LIBRI_DIR)

deps/LibComm

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/LibRI

Lines changed: 0 additions & 1 deletion
This file was deleted.

python/pyabacus/src/ModuleBase/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ list(APPEND pymodule_base
22
${PROJECT_SOURCE_DIR}/src/ModuleBase/py_base_math.cpp
33
${BASE_PATH}/kernels/math_op.cpp
44
${BASE_PATH}/module_device/memory_op.cpp
5+
${BASE_PATH}/module_device/device.cpp
56
)
67

78
pybind11_add_module(_base_pack MODULE ${pymodule_base})

python/pyabacus/src/ModuleNAO/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ list(APPEND _naos
1717
${ABACUS_SOURCE_DIR}/module_base/kernels/math_op.cpp
1818
# ${ABACUS_SOURCE_DIR}/module_psi/kernels/psi_memory_op.cpp
1919
${ABACUS_SOURCE_DIR}/module_base/module_device/memory_op.cpp
20+
${ABACUS_SOURCE_DIR}/module_base/module_device/device.cpp
2021
)
2122
add_library(naopack SHARED
2223
${_naos}

source/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ list(APPEND device_srcs
3030
module_hamilt_pw/hamilt_pwdft/kernels/veff_op.cpp
3131
module_hamilt_pw/hamilt_pwdft/kernels/ekinetic_op.cpp
3232
module_hamilt_pw/hamilt_pwdft/kernels/meta_op.cpp
33+
module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp
3334
module_basis/module_pw/kernels/pw_op.cpp
3435
module_hsolver/kernels/dngvd_op.cpp
3536
module_hsolver/kernels/math_kernel_op.cpp
@@ -55,6 +56,7 @@ if(USE_CUDA)
5556
module_hamilt_pw/hamilt_pwdft/kernels/cuda/veff_op.cu
5657
module_hamilt_pw/hamilt_pwdft/kernels/cuda/ekinetic_op.cu
5758
module_hamilt_pw/hamilt_pwdft/kernels/cuda/meta_op.cu
59+
module_hamilt_pw/hamilt_stodft/kernels/cuda/hpsi_norm_op.cu
5860
module_basis/module_pw/kernels/cuda/pw_op.cu
5961
module_hsolver/kernels/cuda/dngvd_op.cu
6062
module_hsolver/kernels/cuda/math_kernel_op.cu
@@ -78,6 +80,7 @@ if(USE_ROCM)
7880
module_hamilt_pw/hamilt_pwdft/kernels/rocm/veff_op.hip.cu
7981
module_hamilt_pw/hamilt_pwdft/kernels/rocm/ekinetic_op.hip.cu
8082
module_hamilt_pw/hamilt_pwdft/kernels/rocm/meta_op.hip.cu
83+
module_hamilt_pw/hamilt_stodft/kernels/rocm/hpsi_norm_op.hip.cu
8184
module_basis/module_pw/kernels/rocm/pw_op.hip.cu
8285
module_hsolver/kernels/rocm/dngvd_op.hip.cu
8386
module_hsolver/kernels/rocm/math_kernel_op.hip.cu

source/Makefile.Objects

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ VPATH=./src_global:\
4949
./module_hamilt_pw/hamilt_stodft:\
5050
./module_hamilt_pw/hamilt_pwdft/operator_pw:\
5151
./module_hamilt_pw/hamilt_pwdft/kernels:\
52+
./module_hamilt_pw/hamilt_stodft/kernels:\
5253
./module_hamilt_lcao/module_hcontainer:\
5354
./module_hamilt_lcao/hamilt_lcaodft:\
5455
./module_hamilt_lcao/module_tddft:\
@@ -230,6 +231,7 @@ OBJS_ELECSTAT_LCAO=elecstate_lcao.o\
230231
elecstate_lcao_tddft.o\
231232
elecstate_lcao_cal_tau.o\
232233
density_matrix.o\
234+
density_matrix_io.o\
233235
cal_dm_psi.o\
234236

235237
OBJS_ESOLVER=esolver.o\
@@ -295,6 +297,7 @@ OBJS_HAMILT=hamilt_pw.o\
295297
operator_pw.o\
296298
ekinetic_pw.o\
297299
ekinetic_op.o\
300+
hpsi_norm_op.o\
298301
veff_pw.o\
299302
veff_op.o\
300303
nonlocal_pw.o\
@@ -571,8 +574,6 @@ OBJS_LCAO=evolve_elec.o\
571574
stress_tools.o\
572575
edm.o\
573576
pulay_force_stress_center2.o\
574-
fvnl_dbeta_gamma.o\
575-
fvnl_dbeta_k.o\
576577
grid_init.o\
577578
spar_dh.o\
578579
spar_exx.o\

0 commit comments

Comments
 (0)