Skip to content

Commit e3c493d

Browse files
authored
Merge branch 'deepmodeling:develop' into TDDFT_GPU_phase_1
2 parents 717c164 + c898e52 commit e3c493d

File tree

355 files changed

+13306
-6743
lines changed

Some content is hidden

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

355 files changed

+13306
-6743
lines changed

.github/workflows/build_test_cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
name: "Build with Intel toolchain"
1818

1919
- tag: gnu
20-
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
20+
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
2121
name: "Build extra components with GNU toolchain"
2222
- tag: intel
23-
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1"
23+
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1"
2424
name: "Build extra components with Intel toolchain"
2525

2626
- tag: cuda

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Configure
3333
run: |
34-
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1
34+
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1
3535
3636
- uses: pre-commit/[email protected]
3737
with:

CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project(
1212

1313
option(ENABLE_LCAO "Enable LCAO calculation." ON)
1414
option(ENABLE_DEEPKS "Enable DeePKS functionality" OFF)
15+
option(ENABLE_MLKEDF "Enable Machine Learning based KEDF for OFDFT" OFF)
1516
option(ENABLE_LIBXC "Enable LibXC functionality" OFF)
1617
option(USE_CUDA "Enable support to CUDA for ABACUS." OFF)
1718
option(ENABLE_FLOAT_FFTW "Enable support to single precision FFTW library." OFF)
@@ -469,10 +470,29 @@ if(ENABLE_DEEPKS)
469470
add_compile_definitions(__DEEPKS)
470471
endif()
471472

473+
if(ENABLE_MLKEDF)
474+
target_link_libraries(${ABACUS_BIN_NAME} hamilt_mlkedf)
475+
476+
find_path(libnpy_SOURCE_DIR npy.hpp HINTS ${libnpy_INCLUDE_DIR})
477+
if(NOT libnpy_SOURCE_DIR)
478+
include(FetchContent)
479+
FetchContent_Declare(
480+
libnpy
481+
GIT_REPOSITORY https://github.com/llohse/libnpy.git
482+
GIT_SHALLOW TRUE
483+
GIT_PROGRESS TRUE)
484+
FetchContent_MakeAvailable(libnpy)
485+
else()
486+
include_directories(${libnpy_INCLUDE_DIR})
487+
endif()
488+
include_directories(${libnpy_SOURCE_DIR}/include)
489+
add_compile_definitions(__MLKEDF)
490+
endif()
491+
472492
# Torch uses outdated components to detect CUDA arch, causing failure on
473493
# latest CUDA kits. Set CMake variable TORCH_CUDA_ARCH_LIST in the form of
474494
# "major.minor" if required.
475-
if(ENABLE_DEEPKS OR DEFINED Torch_DIR)
495+
if(ENABLE_DEEPKS OR ENABLE_MLKEDF OR DEFINED Torch_DIR)
476496
find_package(Torch REQUIRED)
477497
if(NOT Torch_VERSION VERSION_LESS "2.1.0")
478498
set_if_higher(CMAKE_CXX_STANDARD 17)

docs/CITATIONS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ The following references are required to be cited when using ABACUS. Specificall
3333
Peize Lin, Xinguo Ren, and Lixin He. "Efficient Hybrid Density Functional Calculations for Large Periodic Systems Using Numerical Atomic Orbitals." Journal of Chemical Theory and Computation 2021, 17(1), 222–239.
3434

3535
Peize Lin, Xinguo Ren, and Lixin He. "Accuracy of Localized Resolution of the Identity in Periodic Hybrid Functional Calculations with Numerical Atomic Orbitals." Journal of Physical Chemistry Letters 2020, 11, 3082-3088.
36+
37+
- **If ML-KEDF is used:**
38+
39+
Sun, Liang, and Mohan Chen. "Machine learning based nonlocal kinetic energy density functional for simple metals and alloys." Physical Review B 109.11 (2024): 115135.
40+
41+
Sun, Liang, and Mohan Chen. "Multi-channel machine learning based nonlocal kinetic energy density functional for semiconductors." Electronic Structure 6.4 (2024): 045006.

0 commit comments

Comments
 (0)