GBasis is a free and open-source Python library for molecular property computations based on Gaussian basis functions in quantum chemistry. Specifically, GBasis allows one to evaluate functions expanded in Gaussian basis functions (including molecular orbitals, electron density, and reduced density matrices) and to compute functionals of Gaussian basis functions (overlap integrals, one-electron integrals, and two-electron integrals). Unique features of GBasis include supporting evaluation and analytical integration of arbitrary-order derivatives of the density (matrices), computation of a broad range of (screened) Coulomb interactions, and evaluation of overlap integrals of arbitrary numbers of Gaussians in arbitrarily high dimensions. For circumstances where the flexibility of GBasis is less important than high performance, a seamless Python interface to the Libcint C package is provided. GBasis is designed to be easy to use, maintain, and extend following many standards of sustainable software development, including code-quality assurance through continuous integration protocols, extensive testing, comprehensive documentation, up-to-date package management, and continuous delivery. This article marks the official release of the GBasis library, outlining its features, examples, and development.

1.
S. F.
Boys
, “
Electronic wave functions-I. A general method of calculation for the stationary states of any molecular system
,”
Proc. R. Soc. London, Ser. A
200
,
542
554
(
1950
).
2.
T.
Helgaker
and
P. R.
Taylor
, “
Gaussian basis sets and molecular integrals
,” in
Modern Electronic Structure Theory
,
Advanced Series in Physical Chemistry
(
World Scientific Publishing Company
,
1995
), pp.
725
856
.
3.
S.
Reine
,
T.
Helgaker
, and
R.
Lindh
, “
Multi-electron integrals
,”
WIREs Comput. Mol. Sci.
2
,
290
303
(
2012
).
4.
B.
Nagy
and
F.
Jensen
, “
Basis sets in quantum chemistry
,” in
Reviews in Computational Chemistry
(
John Wiley & Sons, Ltd.
,
2017
), Chap. 3, pp.
93
149
.
5.
S.
Obara
and
A.
Saika
, “
Efficient recursive computation of molecular integrals over Cartesian Gaussian functions
,”
J. Chem. Phys.
84
,
3963
3974
(
1986
).
6.
S.
Obara
and
A.
Saika
, “
General recurrence formulas for molecular integrals over Cartesian Gaussian functions
,”
J. Chem. Phys.
89
,
1540
1559
(
1988
).
7.
L. E.
McMurchie
and
E. R.
Davidson
, “
One- and two-electron integrals over Cartesian Gaussian functions
,”
J. Comput. Phys.
26
,
218
231
(
1978
).
8.
M.
Head-Gordon
and
J. A.
Pople
, “
A method for two-electron Gaussian integral and integral derivative evaluation using recurrence relations
,”
J. Chem. Phys.
89
,
5777
5786
(
1988
).
9.
M.
Dupuis
,
J.
Rys
, and
H. F.
King
, “
Evaluation of molecular integrals over Gaussian basis functions
,”
J. Chem. Phys.
65
,
111
116
(
1976
).
10.
M.
Dupuis
and
A.
Marquez
, “
The Rys quadrature revisited: A novel formulation for the efficient computation of electron repulsion integrals over Gaussian functions
,”
J. Chem. Phys.
114
,
2067
2078
(
2001
).
11.
J.
Rys
,
M.
Dupuis
, and
H. F.
King
, “
Computation of electron repulsion integrals using the Rys quadrature method
,”
J. Comput. Chem.
4
,
154
157
(
1983
).
12.
B. I.
Dunlap
, “
Direct quantum chemical integral evaluation
,”
Int. J. Quantum Chem.
81
,
373
383
(
2001
).
13.
K.
Ishida
, “
Rigorous algorithm for the electron repulsion integral over the generally contracted solid harmonic Gaussian-type orbitals
,”
J. Chem. Phys.
113
,
7818
7829
(
2000
).
14.
K.
Ishida
, “
Rigorous formula for the fast calculation of the electron repulsion integral over the solid harmonic Gaussian-type orbitals
,”
J. Chem. Phys.
109
,
881
890
(
1998
).
15.
K.
Ishida
, “
Rigorous and rapid calculation of the electron repulsion integral over the uncontracted solid harmonic Gaussian-type orbitals
,”
J. Chem. Phys.
111
,
4913
4922
(
1999
).
16.
T.
Yanai
,
K.
Ishida
,
H.
Nakano
, and
K.
Hirao
, “
New algorithm for electron repulsion integrals oriented to the general contraction scheme
,”
Int. J. Quantum Chem.
76
,
396
406
(
2000
).
17.
T. J.
Giese
and
D. M.
York
, “
Spherical tensor gradient operator method for integral rotation: A simple, efficient, and extendable alternative to Slater–Koster tables
,”
J. Chem. Phys.
129
,
016102
(
2008
).
18.
P. M. W.
Gill
, “
Molecular integrals over Gaussian basis functions
,” in
Advances in Quantum Chemistry
, edited by
J. R.
Sabin
and
M. C.
Zerner
(
Academic Press
,
1994
), Vol.
25
, pp.
141
205
.
19.
P. M. W.
Gill
and
J. A.
Pople
, “
The prism algorithm for two-electron integrals
,”
Int. J. Quantum Chem.
40
,
753
772
(
1991
).
20.
T. P.
Hamilton
and
H. F.
Schaefer
, “
New variations in two-electron integral evaluation in the context of direct SCF procedures
,”
Chem. Phys.
150
,
163
171
(
1991
).
21.
T. P.
Hamilton
and
H. F.
Schaefer
III
, “
The use of special coordinate axes in direct and semi-direct implementations of second-order perturbation theory, including the derivation of a horizontal recurrence relation
,”
Can. J. Chem.
70
,
416
420
(
1992
).
22.
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.-L.
Chan
, “
PySCF: The Python-based simulations of chemistry framework
,”
WIREs Comput. Mol. Sci.
8
,
e1340
(
2018
).
23.
R. M.
Parrish
,
L. A.
Burns
,
D. G. A.
Smith
,
A. C.
Simmonett
,
A. E.
DePrince
,
E. G.
Hohenstein
,
U.
Bozkaya
,
A. Y.
Sokolov
,
R.
Di Remigio
,
R. M.
Richard
,
J. F.
Gonthier
,
A. M.
James
,
H. R.
McAlexander
,
A.
Kumar
,
M.
Saitow
,
X.
Wang
,
B. P.
Pritchard
,
P.
Verma
,
H. F.
Schaefer
,
K.
Patkowski
,
R. A.
King
,
E. F.
Valeev
,
F. A.
Evangelista
,
J. M.
Turney
,
T. D.
Crawford
, and
C. D.
Sherrill
, “
Psi4 1.1: An open-source electronic structure program emphasizing automation, advanced libraries, and interoperability
,”
J. Chem. Theory Comput.
13
,
3185
3197
(
2017
).
24.
C. R.
Harris
,
K. J.
Millman
,
S. J.
van der Walt
,
R.
Gommers
,
P.
Virtanen
,
D.
Cournapeau
,
E.
Wieser
,
J.
Taylor
,
S.
Berg
,
N. J.
Smith
,
R.
Kern
,
M.
Picus
,
S.
Hoyer
,
M. H.
van Kerkwijk
,
M.
Brett
,
A.
Haldane
,
J. F.
del Río
,
M.
Wiebe
,
P.
Peterson
,
P.
Gérard-Marchant
,
K.
Sheppard
,
T.
Reddy
,
W.
Weckesser
,
H.
Abbasi
,
C.
Gohlke
, and
T. E.
Oliphant
, “
Array programming with NumPy
,”
Nature
585
,
357
362
(
2020
).
25.
P.
Virtanen
,
R.
Gommers
,
T. E.
Oliphant
,
M.
Haberland
,
T.
Reddy
,
D.
Cournapeau
,
E.
Burovski
,
P.
Peterson
,
W.
Weckesser
,
J.
Bright
,
S. J.
van der Walt
,
M.
Brett
,
J.
Wilson
,
K. J.
Millman
,
N.
Mayorov
,
A. R. J.
Nelson
,
E.
Jones
,
R.
Kern
,
E.
Larson
,
C. J.
Carey
,
İ.
Polat
,
Y.
Feng
,
E. W.
Moore
,
J.
VanderPlas
,
D.
Laxalde
,
J.
Perktold
,
R.
Cimrman
,
I.
Henriksen
,
E. A.
Quintero
,
C. R.
Harris
,
A. M.
Archibald
,
A. H.
Ribeiro
,
F.
Pedregosa
,
P.
van Mulbregt
,
SciPy 1.0 Contributors
et al, “
SciPy 1.0: Fundamental algorithms for scientific computing in Python
,”
Nat. Methods
17
,
261
272
(
2020
).
26.
B. D.
Lee
, “
Ten simple rules for documenting scientific software
,”
PLoS Comput. Biol.
14
,
e1006561
(
2018
).
27.
M.
Chan
,
T.
Verstraelen
,
A.
Tehrani
,
M.
Richer
,
X. D.
Yang
,
T. D.
Kim
,
E.
Vöhringer-Martinez
,
F.
Heidar-Zadeh
, and
P. W.
Ayers
, “
The tale of HORTON: Lessons learned in a decade of scientific software development
,”
J. Chem. Phys.
160
,
162501
(
2024
).
28.
F.
Heidar-Zadeh
,
M.
Richer
,
S.
Fias
,
R. A.
Miranda-Quintana
,
M.
Chan
,
M.
Franco-Perez
,
C. E.
Gonzalez-Espinoza
,
T. D.
Kim
,
C.
Lanssens
,
A. H. G.
Patel
,
X. D.
Yang
,
E.
Vohringer-Martinez
,
C.
Cardenas
,
T.
Verstraelen
, and
P. W.
Ayers
, “
An explicit approach to conceptual density functional theory descriptors of arbitrary order
,”
Chem. Phys. Lett.
660
,
307
312
(
2016
).
29.
L.
Pujal
,
A.
Tehrani
, and
F.
Heidar-Zadeh
, “
ChemTools: Gain chemical insight form quantum chemistry calculations
,” in
Conceptual Density Functional Theory: Towards a New Chemical Reactivity Theory
, 1st ed., edited by
S.
Liu
(
Wiley
,
2022
).
30.
CGbasis: A HORTON3 package for calculating Gaussian basis integrals in CPP, https://github.com/theochem/cgbasis.
31.
Q.
Sun
, “
Libcint: An efficient general integral library for Gaussian basis functions
,”
J. Comput. Chem.
36
,
1664
1671
(
2015
).
32.
T.
Verstraelen
,
W.
Adams
,
L.
Pujal
,
A.
Tehrani
,
B. D.
Kelly
,
L.
Macaya
,
F.
Meng
,
M.
Richer
,
R.
Hernández-Esparza
,
X. D.
Yang
,
M.
Chan
,
T. D.
Kim
,
M.
Cools-Ceuppens
,
V.
Chuiko
,
E.
Vöhringer-Martinez
,
P. W.
Ayers
, and
F.
Heidar-Zadeh
, “
IOData: A Python library for reading, writing, and converting computational chemistry file formats and generating input files
,”
J. Comput. Chem.
42
,
458
464
(
2021
).
33.
A.
Tehrani
,
X. D.
Yang
,
M.
Martínez-González
,
L.
Pujal
,
R.
Hernández-Esparza
,
M.
Chan
,
E.
Vöhringer-Martinez
,
T.
Verstraelen
,
P. W.
Ayers
, and
F.
Heidar-Zadeh
, “
Grid: A Python library for molecular integration, interpolation, differentiation, and more
,”
J. Chem. Phys.
160
,
172503
(
2024
).
34.
A.
Tehrani
,
M.
Richer
, and
F.
Heidar-Zadeh
, “
cuGBasis: High-performance CUDA/Python library for efficient computation of quantum chemistry density-based descriptors for larger systems
,”
J. Chem. Phys.
161
,
015101
(
2024
).
35.
T. D.
Kim
,
M.
Richer
,
G.
Sánchez-Díaz
,
R. A.
Miranda-Quintana
,
T.
Verstraelen
,
F.
Heidar-Zadeh
, and
P. W.
Ayers
, “
Fanpy: A Python library for prototyping multideterminant methods in ab initio quantum chemistry
,”
J. Comput. Chem.
44
,
697
709
(
2022
).
36.
T. D.
Kim
,
R. A.
Miranda-Quintana
,
M.
Richer
, and
P. W.
Ayers
, “
Flexible ansatz for N-body configuration interaction
,”
Comput. Theor. Chem.
1202
,
113187
(
2021
).
37.
A.
Tehrani
,
J. S. M.
Anderson
,
D.
Chakraborty
,
J. I.
Rodriguez-Hernandez
,
D. C.
Thompson
,
T.
Verstraelen
,
P. W.
Ayers
, and
F.
Heidar-Zadeh
, “
An information-theoretic approach to basis-set fitting of electron densities and other non-negative functions
,”
J. Comput. Chem.
44
,
1998
2015
(
2023
).
38.
F.
Meng
,
M.
Richer
,
A.
Tehrani
,
J.
La
,
T. D.
Kim
,
P. W.
Ayers
, and
F.
Heidar-Zadeh
, “
Procrustes: A Python library to find transformations that maximize the similarity between matrices
,”
Comput. Phys. Commun.
276
,
108334
(
2022
).
39.
E. R.
Davidson
, “
MELD: A many electron description
,” in
MOTECC-94: Methods and Techniques in Computational Chemistry
, edited by
E.
Clementi
(
STEF
,
Calgliari, Italy
,
1993
), Vol.
B
, pp.
209
274
.
40.
F.
Weigend
, “
Accurate Coulomb-fitting basis sets for H to Rn
,”
Phys. Chem. Chem. Phys.
8
,
1057
1065
(
2006
).
41.
F.
Weigend
and
R.
Ahlrichs
, “
Balanced basis sets of split valence, triple zeta valence and quadruple zeta valence quality for H to Rn: Design and assessment of accuracy
,”
Phys. Chem. Chem. Phys.
7
,
3297
3305
(
2005
).
42.
J.
Dunning
and
H.
Thom
, “
Gaussian basis sets for use in correlated molecular calculations. I. The atoms boron through neon and hydrogen
,”
J. Chem. Phys.
90
,
1007
1023
(
1989
).
43.
R. A.
Kendall
,
J.
Dunning
,
H.
Thom
, and
R. J.
Harrison
, “
Electron affinities of the first-row atoms revisited. Systematic basis sets and wave functions
,”
J. Chem. Phys.
96
,
6796
6806
(
1992
).
44.
D. E.
Woon
,
J.
Dunning
, and
H.
Thom
, “
Gaussian basis sets for use in correlated molecular calculations. III. The atoms aluminum through argon
,”
J. Chem. Phys.
98
,
1358
1371
(
1993
).
45.
K. A.
Peterson
,
D. E.
Woon
,
J.
Dunning
, and
H.
Thom
, “
Benchmark calculations with correlated molecular wave functions. IV. The classical barrier height of the H + H2 → H2 + H reaction
,”
J. Chem. Phys.
100
,
7410
7415
(
1994
).
46.
A. K.
Wilson
,
T.
van Mourik
, and
T. H.
Dunning
, “
Gaussian basis sets for use in correlated molecular calculations. VI. Sextuple zeta correlation consistent basis sets for boron through neon
,”
J. Mol. Struct.: THEOCHEM
388
,
339
349
(
1996
).
47.
M.
Barker
,
N. P.
Chue Hong
,
D. S.
Katz
,
A.-L.
Lamprecht
,
C.
Martinez-Ortiz
,
F.
Psomopoulos
,
J.
Harrow
,
L. J.
Castro
,
M.
Gruenpeter
,
P. A.
Martinez
, and
T.
Honeyman
, “
Introducing the FAIR principles for research software
,”
Sci. Data
9
,
622
(
2022
).
48.
R.
Ahlrichs
, “
A simple algebraic derivation of the Obara–Saika scheme for general two-electron interaction potentials
,”
Phys. Chem. Chem. Phys.
8
,
3072
3077
(
2006
).
49.
C. E.
Gonzalez-Espinoza
,
P. W.
Ayers
,
J.
Karwowski
, and
A.
Savin
, “
Smooth models for the Coulomb potential
,”
Theor. Chem. Acc.
135
,
256
(
2016
).
50.
E. F.
Valeev
, “
Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions
,”
Version 2.7.0-beta.5
,
2020
, http://libint.valeyev.net/.
51.
J.
Zhang
, “
LIBRETA: Computerized optimization and code synthesis for electron repulsion integral evaluation
,”
J. Chem. Theory Comput.
14
,
572
587
(
2018
).
52.
R. F. W.
Bader
and
P. M.
Beddall
, “
Virial field relationship for molecular charge distributions and the spatial partitioning of molecular properties
,”
J. Chem. Phys.
56
,
3320
3329
(
1972
).
53.
R. F. W.
Bader
, “
Quantum topology of molecular charge distributions. III. The mechanics of an atom in a molecule
,”
J. Chem. Phys.
73
,
2871
2883
(
1980
).
54.
J. R.
Maza
,
S.
Jenkins
,
S. R.
Kirk
,
J. S. M.
Anderson
, and
P. W.
Ayers
, “
The Ehrenfest force topology: A physically intuitive approach for analyzing chemical interactions
,”
Phys. Chem. Chem. Phys.
15
,
17823
17836
(
2013
).
55.
J.
Hernandez-Trujillo
,
F.
Cortes-Guzman
,
D. C.
Fang
, and
R. F. W.
Bader
, “
Forces in molecules
,”
Faraday Discuss.
135
,
79
95
(
2007
).
56.
A. M.
Pendas
and
J.
Hernandez-Trujillo
, “
The Ehrenfest force field: Topology and consequences for the definition of an atom in a molecule
,”
J. Chem. Phys.
137
,
134101
(
2012
).
57.
Y.
Barrera
,
A.
Kawasaki
,
P. W.
Ayers
, and
J. S. M.
Anderson
, “
Chapter 9 - The Ehrenfest force
,” in
Advances in Quantum Chemical Topology Beyond QTAIM
, edited by
J. I.
Rodríguez
,
F.
Cortés-Guzmán
, and
J. S. M.
Anderson
(
Elsevier
,
2023
), pp.
225
244
.
58.
A.
Guevara-Garcia
,
P. W.
Ayers
,
S.
Jenkins
,
S. R.
Kirk
,
E.
Echegaray
, and
A.
Toro-Labbe
, “
Electronic stress as a guiding force for chemical bonding
,”
Electron. Eff. Org. Chem.
351
,
103
124
(
2011
).
59.
P. W.
Ayers
,
R. G.
Parr
, and
A.
Nagy
, “
Local kinetic energy and local temperature in the density-functional theory of electronic structure
,”
Int. J. Quantum Chem.
90
,
309
326
(
2002
).
60.
J. S. M.
Anderson
,
P. W.
Ayers
, and
J. I.
Rodriguez Hernandez
, “
How ambiguous is the local kinetic energy?
,”
J. Phys. Chem. A
114
,
8884
8895
(
2010
).
61.
L.
Cohen
, “
Local kinetic energy in quantum mechanics
,”
J. Chem. Phys.
70
,
788
789
(
1979
).
62.
L. J.
Bartolotti
and
R. G.
Parr
, “
The concept of pressure in density functional theory
,”
J. Chem. Phys.
72
,
1593
1596
(
1980
).
63.
P. W.
Ayers
and
S.
Jenkins
, “
An electron-preceding perspective on the deformation of materials
,”
J. Chem. Phys.
130
,
154104
(
2009
).
64.
L.
Cohen
, “
Representable local kinetic energy
,”
J. Chem. Phys.
80
,
4277
4279
(
1984
).
65.
A.
Kawasaki
and
J. S. M.
Anderson
, “
Warning! The negative divergence of the stress-tensor does not always yield the Ehrenfest force
,”
J. Chem. Phys.
159
,
234120
(
2023
).
66.
R.
Maranganti
and
P.
Sharma
, “
Revisiting quantum notions of stress
,”
Proc. R. Soc. A
466
,
2097
2116
(
2010
).
67.
J. M.
Tao
,
G.
Vignale
, and
I. V.
Tokatly
, “
Quantum stress focusing in descriptive chemistry
,”
Phys. Rev. Lett.
100
,
206405
(
2008
).
68.
P.
Szarek
,
Y.
Sueda
, and
A.
Tachibana
, “
Electronic stress tensor description of chemical bonds using nonclassical bond order concept
,”
J. Chem. Phys.
129
,
094102
(
2008
).
69.
R.
Maranganti
,
P.
Sharma
, and
L.
Wheeler
, “
Quantum notions of stress
,”
J. Aerosp. Eng.
20
,
22
37
(
2007
).
70.
A.
Martin Pendas
, “
Stress, virial, and pressure in the theory of atoms in molecules
,”
J. Chem. Phys.
117
,
965
979
(
2002
).
71.
K.
Finzel
, “
How does the ambiguity of the electronic stress tensor influence its ability to serve as bonding indicator
,”
Int. J. Quantum Chem.
114
,
568
576
(
2014
).
72.
K.
Finzel
and
M.
Kohout
, “
How does the ambiguity of the electronic stress tensor influence its ability to reveal the atomic shell structure
,”
Theor. Chem. Acc.
132
,
1392
(
2013
).
73.
B. P.
Pritchard
,
D.
Altarawy
,
B.
Didier
,
T. D.
Gibson
, and
T. L.
Windus
, “
New basis set exchange: An open, up-to-date resource for the molecular sciences community
,”
J. Chem. Inf. Model.
59
,
4814
4820
(
2019
).
You do not currently have access to this content.