Skip to content

Commit ab5a514

Browse files
committed
change branch from rdmft to rdmft_PR, prepare for PR
2 parents 5259994 + 4e542de commit ab5a514

File tree

42 files changed

+2404
-213
lines changed

Some content is hidden

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

42 files changed

+2404
-213
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ option(ENABLE_RAPIDJSON "Enable rapid-json usage." OFF)
3939
option(ENABLE_CNPY "Enable cnpy usage." OFF)
4040
option(ENABLE_PEXSI "Enable support for PEXSI." OFF)
4141
option(ENABLE_CUSOLVERMP "Enable cusolvermp." OFF)
42+
option(USE_DSP "Enable DSP usage." OFF)
4243

4344
# enable json support
4445
if(ENABLE_RAPIDJSON)
@@ -119,6 +120,12 @@ elseif(ENABLE_LCAO AND NOT ENABLE_MPI)
119120
set(ABACUS_BIN_NAME abacus_serial)
120121
endif()
121122

123+
if (USE_DSP)
124+
set(USE_ELPA OFF)
125+
set(ENABLE_LCAO OFF)
126+
set(ABACUS_BIN_NAME abacus_dsp)
127+
endif()
128+
122129
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
123130

124131
if(ENABLE_COVERAGE)
@@ -240,6 +247,11 @@ if(ENABLE_MPI)
240247
list(APPEND math_libs MPI::MPI_CXX)
241248
endif()
242249

250+
if (USE_DSP)
251+
target_link_libraries(${ABACUS_BIN_NAME} ${DIR_MTBLAS_LIBRARY})
252+
add_compile_definitions(__DSP)
253+
endif()
254+
243255
find_package(Threads REQUIRED)
244256
target_link_libraries(${ABACUS_BIN_NAME} Threads::Threads)
245257

python/pyabacus/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ wheel.expand-macos-universal-tags = true
3333
cmake.verbose = true
3434
logging.level = "INFO"
3535

36+
[tool.scikit-build.cmake.define]
37+
CMAKE_INSTALL_RPATH = "$ORIGIN"
38+
39+
[tool.setuptools]
40+
package-dir = {"pyabacus" = "src/pyabacus"}
41+
42+
[tool.setuptools.packages.find]
43+
where = ["src"]
44+
include = ["pyabacus*"]
3645

3746
[tool.pytest.ini_options]
3847
minversion = "6.0"

python/pyabacus/src/pyabacus/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

3-
__submodules__ = ["ModuleBase", "ModuleNAO", "hsolver"]
4-
3+
__submodules__ = ["ModuleBase", "ModuleNAO", "hsolver", "Cell", "IntegralCalculator", "io"]
54
__all__ = list(__submodules__)
65

76
def __getattr__(attr):
@@ -13,4 +12,12 @@ def __getattr__(attr):
1312
return ModuleNAO
1413
elif attr == "hsolver":
1514
import pyabacus.hsolver as hsolver
16-
return hsolver
15+
return hsolver
16+
elif attr == "Cell":
17+
from .cell import Cell
18+
return Cell
19+
elif attr == "io":
20+
import pyabacus.io as io
21+
return io
22+
else:
23+
raise AttributeError(f"module {__name__} has no attribute {attr}")

0 commit comments

Comments
 (0)