Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9e91fb7
Set-up preprocessor macro for defining RKB ERIs
kshitij-05 Feb 5, 2026
7941816
Can generate code for `(LL|SS)` type integral, i.e., `(μ ν | (σ.p)κ (…
kshitij-05 Feb 7, 2026
05e9ff5
bugfix: added the missing `make_descr<Coulombσpσp_Descr>`
kshitij-05 Feb 9, 2026
f3274a9
`Engine` can initialize for coulomb_opop operator
kshitij-05 Feb 10, 2026
2bf62f6
use and invoke correct `buildfnptr`s if engine is initialized with`Op…
kshitij-05 Feb 11, 2026
b6c376b
Apply @loriab 's review suggestions
kshitij-05 Feb 11, 2026
0aa7b83
Added unittest for `Operator::coulomb_opop` and fixed logic errors in…
kshitij-05 Feb 14, 2026
62142d9
bugfix: revert incorrect braket swapping criteria for `Operator::coul…
kshitij-05 Feb 14, 2026
b2b79ab
generate code for missing contracted kernels for `deriv(>0)-eri` + cl…
kshitij-05 Feb 18, 2026
d4247b0
reverted allowing contracted shells for Coulombσpσp and use additiona…
kshitij-05 Feb 20, 2026
054b8eb
can generate code for all small component RKB ERIs i.e.,`(SS|SS)`
kshitij-05 Feb 21, 2026
60e2117
Can evaluate `(SS|SS)` integrals. Only for `STANDARD` shell quartet f…
kshitij-05 Mar 1, 2026
509cb00
Merge master. Resolves conflicts in `build_libint.cc` and `CMakelists…
kshitij-05 Mar 1, 2026
e29428a
cleanup: Remove debugging statements from `RKB Coulomb integrals` tes…
kshitij-05 Mar 9, 2026
921da58
Optimize RKB integral code generation: braket symmetry + disable CSE …
kshitij-05 Mar 21, 2026
98d7d37
DerivGaussV2: HRR-like code-sharing for derivative Gaussians
kshitij-05 Apr 2, 2026
9b50b0b
Fix DerivGaussV2 target indexing for size-1 integral sets
kshitij-05 Apr 10, 2026
1db978d
RKB CR code sharing: deduplicate generated Coulombσpσp/σpσpCoulombσpσ…
kshitij-05 Apr 10, 2026
5104e81
Add op_coulomb_op: 9-component Gaunt LS bilinear integral
kshitij-05 Apr 17, 2026
590ce42
op_coulomb_op: redesign 9 components as SO(3) irreps
kshitij-05 Apr 26, 2026
b463ca8
Add σpRσp (oprop): 1-body σ·p · r · σ·p integral
kshitij-05 Apr 26, 2026
e5d95cd
Merge remote-tracking branch 'origin/master' into kshitij/feature/2e_…
kshitij-05 Apr 30, 2026
8648637
Rename opCoulombop to σpCoulombσp for naming consistency with sibling…
kshitij-05 Apr 30, 2026
e546469
3-center integrals in RKB basis
kshitij-05 May 12, 2026
88613eb
Rename σpRσp/oprop one-body operator to σpeμσp
kshitij-05 Jun 6, 2026
f1d80c4
Add 3-center single-σ·p DF-Gaunt operator coulomb_op (Coulombσp)
kshitij-05 Jun 6, 2026
6256cb8
Fix bitwise & to && in compute_directly short-circuit
kshitij-05 Jun 8, 2026
d4939d3
Address review: document RKB classes, clarify DF-basis AM, fix op_cou…
kshitij-05 Jun 8, 2026
70b8d99
Merge remote-tracking branch 'origin/master' into kshitij/feature/2e_…
kshitij-05 Jun 8, 2026
9dba226
Fix second op_coulomb_op docstring (operator_traits) to SO(3) layout
kshitij-05 Jun 8, 2026
123dfe1
Apply review fixes: coulomb_op default braket + child-count guards
kshitij-05 Jun 8, 2026
05f289c
Production hardening: graceful deriv-braket error, tightened reserves…
kshitij-05 Jun 8, 2026
773a687
Dedup σ·p fold codegen into shared rkb_fold_codegen.h helpers
kshitij-05 Jun 8, 2026
280cbfe
Define g_progress in test.cc so check-libint2compiler links
kshitij-05 Jun 9, 2026
a02af2a
Fix xs_xx buildfnidx stride for non-center-dependent 3-center operators
kshitij-05 Jun 9, 2026
4b3d82e
CI: build and test RKB_ERI3; guard 3-center RKB unit sections
kshitij-05 Jun 9, 2026
598b674
Allow C++ API when only 3-center RKB ERI is enabled
kshitij-05 Jun 9, 2026
e7f8681
Fix Fortran ERI test: use primitive-differentiator underscore in (ss|…
kshitij-05 Jun 9, 2026
042a915
Rename engine Operator::σpeμσp to Operator::opemuop for naming consis…
kshitij-05 Jun 9, 2026
6cc2b22
Dedup 1-body σ·p fold into shared sigma_p_1body_fold helper
kshitij-05 Jun 9, 2026
44de4dd
Add LIBINT2_RKB_ERI3_PURE_SH option, mirroring ERI3_PURE_SH
kshitij-05 Jun 9, 2026
e018d3b
Add TODO markers for deferred RKB codegen generalizations
kshitij-05 Jun 9, 2026
c385ce4
comments cleanup: rewritten rkb comments to make them context-free
kshitij-05 Jun 9, 2026
6db2b57
Tighten 1-body σ·p fold max_nchildren to actual bound (3)
kshitij-05 Jun 9, 2026
8223aad
Remove dead (SS|SS) der_idx constants from RKB Coulomb test
kshitij-05 Jun 9, 2026
9cd5192
Make σpeμσp unit test concrete with reference-value comparison
kshitij-05 Jun 9, 2026
452b806
address adversarial review of RKB integrals
evaleev Oct 23, 2026
420dd51
Merge origin/master into kshitij/feature/2e_rkb_ints
evaleev Oct 23, 2026
6685355
Merge remote-tracking branch 'origin/master' into kshitij/feature/2e_…
evaleev Oct 23, 2026
bf18fdc
Add finite-difference test of ERI geometric derivatives for s/p/d she…
evaleev Oct 23, 2026
e6f85b4
Remove LIBINT2_RKB_ERI3_PURE_SH: a solid harmonics fitting center is …
evaleev Oct 23, 2026
a287bd7
Test RKB operators on solid harmonics shells and the xx_xs alias of c…
evaleev Oct 23, 2026
54afe4d
RKB CR: select fold sign pattern by component index, not child count
kshitij-05 Oct 23, 2026
5ff3574
config.h: fix comment on LIBINT_RKB_ERI_OPT_AM (it is the RKB_ERI opt…
kshitij-05 Oct 23, 2026
9c02f59
σpCoulombσp CR: ASCII generated label and child-count guard
kshitij-05 Oct 23, 2026
f3d21c1
Express the permutational symmetry of 2-body operators as traits; doc…
evaleev Oct 23, 2026
884e8d7
Build/test/doc cleanups for the RKB integrals
evaleev Oct 23, 2026
edf8161
Engine: pure-SH fitting-shell checks apply to energy kernels only; re…
kshitij-05 Oct 23, 2026
00042b6
int_am.cmake: read LIBINT_<class>_MAX_AM in the scalar branch; RKB cl…
kshitij-05 Oct 23, 2026
2a5178c
build_libint: export LIBINT2_SUPPORT_RKB_ERI3 and LIBINT2_DERIV_RKB_E…
kshitij-05 Oct 23, 2026
af3d628
DerivGaussV2: include the differentiation direction in the generated-…
kshitij-05 Oct 23, 2026
7d8b6ad
Engine: do not copy the stack-allocated targets_ vector when remappin…
kshitij-05 Oct 24, 2026
307d3dd
solidharmonics: bind the parity helper by qualified name; fix test_er…
kshitij-05 Oct 24, 2026
aceb113
Address review of the RKB integrals: honor OPT_AM for RKB tasks, docu…
evaleev Oct 24, 2026
cfbf6e7
Merge origin/master into kshitij/feature/2e_rkb_ints
evaleev Oct 25, 2026
b0802c7
Merge origin/master into kshitij/feature/2e_rkb_ints
evaleev Oct 25, 2026
d20e092
Define the code-generator progress reporter once, as an inline variab…
evaleev Oct 25, 2026
5a3755c
Engine: leave no kernels after initialize() rejects the operator/brak…
evaleev Oct 25, 2026
40e9389
Tests: fix the two CI failures of 5a3755cd
kshitij-05 Oct 25, 2026
9fba2b0
Engine: check the per-center AM limits in all builds; rebuild the cor…
kshitij-05 Oct 25, 2026
046a313
RKB composite relations: one term table per component drives both the…
kshitij-05 Oct 25, 2026
c06dfb5
Merge origin/master into kshitij/feature/2e_rkb_ints
kshitij-05 Oct 25, 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
18 changes: 15 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ jobs:
build_shared_libs: ON
os: macos-15
do_fortran: ON
# exercise a center-dependent AM table for the 3-center RKB ERIs and
# 2nd geometric derivatives of the 4-center ERIs in one lane only
- build_type: Release
os: macos-15
subproject: OFF
rkb_eri3_max_am: 3
eri_deriv_order: 2
max_am: '2;2;1'
eri_max_am: '2;2;1'

name: "Repo • ${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }} shared=${{ matrix.build_shared_libs }} fetch=${{ matrix.subproject }}"
runs-on: ${{ matrix.os }}
Expand All @@ -61,11 +70,14 @@ jobs:
-D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
-D LIBINT2_BUILD_LIBRARY_AS_SUBPROJECT=${{ matrix.subproject }}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build/library
-D LIBINT2_MAX_AM=2;2
-D LIBINT2_ERI_MAX_AM=2;2
-D LIBINT2_MAX_AM=${{ matrix.max_am || '2;2' }}
-D LIBINT2_ERI_MAX_AM=${{ matrix.eri_max_am || '2;2' }}
-D LIBINT2_ERI3_MAX_AM=3;2
-D LIBINT2_ENABLE_ERI=1
-D LIBINT2_ENABLE_ERI=${{ matrix.eri_deriv_order || 1 }}
-D LIBINT2_ENABLE_ERI3=1
-D LIBINT2_ENABLE_RKB_ERI=0
-D LIBINT2_ENABLE_RKB_ERI3=0
-D LIBINT2_RKB_ERI3_MAX_AM=${{ matrix.rkb_eri3_max_am || 2 }}
-D LIBINT2_ENABLE_ONEBODY=1
-D LIBINT2_DISABLE_ONEBODY_PROPERTY_DERIVS=${{ matrix.disable_onebody_property_derivs || 'ON' }}
-D LIBINT2_MULTIPOLE_MAX_ORDER=2
Expand Down
31 changes: 31 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@
Following is a brief summary of changes made in each release of Libint.

- unreleased:
- PR #399: relativistic restricted kinetic balance (RKB) integrals: 2-body Operator::coulomb_opop,
Operator::coulomb_op, Operator::opop_coulomb_opop, Operator::op_coulomb_op (enabled by
LIBINT2_ENABLE_RKB_ERI and LIBINT2_ENABLE_RKB_ERI3, off by default; no geometric derivatives yet)
and 1-body Operator::opemuop. N.B. Operator::opemuop is inserted after the other 1-body
operators, hence the numeric values of all 2-body Operator enumerators increase by 1.
Engine::compute() now throws Engine::missing_kernel if the library was not configured to
compute the requested operator/braket/derivative order (previously the result was undefined),
and std::invalid_argument if given a cartesian fitting shell with l > 1 when the library was
configured with LIBINT2_ERI3_PURE_SH (previously a Debug-only assert). The Libint compiler
now requires C++17; the generated library still requires C++11 only.
Other changes that affect all libraries, not just the RKB integrals:
- BraKet::xx_xs is now usable for 3-center energies (as the alias of BraKet::xs_xx with the
fitting function last); previously Engine::compute() aborted for it.
- the geometric-derivative kernels of all 2-body Coulomb integrals (ERI, ERI3, ERI2) are now
generated by DerivGaussV2 (comp_deriv_gauss_v2.h), which shares one function between all
shell sets with the same differentiated shell, instead of by CR_DerivGauss; the generated
code is validated against finite differences for every shell set in the unit tests. With
LIBINT2_ENABLE_GENERIC_CODE the generic kernel is used when the differentiated shell is
beyond LIBINT2_OPT_AM (previously: when the average AM of the shell set is).
- Engine::initialize() no longer asserts (in Debug builds only) that the library includes the
braket type; missing kernels are reported by Engine::missing_kernel from compute().
- the validation of LIBINT2_<class>_MAX_AM in cmake/modules/int_am.cmake now actually runs
(it referred to undefined variables); a value of 0 is accepted, negative values are rejected.
- Engine::compute() throws Engine::lmax_exceeded in all builds if a shell exceeds the angular
momentum limit of its center (e.g. an AO shell beyond LIBINT2_MAX_AM given to a 3-center Engine
whose max_l is within LIBINT2_ERI3_MAX_AM); previously a Debug-only assert, and Release builds
dispatched the kernel of another shell set.
- Engine::set(BraKet) and Engine::set_max_l() rebuild the core integral evaluator, whose order
depends on the rank of the braket and on the maximum angular momentum.
- the Fortran ERI test and example and the hartree-fock++ test honor a lower angular momentum
limit of the derivative kernels (e.g. LIBINT2_MAX_AM="2;2;1").
- PR #447: TennoGmEval (Yukawa/Slater core integrals) fixed for U < 1e-7 at small T (#444) and no
longer returns NaN for large U and T; the slow, thread-unsafe Gaussian-fit fallback
is replaced by series expansions
Expand Down
33 changes: 31 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ option_with_default(LIBINT2_ENABLE_ERI3
"Compile with support for up to N-th derivatives of 3-center electron repulsion integrals (-1 for OFF)" -1)
option_with_default(LIBINT2_ENABLE_ERI2
"Compile with support for up to N-th derivatives of 2-center electron repulsion integrals (-1 for OFF)" -1)
option_with_default(LIBINT2_ENABLE_RKB_ERI
"Compile with support for up to N-th derivatives of relativistic restricted kinetic
balance (RKB) 4-center electron repulsion integrals (-1 for OFF). Only N=0 is currently supported." -1)
option_with_default(LIBINT2_ENABLE_RKB_ERI3
"Compile with support for up to N-th derivatives of relativistic restricted kinetic
balance (RKB) 3-center electron repulsion integrals (-1 for OFF).
σ·p acts on the two paired (AO) centers; the unpaired/fitting center is a spectator.
Only N=0 is currently supported." -1)
foreach(_cls RKB_ERI;RKB_ERI3)
if (LIBINT2_ENABLE_${_cls} GREATER 0)
message(FATAL_ERROR "LIBINT2_ENABLE_${_cls}=${LIBINT2_ENABLE_${_cls}}: geometric derivatives of RKB integrals are not yet implemented; use 0 (or -1 for OFF)")
endif()
endforeach()
option_with_default(LIBINT2_ENABLE_G12
"Compile with support for N-th derivatives of MP2-F12 energies with Gaussian factors (-1 for OFF)" -1)
option_with_default(LIBINT2_ENABLE_G12DKH
Expand Down Expand Up @@ -219,10 +232,25 @@ option_with_default(LIBINT2_ERI_OPT_AM
"Optimize 4-center ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)

option_with_default(LIBINT2_RKB_ERI_MAX_AM
"Support relativistic restricted kinetic balance (RKB) 4-center ERIs for Gaussians of angular momentum up to N.
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)" -1)
option_with_default(LIBINT2_RKB_ERI_OPT_AM
"Optimize relativistic restricted kinetic balance (RKB) 4-center ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)

option_with_default(LIBINT2_RKB_ERI3_MAX_AM
"Support relativistic restricted kinetic balance (RKB) 3-center ERIs for Gaussians of angular momentum up to N.
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)
This sets the max AM of the density fitting (auxiliary/DF) basis on the single fitting center. The paired AO centers (on which σ·p acts) use LIBINT2_MAX_AM." -1)
option_with_default(LIBINT2_RKB_ERI3_OPT_AM
"Optimize relativistic restricted kinetic balance (RKB) 3-center ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)

option_with_default(LIBINT2_ERI3_MAX_AM
"Support 3-center ERIs for Gaussians of angular momentum up to N.
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)
This option controls only the single fitting center. The paired centers use LIBINT2_MAX_AM." -1)
This sets the max AM of the density fitting (auxiliary/DF) basis on the single fitting center. The paired AO centers use LIBINT2_MAX_AM." -1)
option_with_default(LIBINT2_ERI3_OPT_AM
"Optimize 3-center ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative level as a semicolon-separated string. (default: (max_am/2)+1)" -1)
Expand Down Expand Up @@ -307,7 +335,8 @@ include(int_am)
# see #445). Map unset/empty values to the -1 sentinel.
foreach(_v MAX_AM OPT_AM
ONEBODY_MAX_AM ONEBODY_OPT_AM ERI_MAX_AM ERI_OPT_AM ERI3_MAX_AM ERI3_OPT_AM
ERI2_MAX_AM ERI2_OPT_AM G12_MAX_AM G12_OPT_AM G12DKH_MAX_AM G12DKH_OPT_AM)
ERI2_MAX_AM ERI2_OPT_AM RKB_ERI_MAX_AM RKB_ERI_OPT_AM RKB_ERI3_MAX_AM RKB_ERI3_OPT_AM
G12_MAX_AM G12_OPT_AM G12DKH_MAX_AM G12DKH_OPT_AM)
if ("${LIBINT_${_v}}" STREQUAL "")
set(LIBINT_${_v} -1)
endif()
Expand Down
10 changes: 9 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Use combined targets like `cmake --target check install` to avoid some unnecessa
* `🔸` required or recommended, but there's a path forward without
* `-` not involved

[^1]: C++ compiler that supports C++11 standard. C++11 standard is the fourth most recent international standard for C++, hence most modern compilers support it fully. A common compiler flag is `-std=c++11`, which CMake will impose on the compilation.
[^1]: C++ compiler that supports C++11 standard (the Libint compiler itself requires C++17). C++11 standard is the fourth most recent international standard for C++, hence most modern compilers support it fully. A common compiler flag is `-std=c++11`, which CMake will impose on the compilation.

[^2]: Fortran 2003 compiler to enable Fortran bindings generation.

Expand Down Expand Up @@ -169,6 +169,8 @@ Use combined targets like `cmake --target check install` to avoid some unnecessa
* `LIBINT2_ENABLE_ERI` - G - Compile with support for up to N-th derivatives of 4-center electron repulsion integrals. Use -1 for OFF. [Default=0]
* `LIBINT2_ENABLE_ERI3` - G - Compile with support for up to N-th derivatives of 3-center electron repulsion integrals. Use -1 for OFF. [Default=-1]
* `LIBINT2_ENABLE_ERI2` - G - Compile with support for up to N-th derivatives of 2-center electron repulsion integrals. Use -1 for OFF. [Default=-1]
* `LIBINT2_ENABLE_RKB_ERI` - G - Compile with support for up to N-th derivatives of relativistic restricted kinetic balance (RKB) 4-center electron repulsion integrals. Use -1 for OFF. Derivatives are not yet implemented, i.e. only N=0 is supported. [Default=-1]
* `LIBINT2_ENABLE_RKB_ERI3` - G - Compile with support for up to N-th derivatives of relativistic restricted kinetic balance (RKB) 3-center electron repulsion integrals. Use -1 for OFF. σ·p acts on the two paired (AO) centers; the unpaired/fitting (density-fitting/auxiliary) center is a spectator. Derivatives are not yet implemented, i.e. only N=0 is supported. [Default=-1]
* `LIBINT2_ENABLE_G12` - G - Compile with support for N-th derivatives of MP2-F12 energies with Gaussian factors. Use -1 for OFF. [Default=-1]
* `LIBINT2_ENABLE_G12DKH` - G - Compile with support for N-th derivatives of DKH-MP2-F12 energies with Gaussian factors. Use -1 for OFF. [Default=-1]

Expand Down Expand Up @@ -255,6 +257,12 @@ Note that options, docs, and CMake components are focused on the C++ interface,
* `LIBINT2_ERI2_OPT_AM` - G - Optimize 2-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `LIBINT2_OPT_AM`]
* `LIBINT2_ERI2_PURE_SH` - G - Assume the 2-center ERIs will be transformed to pure solid harmonics. [Default=OFF]

* `LIBINT2_RKB_ERI_MAX_AM` - G - Support RKB 4-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `LIBINT2_MAX_AM`]
* `LIBINT2_RKB_ERI_OPT_AM` - G - Optimize RKB 4-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `LIBINT2_OPT_AM`]

* `LIBINT2_RKB_ERI3_MAX_AM` - G - Support RKB 3-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. This option sets the AM of the density-fitting (auxiliary) basis on the single fitting center; the paired (AO) centers, on which σ·p acts, use LIBINT2_MAX_AM. [Default=-1 -> `LIBINT2_MAX_AM`]
* `LIBINT2_RKB_ERI3_OPT_AM` - G - Optimize RKB 3-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `LIBINT2_OPT_AM`]

* `LIBINT2_G12_MAX_AM` - G - Support integrals for G12 methods of angular momentum up to N. No specification with per-derivative list. [Default=-1 -> `LIBINT2_MAX_AM`]
* `LIBINT2_G12_OPT_AM` - G - Optimize G12 integrals for up to angular momentum N (N <= max-am). No specification with per-derivative list. [Default=-1 `LIBINT2_OPT_AM`]

Expand Down
Loading
Loading