KBKit: A Python Toolkit for Kirkwood–Buff Theory from Molecular Dynamics
Thermodynamic properties of liquid mixtures govern processes that range from drug delivery to energy storage, yet extracting these properties from molecular simulations remains challenging. Kirkwood–Buff (KB) theory offers a rigorous route by linking microscopic pair distribution functions to macroscopic free energies, but practical use of the theory has been hindered by two obstacles: (i) the long simulations needed to obtain well-converged Kirkwood-Buff integrals (KBIs) and (ii) the specialized corrections required to translate finite-size data to the thermodynamic limit. $\texttt{KBKit}$ is an open-source Python package that removes these barriers. It automatically computes KBIs and derived thermodynamic quantities from GROMACS input files, applies state-of-the-art finite-size corrections, and provides built-in diagnostic tools to quantify statistical uncertainty. Written with modern software-engineering practices—continuous integration, extensive unit testing, and thorough documentation—$\texttt{KBKit}$ is both reliable and easy to extend. By condensing complex KBI analysis into a few intuitive commands, $\texttt{KBKit}$ enables researchers to incorporate KB theory into routine simulation workflows and accelerate the discovery of solution-phase thermodynamics.