Related Experiment Video
Updated: Sep 5, 2026

Rapid in-silico Battery Electrolyte Electrochemical Reaction Generation using 3T-VASP Multi-Scale Energy Minimization
Published on: August 22, 2025
PyFock: A Just-In-Time Compiled Gaussian Basis DFT Python Code for CPU and GPU Architectures
Manas Sharma1,2, Marek Sierka2
1Department of Chemical Engineering, Indian Institute of Science, Bengaluru560012, India.
Abstract:
Despite the robust ecosystem, ease of use, and flexibility offered by Python, most of the current popular quantum chemistry codes are still developed in Fortran, C, or C++, due to their speed advantage over Python. Furthermore, the tedious compilation process acts as a barrier for many aspiring beginners. PySCF and Psi4 have alleviated many of these problems; however, they still use C/C++ for the performance-critical parts of the code. This hinders community development or improvements/tweaks to the low-level algorithms used for molecular integral evaluations, especially when it comes to implementing GPU acceleration. In this work, we report PyFock, a Gaussian basis Kohn-Sham density functional theory code with the quantum chemistry specific algorithms such as molecular integrals and exchange-correlation term evaluation implemented entirely in Python that achieves high performance through Numba just-in-time compilation. PyFock employs the density fitting approximation with Cauchy-Schwarz screening to achieve approximately quadratic scaling with respect to system size (similar to PySCF), driven by the electron repulsion integral evaluations (Coulomb term), while the exchange-correlation contribution shows subquadratic scaling. We demonstrate that the code achieves numerical accuracy consistent with PySCF and computational performance comparable to state-of-the-art C/C++ backends on multicore CPUs, with benchmarks carried out on systems of up to ∼450 atoms using the def2-SVP, def2-TZVP, and def2-QZVP basis sets. Furthermore, PyFock leverages GPU acceleration via Numba+CuPy, delivering speedups of up to 24× over four-core PySCF (CPU) and competitive performance relative to GPU4PySCF. The package is open-source with a flexible MIT license (available on GitHub) and easily installable via PyPI and supports all major operating systems, offering an accessible yet efficient platform for quantum chemistry education and prototyping.
Related Concept Videos
Poisson's And Laplace's Equation
Discrete-time Fourier transform
One of the notable...
Discrete-Time Fourier Series
For a discrete-time periodic signal x[n]...
Discrete Fourier Transform
Maxwell-Boltzmann Distribution: Problem Solving
This distribution function f(v) is defined by saying that the expected number N (v1,v2) of particles with speeds between v1 and v2 is given by
Gauss's Law in Dielectrics