A Python plugin infrastructure for the Vienna ab-initio Simulation Package (VASP) that combines computational efficiency with the flexibility of high-level scripting and effectively bridges the gap between high-performance electronic structure routines and the widespread scientific Python ecosystem.
Abstract
Implementing novel features and experimental algorithms into widely adopted density functional theory (DFT) codes is frequently hindered by complex legacy architectures and the use of compiled languages such as Fortran. These production codes, while optimised for high-performance computing clusters, present significant hurdles for software development and rapid prototyping, often requiring deep expertise in the code's internal structure to modify. To address this challenge, we present a Python plugin infrastructure for the Vienna ab-initio Simulation Package (VASP) that combines computational efficiency with the flexibility of high-level scripting. Our architecture uses a C++ intermediate layer and pybind11 to expose VASP data as NumPy arrays via shared memory buffers, ensuring high performance without data duplication. We implement two categories of plugins: those that modify quantities at the end of each converged self-consistent field (SCF) cycle, such as structure and force_and_stress, and those that operate during the SCF cycle, such as local_potential and occupancies. We demonstrate the utility of our implementation through three applications, structure relaxation using the scipy library, implementing an implicit solvent model, and adding the DFT-D4 dispersion corrections. This infrastructure effectively bridges the gap between high-performance electronic structure routines and the widespread scientific Python ecosystem.
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.
Manas Sharma, Marek Sierka· Journal of Physical Chemistr...· 0 citations
The transition of Earth-system models to exascale is often hindered by rigid, monolithic Fortran codebases and maintenance-heavy compiler directives. While high-level DSLs offer a solution, they frequently fail due to cumbersome integration. We present the integration of a Python-based ICON dynamical core into the original Fortran simulation code. Leveraging the GT4Py DSL and the Data-Centric (DaCe) optimization framework, we demonstrate that high-level Python can be seamlessly integrated into legacy infrastructure without performance loss. Our results challenge the assumption that Python orchestration introduces prohibitive HPC overhead. In production-grade global simulations, our Python dynamical core achieves a 20--30\% performance improvement over the highly-optimized Fortran+OpenACC implementation, with a 10\% improvement on the total time for a coupled setup. Driven by advanced data-flow optimizations and automated kernel fusion, this approach replaces hardware-entangled directives by generating optimized device code from a single, portable Python source. This work proves that Python can provide a sustainable, efficient, and hardware-agnostic future for global climate modeling.
Mauro Bianco, Till Ehrengruber, E. Paredes et al.· 0 citations
Discovering novel materials for energy-efficient separations, electrochemical reactions, and energy storage requires characterization of thermophysical properties such as diffusivity and ionic conductivity. Over the past several decades, molecular dynamics (MD) simulations have been playing an important role for predictions of properties in a materials-discovery pipeline. In a typical property estimation workflow, trajectories of materials/fluids of interest are generated using MD simulation engines such as GROMACS or LAMMPS, which are then processed to calculate properties such as molar volume, self-diffusion coefficients, ionic conductivity, radial distribution functions, etc. Several postprocessing tools have been developed to facilitate various property calculations. However, many of these tools are geared toward analyzing trajectories produced from a specific MD engine, requiring expertise in multiple postprocessing tools if more than one MD engine is employed, which is very likely given the unique functionalities offered by various MD engines. In addition, these tools are typically limited to routinely computed properties from MD trajectories and do not readily support more advanced analyses, such as cage correlation lifetimes, elucidation of transport mechanisms, or decomposition of ionic conductivity into self- and cross-correlation contributions. To address this research gap, we introduce MDTransport, a comprehensive, open-source, Python-based postprocessing tool, optimized for the estimation of ionic conductivity, self-diffusion coefficient, Onsager transport coefficient, and transference number. It also calculates ion–ion correlation, performs spatial decomposition of cross-correlations, estimates pair and cage correlation lifetimes, performs cluster analysis, and predicts ion-transport mechanisms, thereby providing insights into the structure of the electrolyte and underlying ion dynamics. An intuitive, user-friendly, modular, plug-and-play design, with a prompt-based command-line interface, also allows customization of various input parameters, aiming to serve researchers from diverse research backgrounds and a wide range of programming expertise.
A. Verma, Amey S. Thorat, Jindal K. Shah· Journal of Chemical Informat...· 1 citation
Molecular dynamics (MD) and the development of next-generation force fields increasingly rely on automatic differentiation for efficient simulated property prediction and parameter optimization. However, standard FFs and machine learning frameworks often suffer from significant performance bottlenecks-such as kernel launch overhead and memory bandwidth limitations-when executing the many-atom, small-kernel operations characteristic of MD simulations. Here, we present TorchFF, a high-performance, differentiable library that extends PyTorch with a suite of customized CUDA operators specifically engineered for molecular modeling. By implementing performance-critical routines-including bonded interactions, multipolar electrostatics, particle mesh Ewald, and neighbor list searches-as backend-optimized primitives, TorchFF bridges the gap between the flexible Python ecosystem and the execution speed of compiled MD engines.
Yingze Wang, Aalim S Abdullah, Rohith Srinivaas Mohanakrishnan et al.· Journal of Chemical Physics· 0 citations
A new software package, Fast-Forward, which aids parametrization of models for the widely used Martini coarse-grained force field, and offers a system-agnostic suite of tools to parametrize molecules of any size, existing in any environment.
Christopher Brasnett, Maximilian Fidlin, Thilo Duve et al.· Journal of Chemical Informat...· 0 citations
The VizFold plugin is described, a modular framework that can be extended toward end-to-end composable pipelines and demonstrated feasibility through standardized hook-based tracing for ESMFold and Boltz-2, archive validation, and reproducible deployment on an HPC cluster using managed caches, modules, quotas, and Slurm workflows.
Jayanth Vennamreddy, Arish Virani, Kevin Yin et al.· Practice and Experience in A...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.