Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d853e36
Refactor: DFT+U 10th refactor — HamiltLCAO operator-chain factory, fo…
mohanchen Sep 16, 2026
f4ce8f7
Fix: compile lr_io_krlist.cpp only with LibRI to repair non-EXX build…
goodchong Sep 16, 2026
575d8ce
Fix DSP linking order to eliminate Openblas warning (#7946)
Cstandardlib Sep 16, 2026
31c0829
Fix(deltaspin): free pre_hr/B_I_data caches on cal_pre_HR() reinitial…
dyzheng Sep 17, 2026
98b141a
tests: remove fifteen #define private public — by deleting dead hacks…
Critsium-xy Sep 17, 2026
33ec78c
source_md: pass MD_para explicitly and expose thermostat state, remov…
Critsium-xy Sep 17, 2026
e0bb4e9
tests: take source_base and source_hamilt off #define private public …
Critsium-xy Sep 17, 2026
db4e886
source_estate: give Occupy's stateless smearing helpers a real interf…
Critsium-xy Sep 17, 2026
4a9aee7
source_relax: give BFGS_Basic and Ions_Move_BFGS an explicit test sea…
Critsium-xy Sep 17, 2026
688d0c7
Output a screen notice when calculating EXX force/stress (#7975)
goodchong Sep 17, 2026
0051894
Feature: Symmetry for DFT+U (#7969)
maki49 Sep 18, 2026
882f825
source_hsolver: decouple the eigensolvers from hamilt through HSOpera…
Critsium-xy Sep 18, 2026
a3c8442
Refactor: Replace RapidJSON with nlohmann-json (#7979)
Growl1234 Sep 18, 2026
81343f6
Fix a bug in PW-DFPT; dfpt_pw_init.cpp: copy_occ_state_ball (#7986)
Zanthoxylum Sep 18, 2026
cfd4dcf
tests: take source_relax, source_esolver and source_md to zero access…
Critsium-xy Sep 18, 2026
a4506f3
Refactor OFDFT line-search status to std::string (#7985)
zzlinpku Sep 18, 2026
31a9c47
source_cell: give K_Vectors an explicit test seam, taking the module …
Critsium-xy Sep 18, 2026
b1d6dfc
source_estate: print_etot takes its INPUT parameters explicitly, remo…
Critsium-xy Sep 18, 2026
58ef72c
Fix: bug of DeltaSpin with nspin=2 for both pw and lcao base (#7977)
dyzheng Sep 18, 2026
239e8f4
Remove unused cereal JSON archive (#7993)
Growl1234 Sep 19, 2026
583a20b
Refactor charge density module (#7972)
mohanchen Sep 21, 2026
2e03225
tests: take three charge/DM tests off #define private public (#7998)
Critsium-xy Sep 21, 2026
3a46458
Refactor: replace the JSON path walker with schema operations (#7994)
Growl1234 Sep 21, 2026
e6a49e9
Fix: Correct FFTW version detection and NCCL build summary (#7995)
AsTonyshment Sep 21, 2026
734b8f4
Fix #7959 #7956, remove useless file. (#7962)
mohanchen Sep 22, 2026
3b7dcba
Refactor DFT+U, step 11 (#8001)
mohanchen Sep 23, 2026
f909894
tests: remove three more #define private public — Charge_Extra, cal_e…
Critsium-xy Sep 23, 2026
4f2a397
tests: run integration cases concurrently, cutting the CPU suites to …
Critsium-xy Sep 23, 2026
40e7ce8
Build: update version to v3.11.0-beta10 (#7997)
zzlinpku Sep 24, 2026
4b9f480
Refactor density matrix module. (#8000)
mohanchen Sep 24, 2026
184c75e
Docs: Fix Sphinx build warnings and treat warnings as errors (#7958)
Growl1234 Sep 24, 2026
3cc3c24
fix: replace raw new/delete with std::vector in cal_foverlap_rt (#8020)
mohanchen Sep 25, 2026
7fb23a2
Fix DMR spin-channel mismatch in openshell LR spectra (#8016)
maki49 Sep 25, 2026
4447d9f
Refactor projection in pw basis (#8007)
mohanchen Sep 25, 2026
d71963a
Fix BLACS grid leak in Parallel_2D (issue #8003) (#8013)
mohanchen Sep 25, 2026
fb9f03a
Fix ASE STRU parser KeyError on LATTICE_PARAMETER block (#8019)
mohanchen Sep 25, 2026
3478727
Fix #7556 and #7558 in pyabacus (#8021)
mohanchen Sep 25, 2026
47ef73a
fix: guard Binstream write path against unopened files and failed fwr…
mohanchen Sep 26, 2026
1202e6f
Fix: validate cube file parsing before copying charge data (#7563), i…
mohanchen Sep 26, 2026
e41e1fa
fix: rpa_ccp_rmesh_times wrongly pass. (#8036)
Fisherd99 Sep 27, 2026
789d947
Docs: repoint example links to the renumbered examples/ directories (…
pratikgx Sep 27, 2026
0b7e5a9
Fix(base,ri): release Sphbes and RPA helpers on exceptions (#8038)
Flying-dragon-boxing Sep 27, 2026
3c21c9c
Fix(pw): release EXX potential buffers on all exit paths (#8022) (#8037)
Flying-dragon-boxing Sep 27, 2026
0e1a2cf
Fix: split LibXC GGA threshold masks for vrho and vsigma following QE…
Flying-dragon-boxing Sep 27, 2026
be015ef
Feature(pw): batched FFTs, small ecutexx grid and band chunking for E…
Flying-dragon-boxing Sep 27, 2026
7873573
Move HSolverPW_SDFT into module_stodft as StoHSolverPW; rename Hamilt…
Critsium-xy Sep 27, 2026
1dd2b80
Toolchain: Remove OpenBLAS-based architecture detection (#7971)
Growl1234 Sep 27, 2026
52b4a45
Update out_stru parameter and its output context (#8026)
mohanchen Sep 28, 2026
ed2e6a5
[Refactor] Remove dead runtime-device memory wrappers
Cstandardlib Sep 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:

- tag: gnu
external_toolchain_args: ""
build_args: "-DENABLE_LIBXC=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON -DENABLE_DFTD4=ON -DENABLE_PEXSI=ON"
build_args: "-DENABLE_LIBXC=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON -DENABLE_DFTD4=ON -DENABLE_PEXSI=ON -DENABLE_JSON=ON"
name: "Build extra components with GNU toolchain"
- tag: intel
external_toolchain_args: "--with-intel"
build_args: "-DENABLE_LIBXC=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON -DENABLE_DFTD4=ON"
build_args: "-DENABLE_LIBXC=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON -DENABLE_DFTD4=ON -DENABLE_JSON=ON"
name: "Build extra components with Intel toolchain"

- tag: cuda
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_test_makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Build
# TODO: Remove nlohmann-json installation here since Dockerfile will have installed it.
run: |
apt update && apt install -y nlohmann-json3-dev
export I_MPI_CXX=icpx
chmod a+x generate_build_info.sh
cd source
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
-DENABLE_LIBXC=ON \
-DENABLE_LIBRI=ON \
-DENABLE_GOOGLEBENCH=ON \
-DENABLE_RAPIDJSON=ON \
-DENABLE_JSON=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage" \
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
Expand All @@ -83,7 +83,7 @@ jobs:

lcov --directory . --capture --output-file coverage.info

lcov --remove coverage.info '/usr/*' '*/test/*' '*/external/*' '*/build/*' --output-file coverage.filtered.info
lcov --remove coverage.info '/usr/*' '*/test/*' '*/unittests/*' '*/external/*' '*/build/*' --output-file coverage.filtered.info

genhtml coverage.filtered.info --output-directory coverage-report

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
-DENABLE_LIBXC=ON \
-DENABLE_LIBRI=ON \
-DENABLE_GOOGLEBENCH=ON \
-DENABLE_RAPIDJSON=ON \
-DENABLE_JSON=ON \
-DENABLE_FLOAT_FFTW=ON \
-DENABLE_DFTD4=ON \
-DENABLE_PEXSI=ON \
Expand Down Expand Up @@ -212,6 +212,13 @@ jobs:
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_ESTATE

- name: Module_Charge Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_CHARGE

- name: Module_Hamilt Unittests
env:
GTEST_COLOR: 'yes'
Expand Down Expand Up @@ -343,4 +350,4 @@ jobs:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|17_DS_DFTU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|MODULE_PSI|MODULE_ESTATE|MODULE_RI|MODULE_HAMILT|MODULE_PW|MODULE_LCAO|MODULE_AO|MODULE_NAO|MODULE_RELAX|MODULE_LR'
ctest --test-dir build -V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|17_DS_DFTU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|MODULE_PSI|MODULE_ESTATE|MODULE_CHARGE|MODULE_RI|MODULE_HAMILT|MODULE_PW|MODULE_LCAO|MODULE_AO|MODULE_NAO|MODULE_RELAX|MODULE_LR'
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sphinx:
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ rules. Read the complete governance document before making or reviewing changes:
initializer list to direct parameter passthrough. Perform multi-step
computations in the constructor body instead, so failures are easy to
debug and each intermediate result is inspectable.
14. Do not write conditional or computed expressions in a function's
argument list; first assign the value to a named local variable, then
pass that variable. This keeps each argument inspectable and makes the
call site self-documenting. For example, prefer
`const int isk = (nspin == 2 && isk_ptr) ? isk_ptr[ik] : 0;`
followed by `f(..., isk, ...)` over inlining the ternary into the call.
- Use LF line endings for text files. Only `.bat` and `.cmd` files may use CRLF.
- Keep source file additions deterministic: update the relevant `CMakeLists.txt`
or explain why the file is generated or included indirectly.
Expand Down
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ option(ENABLE_NATIVE_OPTIMIZATION

option(COMMIT_INFO "Print commit information in log" ON)
option(ENABLE_GOOGLEBENCH "Enable GOOGLE-benchmark usage" OFF)
option(ENABLE_RAPIDJSON "Enable rapid-json usage" OFF)
option(ENABLE_JSON "Enable JSON output" OFF)
option(ENABLE_CNPY "Enable cnpy usage" OFF)

# Options requiring MPI and LCAO
Expand Down Expand Up @@ -110,6 +110,14 @@ abacus_rename_option(USE_OPENMP ENABLE_OPENMP)
abacus_rename_option(USE_ABACUS_LIBM ENABLE_ABACUS_LIBM)
abacus_rename_option(INFO MATH_INFO)

if(DEFINED CACHE{ENABLE_RAPIDJSON})
message(
FATAL_ERROR
"ENABLE_RAPIDJSON is no longer supported. "
"ABACUS now uses nlohmann-json as its JSON backend; "
"please use -DENABLE_JSON=ON instead.")
endif()

if(DEFINED CACHE{ENABLE_LIBCOMM})
message(
DEPRECATION
Expand Down Expand Up @@ -139,15 +147,8 @@ if(NOT DEFINED NVHPC_ROOT_DIR AND DEFINED ENV{NVHPC_ROOT})
endif()

# enable json support
if(ENABLE_RAPIDJSON)
find_package(RapidJSON CONFIG REQUIRED)
if(NOT TARGET RapidJSON)
message(
FATAL_ERROR
"RapidJSON was found, but target RapidJSON is missing. "
"Check if your RapidJSON installation provides a complete exported CMake configuration."
)
endif()
if(ENABLE_JSON)
find_package(nlohmann_json REQUIRED)
endif()

# get commit info
Expand Down Expand Up @@ -284,8 +285,8 @@ if(CCACHE)
set(CMAKE_CUDA_COMPILER_LAUNCHER ${CCACHE} ${CMAKE_CUDA_COMPILER_LAUNCHER})
endif()

# Choose build type from: Debug Release RelWithDebInfo MinSizeRel Select
# 'Release' configuration for best performance; this will disable all
# Choose build type from: Debug Release RelWithDebInfo MinSizeRel
# Select 'Release' configuration for best performance; this will disable all
# assertions. Other default configurations are also available, see:
# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#default-and-custom-configurations
# For default flags, see:
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

RUN apt update && apt install -y --no-install-recommends \
libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libfftw3-dev libcereal-dev \
libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy ca-certificates \
libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy ca-certificates nlohmann-json3-dev \
bc cmake git g++ make time sudo unzip vim wget libopenmpi-dev gfortran libtool-bin && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -25,19 +25,11 @@ RUN cd /tmp && \
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
cd /tmp && rm -rf elpa-$ELPA_VER

# RapidJSON
RUN cd /tmp && \
wget --quiet https://codeload.github.com/Tencent/rapidjson/tar.gz/24b5e7a -O rapidjson-24b5e7a.tar.gz && \
tar -xzf rapidjson-24b5e7a.tar.gz && cd rapidjson-24b5e7a && \
cmake -B build -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && \
cmake --build build --target install && \
cd /tmp && rm -rf rapidjson-24b5e7a rapidjson-24b5e7a.tar.gz

ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build -DUSE_CUDA=ON -DENABLE_RAPIDJSON=ON && \
cmake -B build -DUSE_CUDA=ON -DENABLE_JSON=ON && \
cmake --build build -j $(nproc) && \
cmake --install build && \
rm -rf build && \
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
FROM ubuntu:22.04
RUN apt update && apt install -y --no-install-recommends \
libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev \
libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy \
libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy nlohmann-json3-dev \
libmetis-dev libparmetis-dev libsuperlu-dist-dev \
bc cmake git g++ make time sudo unzip vim wget gfortran ca-certificates && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -28,14 +28,6 @@ RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-wit
--quiet -O libtorch.zip && \
unzip -q libtorch.zip -d /opt && rm libtorch.zip

# RapidJSON
RUN cd /tmp && \
wget --quiet https://codeload.github.com/Tencent/rapidjson/tar.gz/24b5e7a -O rapidjson-24b5e7a.tar.gz && \
tar -xzf rapidjson-24b5e7a.tar.gz && cd rapidjson-24b5e7a && \
cmake -B build -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && \
cmake --build build --target install && \
cd /tmp && rm -r rapidjson-24b5e7a rapidjson-24b5e7a.tar.gz

ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake

# PEXSI
Expand All @@ -56,7 +48,7 @@ ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/deve

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build -DENABLE_MLALGO=ON -DENABLE_PEXSI=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_RAPIDJSON=ON && \
cmake -B build -DENABLE_MLALGO=ON -DENABLE_PEXSI=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_JSON=ON && \
cmake --build build -j $(nproc) && \
cmake --install build && \
rm -rf build
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile.intel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM intel/oneapi-hpckit:2025.2.2-0-devel-ubuntu22.04

RUN apt-get update && apt-get install -y \
bc cmake git gnupg gcc g++ python3-numpy sudo wget vim unzip \
libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev \
libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev nlohmann-json3-dev \
pkg-config build-essential autoconf automake libtool ca-certificates && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -22,14 +22,6 @@ RUN cd /tmp && \
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
cd /tmp && rm -rf elpa-$ELPA_VER

# RapidJSON
RUN cd /tmp && \
wget --quiet https://codeload.github.com/Tencent/rapidjson/tar.gz/24b5e7a -O rapidjson-24b5e7a.tar.gz && \
tar -xzf rapidjson-24b5e7a.tar.gz && cd rapidjson-24b5e7a && \
cmake -B build -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && \
cmake --build build --target install && \
cd /tmp && rm -r rapidjson-24b5e7a rapidjson-24b5e7a.tar.gz

# LibTorch (Note: Using pre-built Torch library with MKL might cause issues)
RUN wget -q https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -O /tmp/libtorch.zip && \
unzip -q /tmp/libtorch.zip -d /opt && rm -f /tmp/libtorch.zip
Expand All @@ -43,7 +35,7 @@ RUN cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --de
-DENABLE_MLALGO=ON \
-DENABLE_LIBXC=ON \
-DENABLE_LIBRI=ON \
-DENABLE_RAPIDJSON=ON \
-DENABLE_JSON=ON \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j $(nproc) && \
cmake --install build && \
Expand Down
26 changes: 6 additions & 20 deletions cmake/CollectBuildInfoVars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,7 @@ else()
if(FFTW3_VERSION)
set(ABACUS_FFTW_VERSION "yes (v${FFTW3_VERSION})")
else()
if(FFTW3_INCLUDE_DIR AND EXISTS "${FFTW3_INCLUDE_DIR}/fftw3.h")
file(STRINGS "${FFTW3_INCLUDE_DIR}/fftw3.h" _fftw_ver_line
REGEX "^#define[\t ]+FFTW_VERSION[\t ]+\"[^\"]+\"")
if(_fftw_ver_line)
string(REGEX REPLACE "^#define[\t ]+FFTW_VERSION[\t ]+\"([^\"]+)\"" "\\1"
FFTW3_VERSION "${_fftw_ver_line}")
set(ABACUS_FFTW_VERSION "yes (v${FFTW3_VERSION})")
else()
set(ABACUS_FFTW_VERSION "yes (version unknown)")
endif()
else()
set(ABACUS_FFTW_VERSION "yes (version unknown)")
endif()
set(ABACUS_FFTW_VERSION "yes (version unknown)")
endif()
endif()
endif()
Expand Down Expand Up @@ -240,7 +228,7 @@ endif()
if(ENABLE_NCCL_PARALLEL_DEVICE)
set(ABACUS_NCCL_PARA "Enabled")
else()
set(ABACUS_NCCL_PARA "Enabled")
set(ABACUS_NCCL_PARA "Disabled")
endif()

# EXX Libraries
Expand Down Expand Up @@ -361,12 +349,10 @@ else()
set(ABACUS_GOOGLEBENCH_VERSION "Disabled")
endif()

if(DEFINED RapidJSON_DIR AND ENABLE_RAPIDJSON)
set(ABACUS_RAPIDJSON_VERSION "yes (path: ${RapidJSON_DIR})")
elseif(ENABLE_RAPIDJSON)
set(ABACUS_RAPIDJSON_VERSION "yes (from git origin/master)")
if(ENABLE_JSON)
set(ABACUS_JSON_VERSION "yes (nlohmann-json v${nlohmann_json_VERSION})")
else()
set(ABACUS_RAPIDJSON_VERSION "no")
set(ABACUS_JSON_VERSION "no")
endif()

if(ENABLE_MLALGO)
Expand Down Expand Up @@ -458,7 +444,7 @@ if(ENABLE_EXX_DEV)
message(" (EXX developing features enabled)")
endif()
message(" DFT-D4 = ${ABACUS_DFTD4_VERSION}")
message(" RAPIDJSON = ${ABACUS_RAPIDJSON_VERSION}")
message(" JSON = ${ABACUS_JSON_VERSION}")
message(" PEXSI = ${ABACUS_PEXSI_VERSION}")
message(" CNPY = ${ABACUS_CNPY_VERSION}")
message(" -------------------------------------------------------------------")
Expand Down
17 changes: 11 additions & 6 deletions cmake/modules/FindFFTW3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# FFTW3_INCLUDE_DIRS - Where to find FFTW3 headers.
# FFTW3_LIBRARIES - List of libraries when using FFTW3.
# FFTW3_FOUND - True if FFTW3 is found.
# FFTW3_VERSION - Version from the selected library's pkgconfig/fftw3.pc, if available.
#

find_path(FFTW3_INCLUDE_DIR
Expand Down Expand Up @@ -47,6 +48,7 @@ endif()
find_package_handle_standard_args(FFTW3 DEFAULT_MSG ${_fftw3_required_vars})

# Copy the results to the output variables and target.
set(FFTW3_VERSION "")
if(FFTW3_FOUND)
set(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
if (ENABLE_OPENMP)
Expand All @@ -55,13 +57,16 @@ if(FFTW3_FOUND)

set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})

# Try to extract FFTW version from header
if(FFTW3_INCLUDE_DIR AND EXISTS "${FFTW3_INCLUDE_DIR}/fftw3.h")
file(STRINGS "${FFTW3_INCLUDE_DIR}/fftw3.h" _fftw_ver_line REGEX "^#define[\t ]+FFTW_VERSION[\t ]+\"[^\"]+\"")
if(_fftw_ver_line)
string(REGEX REPLACE "^#define[\t ]+FFTW_VERSION[\t ]+\"([^\"]+)\"" "\\1" FFTW3_VERSION "${_fftw_ver_line}")
endif()
# Read the literal version from metadata beside the selected library.
get_filename_component(_fftw3_library_dir "${FFTW3_LIBRARY}" DIRECTORY)
set(_fftw3_pc "${_fftw3_library_dir}/pkgconfig/fftw3.pc")
if(EXISTS "${_fftw3_pc}")
file(STRINGS "${_fftw3_pc}" _fftw3_version_line REGEX "^Version:[ \t]*[0-9]")
if(_fftw3_version_line)
string(REGEX REPLACE "^Version:[ \t]*" "" FFTW3_VERSION "${_fftw3_version_line}")
string(STRIP "${FFTW3_VERSION}" FFTW3_VERSION)
endif()
endif()

if(NOT TARGET FFTW3::FFTW3)
add_library(FFTW3::FFTW3 UNKNOWN IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To help us reproduce and confirm a bug, please provide a test case and building
## Agent governance and automated review

Before coding or requesting review, read the repository governance entry point
[`AGENTS.md`](../AGENTS.md) and the full
[`AGENTS.md`](https://github.com/deepmodeling/abacus-develop/blob/develop/AGENTS.md) and the full
[ABACUS Agent Governance](./developers_guide/agent_governance.md) guide.
These rules apply to human contributors, AI agents, GitHub CI, and CodeRabbit.

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -W -n --keep-going
SPHINXBUILD ?= sphinx-build
SOURCEDIR = $(PWD)
BUILDDIR = build
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/acceleration/cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In `INPUT` file we need to set the input parameter [device](../input_files/input
- **multi-cards**: ABACUS allows for multi-GPU acceleration. If you have multiple GPU cards, you can run ABACUS with several MPI processes, and each process will utilize one GPU card. For example, the command `mpirun -n 2 abacus` will by default launch two GPUs for computation. If you only have one card, this command will only start one GPU. *note: the number of MPI processes SHOULD be equal to the number of GPU cards, unless you are using MPS in your computer.*

## Examples
We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/gpu) of gpu calculations.
We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/34_gpu) of gpu calculations.

## Known limitations
PW basis:
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/elec_properties/Berry_phase.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Berry Phase Calculation

From version 2.0.0, ABACUS is capable of calculating macroscopic polarization of insulators by using the Berry phase method, known as the ["modern theory of polarization"](https://www.sciencedirect.com/science/article/abs/pii/S0022459612003234). To calculate the polarization, you need first to do a self-consistent calculation to get the converged charge density. Then, do a non-self-consistent calculation with berry_phase setting to 1. You need also to specify the direction of the polarization you want to calculate. An example is given in the directory [examples/berryphase/lcao_PbTiO3](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/berryphase/lcao_PbTiO3).
From version 2.0.0, ABACUS is capable of calculating macroscopic polarization of insulators by using the Berry phase method, known as the ["modern theory of polarization"](https://www.sciencedirect.com/science/article/abs/pii/S0022459612003234). To calculate the polarization, you need first to do a self-consistent calculation to get the converged charge density. Then, do a non-self-consistent calculation with berry_phase setting to 1. You need also to specify the direction of the polarization you want to calculate. An example is given in the directory [examples/berryphase/lcao_PbTiO3](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/26_berryphase/02_lcao_PbTiO3).

To run this example, first do a self-consistent calculation:
```
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/elec_properties/Mulliken.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Mulliken Charge Analysis

From version 2.1.0, ABACUS has the function of Mulliken population analysis. The example can be found in [examples/mulliken](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/mulliken). \
To use this function, set [out_mul](./input-main.md#out_mul) to `1` in the INPUT file. After calculation, there will be an output file named `mulliken.txt` in the output directory. In MD calculations, the output interval is controlled by the keyword [out_freq_ion](./input-main.md#out_freq_ion). In the file, there are contents like (`nspin 1`):
From version 2.1.0, ABACUS has the function of Mulliken population analysis. The example can be found in [examples/mulliken](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/14_mulliken). \
To use this function, set [out_mul](../input_files/input-main.md#out_mul) to `1` in the INPUT file. After calculation, there will be an output file named `mulliken.txt` in the output directory. In MD calculations, the output interval is controlled by the keyword [out_freq_ion](../input_files/input-main.md#out_freq_ion). In the file, there are contents like (`nspin 1`):

```
STEP: 0
Expand Down
Loading
Loading