Skip to content
Draft
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0fb4fce
build: migrate from setuptools to scikit-build-core
Jun 4, 2026
8a37c73
build: restore comments and fix numpy version consistency
Jun 7, 2026
b7c0938
build: add CMakeLists.txt with FetchContent and platform detection
Jun 7, 2026
4b3ac64
style: fix comments
Jun 7, 2026
467ae73
build: fix misleading comment about setuptools in pyproject.toml
San1357 Jun 8, 2026
334ecc4
build: address Copilot review comments
Jun 8, 2026
f5841ad
Merge pull request #1 from San1357/pr-1/scikit-build-migration
San1357 Jun 9, 2026
816a7ff
feat: add libcint C extension bindings for various integrals
Jun 10, 2026
66a9036
added documentation
Jun 10, 2026
0f94b86
Merge branch 'dev' into pr-2/c-extension-bindings
San1357 Jun 13, 2026
78b8456
Merge pull request #2 from San1357/pr-2/c-extension-bindings
San1357 Jun 13, 2026
14c0912
feat: switch to NumPy C-API (PyArray_GETPTR) + fix dylib runtime loading
Jun 13, 2026
1d71026
fix: platform-aware libcint loading + moment integral naming for libc…
Jun 13, 2026
50e63fa
fix: rename libcint dylib at install time
Jun 15, 2026
2ef1438
remove SKBUILD_SOABI block
Jun 16, 2026
6a6d32d
fix: platform-aware loading + moment integral libcint v6 fix
Jun 17, 2026
0d9e60d
Merge pull request #3 from San1357/pr-3/numpy-c-api-bindings
San1357 Jun 17, 2026
74a71a9
Merge branch 'dev' into pr-4/libcint-py-fix
San1357 Jun 17, 2026
6e5feb5
Merge pull request #4 from San1357/pr-4/libcint-py-fix
San1357 Jun 17, 2026
ee40693
feat: add C shell loop for overlap only
Jun 17, 2026
cf9b7f5
feat: macro-based C shell loop bindings for all 1-electron integrals
Jun 21, 2026
c00d380
moved the import at top
Jun 23, 2026
fd88efc
fix: rename shellloop methods and improve docstrings per review
Jun 23, 2026
09e96d2
build: update CMakeLists.txt per mentor review
Jun 24, 2026
d927c06
Merge pull request #253 from San1357/pr-5/shell-loop-c-new
msricher Jun 25, 2026
d2a25e5
feat: add C shell loop for 2-electron ERI
Jun 24, 2026
5ba1d00
refactor: rename macros to DEFINE_INT1E_ARRAY_FN and DEFINE_INT1E_SHE…
Jun 26, 2026
8bd6884
fix: fill ERI in physicist notation in C
Jun 26, 2026
f134d26
feat: add C shell-loop binding for point_charge integral
Jun 26, 2026
bdd1bba
feat: add C shell-loop bindings for moment integrals
Jun 26, 2026
4721ca4
feat: update momentum() to return full 3-component complex array
Jun 26, 2026
faeb982
docs: update momentum() docstring with notes
Jun 27, 2026
7a21c04
test: add C shell-loop tests for 1e integrals & 2e integrals bindings…
Jul 2, 2026
185b4ff
refactor: dynamic buf allocation + rename shellloop to array
Jul 5, 2026
94e557a
feat: add optimizer support
Jul 5, 2026
dfeba6e
feat: add optimizer support using CINTall_1e_optimizer and cint2e_sph…
Jul 5, 2026
2613bea
perf: recorrect optimizer support via token pasting — 49x speedup
Jul 6, 2026
2e8ca5f
fix: restore optimizer line after benchmark testing
Jul 6, 2026
f8adede
feat: add C-loop bindings for ipkin, ipnuc, iprinv gradient integrals
Jul 7, 2026
96a2af7
test: add C shell-loop tests for gradient integrals (ipkin, ipnuc, ip…
Jul 8, 2026
d9fe300
feat: add GIAO/magnetic integral bindings (ia01p, ircxp, igkin, igovl…
Jul 8, 2026
982db18
test: add GIAO/magnetic integral tests (ia01p, ircxp, igkin, igovlp, …
Jul 8, 2026
acad549
commented: to remove unused import
Jul 8, 2026
ac750c1
style: apply clang-format, black, pycodestyle, pydocstyle formatting
Jul 8, 2026
df2d6c9
add transform support to overlap() C-loop function
Jul 11, 2026
b138d29
add transform support to kinetic_energy() C-loop function
Jul 11, 2026
96137a2
add transform support to nuclear_attraction() C-loop function
Jul 11, 2026
c285d21
add inv_origin and transform support to rinv() C-loop function
Jul 11, 2026
017901c
add notation and transform support to electron_repulsion() C-loop fun…
Jul 11, 2026
aed3f48
add transform support to dipole, quadrupole, octupole C-loop functions
Jul 12, 2026
436f5a9
add transform and inv_origin support to gradient_kinetic, gradient_nu…
Jul 12, 2026
40364f7
add transform, origin, inv_origin support to all 17 C-loop wrapper fu…
Jul 13, 2026
ec15ac6
feat: add type parameter to macros for sph/cart bindings, 3c2e integr…
Jul 23, 2026
f91ef46
perf: zero only used buffer portion in eri_array instead of full buf
Jul 25, 2026
040b368
feat: add int3c2e_cart binding, cartesian 3c2e tests, coord_type awar…
Jul 28, 2026
cb5464a
test: add cartesian shell-loop tests and 3c2e cart reference tests
Jul 28, 2026
3714423
ci: update pytest workflow for scikit-build-core, add macos, remove m…
Jul 28, 2026
c6f0356
ci: add CMake install step for scikit-build-core on GitHub Actions
Jul 28, 2026
2993eb9
ci: verbose pip install, remove coverage threshold
Jul 28, 2026
d890285
ci: fix RPATH for Linux, install libcint.so alongside extension
Jul 28, 2026
8fd94f6
revert: remove unnecessary libcint.so install step (static linking)
Jul 28, 2026
3e4cd28
ci: use no-build-isolation with explicit cmake install
Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: ${{ matrix.py == '3.9'}}
# Ensure these versions are consistent with the minimal version requirements
# in pyproject.toml
run: pip install numpy==1.22 scipy==1.11.1
run: pip install numpy==2.0 scipy==1.13.0
- name: Install development version
run: |
# Need editable mode in order to include the test files
Expand Down
67 changes: 67 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

# Require (a relatively recent) version of CMake.
cmake_minimum_required(VERSION 3.18)

# Declare project.
project(gbasis LANGUAGES C)

# Import necessary Python modules.
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module NumPy)

# Use qcint on x86 systems with (at least) SSE3, and libcint on non-x86/non-SSE3 systems.
# qcint is an optimized version of libcint for x86 systems with SIMD support;
# both are pinned to v6.1.2 for stability.
include(CheckCCompilerFlag)
set(GBASIS_CINT_REPO "https://github.com/sunqm/libcint.git")
set(GBASIS_CINT_VERSION "v6.1.2")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)|(i386)|(i686)")
check_c_compiler_flag("-msse3" GBASIS_HAS_SSE3)
if(GBASIS_HAS_SSE3)
message(STATUS "Architecture: x86 with (at least) SSE3 -> use qcint")
set(GBASIS_CINT_REPO "https://github.com/sunqm/qcint.git")
else()
message(STATUS "Architecture: x86 without SSE3 -> use libcint")
endif()
else()
message(STATUS "Architecture: not x86 -> use libcint")
endif()

# Download libcint or qcint based on platform.
include(FetchContent)
FetchContent_Declare(cint
GIT_REPOSITORY ${GBASIS_CINT_REPO}
GIT_TAG ${GBASIS_CINT_VERSION}
GIT_SHALLOW
EXCLUDE_FROM_ALL)

# Configure libcint/qcint.
set(ENABLE_STATIC ON)
set(WITH_FORTRAN OFF)
set(WITH_RANGE_COULOMB ON)

# Import libcint/qcint CMake project.
FetchContent_MakeAvailable(cint)

# Declare C extension module.
set(GBASIS_EXTENSION_SOURCE "gbasis/integrals/src/libcint_wrap.c")
python_add_library(gbasis_ext MODULE WITH_SOABI ${GBASIS_EXTENSION_SOURCE})

# Set C extension module properties.
set_target_properties(gbasis_ext PROPERTIES
# Set target library output name.
OUTPUT_NAME libcint_bindings
# Set RPATH so libcint.dylib is found at runtime.
INSTALL_RPATH "@loader_path"
BUILD_WITH_INSTALL_RPATH TRUE)

# Expose Python and NumPy include directories to C extension module.
target_include_directories(gbasis_ext PRIVATE
${cint_SOURCE_DIR}/include
${Python_INCLUDE_DIRS} ${Python_NumPy_INCLUDE_DIRS})

# Link C extension module with libcint/qcint.
target_link_libraries(gbasis_ext PRIVATE cint)

# Install C extension module.
set(GBASIS_WHEEL_DIRECTORY "${SKBUILD_PLATLIB_DIR}/gbasis/integrals/lib")
install(TARGETS gbasis_ext LIBRARY DESTINATION ${GBASIS_WHEEL_DIRECTORY})
Loading
Loading