Multiple algorithms exist for calculating Coulomb (J) or exchange (K) contributions to Fock-like matrices, and it is beneficial to develop a framework that allows the seamless integration and combination of different J and K construction algorithms. In Psi4, we have implemented the “CompositeJK” formalism for this purpose. CompositeJK allows for the combination of any J and K construction algorithms for any quantum chemistry method formulated in terms of J-like or K-like matrices (including, but not limited to, Hartree–Fock and density functional theory) in a highly modular and intuitive fashion, which is simple to utilize for both developers and users. Using the CompositeJK framework, Psi4 was interfaced to the sn-LinK implementation in the GauXC library, adding the first instance of noncommercial graphics processing unit (GPU) support for the construction of Fock matrix elements to Psi4. On systems with hundreds of atoms, the interface to the CPU sn-LinK implementation displays a higher performance than all the alternative JK construction methods available in Psi4, with up to x2.8 speedups compared to existing Psi4 JK implementations. The GPU sn-LinK implementation, harnessing the power of GPUs, improves the observed performance gains to up to x7.0.

1.
I.
Panas
,
J.
Almlof
, and
M. W.
Feyereisen
,
Int. J. Quantum Chem.
40
,
797
(
1991
).
2.
B.
Jeziorski
,
R.
Moszynski
, and
K.
Szalewicz
,
Chem. Rev.
94
,
1887
(
1994
).
3.
J. B.
Foresman
,
M.
Head-Gordon
,
J. A.
Pople
, and
M. J.
Frisch
,
J. Phys. Chem.
96
,
135
(
1992
).
4.
C. M.
Isborn
,
N.
Luehr
,
I. S.
Ufimtsev
, and
T. J.
Martinez
,
J. Chem. Theory Comput.
7
,
1814
(
2011
).
5.
J. A.
Pople
,
R.
Krishnan
,
H. B.
Schlegel
, and
J. S.
Binkley
,
Int. J. Quantum Chem.
16
,
225
(
1979
).
6.
C.
Ochsenfeld
and
M.
Head-Gordon
,
Chem. Phys. Lett.
270
,
399
(
1997
).
7.
W. A.
de Jong
,
E.
Bylaska
,
N.
Govind
,
C. L.
Janssen
,
K.
Kowalski
,
T.
Müller
,
I. M. B.
Nielsen
,
H. J. J.
van Dam
,
V.
Veryazov
, and
R.
Lindh
,
Phys. Chem. Chem. Phys.
12
,
6896
(
2010
).
8.
C. L.
Janssen
and
I. M. B.
Nielsen
,
Parallel Computing in Quantum Chemistry
(
CRC Press
,
2008
).
9.
R. J.
Harrison
and
R.
Shepard
,
Annu. Rev. Phys. Chem.
45
,
623
(
1994
).
10.
J. L.
Whitten
,
J. Chem. Phys.
58
,
4496
(
1973
).
11.
M.
Haser
and
R.
Ahlrichs
,
J. Comput. Chem.
10
,
104
(
1989
).
12.
E.
Schwegler
,
M.
Challacombe
, and
M.
Head-Gordon
,
J. Chem. Phys.
106
,
9708
(
1997
).
13.
R. A.
Friesner
,
Chem. Phys. Lett.
116
,
39
(
1985
).
14.
R. A.
Friesner
,
J. Chem. Phys.
85
,
1462
(
1986
).
15.
R. A.
Friesner
,
J. Chem. Phys.
86
,
3522
(
1987
).
16.
F.
Neese
,
F.
Wennmohs
,
A.
Hansen
, and
U.
Becker
,
Chem. Phys.
356
,
98
(
2009
).
17.
R.
Izsak
and
F.
Neese
,
J. Chem. Phys.
135
,
144105
(
2011
).
18.
B.
Helmrich-Paris
,
B.
de Souza
,
F.
Neese
, and
R.
Izsák
,
J. Chem. Phys.
155
,
104109
(
2021
).
19.
H.
Laqua
,
T. H.
Thompson
,
J.
Kussman
, and
C.
Ochsenfeld
,
J. Chem. Theory Comput.
16
,
1456
(
2020
).
20.
B. I.
Dunlap
,
J. W. D.
Connolly
, and
J. R.
Sabin
,
Int. J. Quantum Chem. Symp.
12
,
81
(
1977
).
21.
B. I.
Dunlap
,
J. W. D.
Connolly
, and
J. R.
Sabin
,
J. Chem. Phys.
71
,
3396
(
1979
).
22.
B. I.
Dunlap
,
J. W. D.
Connolly
, and
J. R.
Sabin
,
J. Chem. Phys.
71
,
4993
(
1979
).
23.
R. A.
Kendall
and
H. A.
Früchtl
,
Theor. Chem. Acc.
97
,
158
(
1997
).
24.
F.
Weigend
,
Phys. Chem. Chem. Phys.
4
,
4285
(
2002
).
25.
C. A.
White
and
M.
Head-Gordon
,
J. Chem. Phys.
104
,
2620
(
1996
).
26.
Y.
Shao
and
M.
Head-Gordon
,
Chem. Phys. Lett.
323
,
425
(
2000
).
27.
C. A.
White
,
B. G.
Johnson
,
P. M. W.
Gill
, and
M.
Head-Gordon
,
Chem. Phys. Lett.
230
,
8
(
1994
).
28.
M. C.
Strain
,
G. E.
Scuseria
, and
M. J.
Frisch
,
Science
271
,
51
(
1996
).
29.
D. S.
Holman
,
H. F.
Schaefer
, and
E. F.
Valeev
,
Mol. Phys.
115
,
2065
(
2017
).
30.
K.
Kowalski
,
R.
Bair
,
N. P.
Bauman
,
J. S.
Boschen
,
E. J.
Bylaska
,
J.
Daily
,
W. A.
de Jong
,
T. J.
Dunning
,
N.
Govind
,
R. J.
Harrison
,
M.
Keçeli
,
K.
Keipert
,
S.
Krishnamoorthy
,
S.
Kumar
,
E.
Mutlu
,
B.
Palmer
,
A.
Panyala
,
B.
Peng
,
R. M.
Richard
,
T. P.
Straatsma
,
P.
Sushko
,
E. F.
Valeev
,
M.
Valiev
,
H. J. J.
van Dam
,
J. M.
Waldrop
,
D. B.
Williams-Young
,
C.
Yang
,
M.
Zalewski
, and
T. L.
Windus
,
Chem. Rev.
121
,
4962
(
2021
).
31.
Q.
Sun
,
T. C.
Berkelbach
,
N. S.
Blunt
,
G. H.
Booth
,
S.
Guo
,
Z.
Li
,
J.
Liu
,
J. D.
McClain
,
E. R.
Sayfutyarova
,
S.
Sharma
,
S.
Wouters
, and
G. K.
Chan
,
Wiley Interdiscip. Rev.: Comput. Mol. Sci.
8
,
e1340
(
2018
).
32.
C.
Peng
,
C.
Lewis
,
X.
Wang
,
M.
Clement
,
F.
Pavosevic
,
J.
Zhang
,
V.
Rishi
,
N.
Teke
,
K.
Pierce
,
J.
Calvin
,
J.
Kenny
,
E.
Seidl
,
C.
Janssen
, and
E.
Valeev
,
The Massively Parallel Quantum Chemistry Program (MPQC) Version 4.0.0-beta.1
, http://github.com/ValeevGroup/mpqc,
2024
.
33.
D. B.
Williams-Young
,
A.
Asadchev
,
D. T.
Popovici
,
D.
Clark
,
J.
Waldrop
,
T. L.
Windus
,
E. F.
Valeev
, and
W. A.
de Jong
,
J. Chem. Phys.
158
,
234104
(
2023
).
34.
D. B.
Williams-Young
,
A.
Bagusetty
,
W. A.
de Jong
,
D.
Doerfler
,
H. J.
van Dam
,
Á.
Vázquez-Mayagoitia
,
T. L.
Windus
, and
C.
Yang
,
Parallel Comput.
108
,
102829
(
2021
).
35.
D. B.
Williams-Young
,
W. A.
de Jong
,
H. J.
van Dam
, and
C.
Yang
,
Front. Chem.
8
,
581058
(
2020
).
36.
A.
Petrone
,
D. B.
Williams-Young
,
S.
Sun
,
T. F.
Stetina
, and
X.
Li
,
Eur. Phys. J. B
91
,
169
(
2018
).
37.
C.
Ochsenfeld
,
C. A.
White
, and
M.
Head-Gordon
,
J. Chem. Phys.
109
,
1663
(
1998
).
38.
J.
Almlöf
,
K.
Fægri
, Jr.
, and
K.
Korsell
,
J. Comput. Chem.
3
,
385
(
1982
).
39.
R. M.
Richard
,
K.
Keipert
,
J.
Waldrop
,
M.
Keçeli
,
D.
Williams-Young
,
R.
Bair
,
J.
Boschen
,
Z.
Crandall
,
K.
Gasperich
,
Q. I.
Mahmud
,
A.
Panyala
,
E.
Valeev
,
H.
van Dam
,
W. A.
de Jong
, and
T. L.
Windus
,
J. Chem. Phys.
158
,
184801
(
2023
).
40.
BrianQC
, https://www.brianqc.com/, accessed 27 April 2024.
41.
D. B.
Williams-Young
,
GauXC
, https://github.com/wavefunction91/GauXC,
2024
.
42.
D.
Poole
,
psi4/psi4 PR 3150
, https://github.com/psi4/psi4/pull/3150,
2024
.
43.
K.
Kenny
,
C. L.
Jansse
,
E. F.
Valeev
, and
T. L.
Windus
,
J. Comput. Chem.
29
,
562
(
2007
).
44.
N. S.
Watson
,
D.
Brown
,
C.
Campbell
,
M.
Chan
,
L.
Chaudry
,
M. A.
Convery
,
R.
Fenwick
,
J. N.
Hamblin
,
C.
Haslam
,
H. A.
Kelly
,
N. P.
King
,
C. L.
Kurtis
,
A. R.
Leach
,
G. R.
Manchee
,
A. M.
Mason
,
C.
Mitchell
,
C.
Patel
,
V. K.
Patel
,
S.
Senger
,
G. P.
Shah
,
R. J.
Young
et al,
Bioorg. Med. Chem. Lett.
16
,
3784
(
2006
).
45.
T. H.
Dunning
,
J. Chem. Phys.
90
,
1007
(
1989
).
46.
M. E.
Mura
and
P. J.
Knowles
,
J. Chem. Phys.
104
,
9848
(
1996
).
47.
V. K.
Prasad
,
A.
Otero-de-la Roza
, and
G. A.
DiLabio
,
Sci. Data
6
,
180310
(
2019
).
48.
E.
Hohenstein
,
R. M.
Parrish
,
C. D.
Sherrill
,
J. M.
Turney
, and
H. F.
Schaefer
III
,
J. Chem. Phys.
135
,
174107
(
2011
).
49.
The HDF Group
,
Hierarchical Data Format, version 5
, https://github.com/HDFGroup/hdf5.
50.
D.
Poole
,
A.
Jiang
,
Z. L.
Glick
, and
C. D.
Sherrill
, “
Comparison of Coulomb and exchange matrix construction algorithms for chemical systems of increasing size
,” (unpublished).
51.
S. F.
Manzer
,
E.
Epifanovsky
, and
M.
Head-Gordon
,
J. Chem. Theory Comput.
11
,
518
(
2015
).
You do not currently have access to this content.