Skip to content

Commit 1b3f76e

Browse files
authored
Feature: Add Cell for pyabacus (#5247)
* add cell for pyabacus * add io to support general stru formats * fix test data
1 parent 2dc9803 commit 1b3f76e

File tree

13 files changed

+1075
-3
lines changed

13 files changed

+1075
-3
lines changed

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)