SPARC-X-API: Versatile Python Interface for Real-space Density Functional Theory Calculations

Density Functional Theory (DFT) is the de facto workhorse for large-scale electronic structure calculations in chemistry and materials science.While plane-wave DFT implementations remain the most widely used, real-space DFT provides advantages in handling complex boundary conditions and scaling to very large systems by allowing for the efficient use of large-scale supercomputers and linear-scaling methods that circumvent the cubic scaling bottleneck.The SPARC-X project (https://github.com/SPARC-X)provides highly efficient and portable real-space DFT codes for a wide range of first principle applications, available in both Matlab (M-SPARC (Xu et al., 2020;Zhang et al., 2023)) and C/C++ (SPARC (Xu et al., 2021;Zhang et al., 2024)).The rapid growth of SPARC's feature set has created the need for a fully functional interface to drive SPARC in high-throughput calculations.Here we introduce SPARC-X-API, a Python package designed to bridge the SPARC-X project with broader computational frameworks.Built on the Atomic Simulation Environment (ASE (Hjorth Larsen et al., 2017)) standard, the SPARC-X-API allows users to handle SPARC file formats and run SPARC calculations through the same interface as with other ASE-compatible DFT packages.Beyond standard ASE capabilities, SPARC-X-API provides additional features including 1) support of SPARC-specific setups, including complex boundary conditions and unit conversion, 2) a JSON schema parsed from SPARC's documentation for parameter validation and compatibility checks, and 3) a comprehensive socket communication layer derived from the i-PI protocol (Ceriotti et al., 2014;Kapil et al., 2019) facilitating message passing between low-level C code and the Python interface.The goal of the SPARC-X-API is to provide an easy-to-use interface for users with diverse needs and levels of expertise, allowing for minimal effort in adapting SPARC to existing computational workflows, while also supporting developers of advanced real-space methods.

Authors

Institutions

Publication Details

Journal
The Journal of Open Source Software
Published
2025-06-09
DOI
https://doi.org/10.21105/joss.07747
Primary Topic
Phase Equilibria and Thermodynamics
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SPARC-X-API: Versatile Python Interface for Real-space Density Functional Theory Calculations

Andrew James Medford, Lucas R. Timmerman, Benjamin P. Comer, Phanish Suryanarayana et al.
The Journal of Open Source Software
Phase Equilibria and Thermodynamics
article

SPARC-X-API: Versatile Python Interface for Real-space Density Functional Theory Calculations

Andrew James Medford, Lucas R. Timmerman, Benjamin P. Comer, Phanish Suryanarayana, Tian Tian, Shashikant Kumar
article en

Abstract

Density Functional Theory (DFT) is the de facto workhorse for large-scale electronic structure calculations in chemistry and materials science.While plane-wave DFT implementations remain the most widely used, real-space DFT provides advantages in handling complex boundary conditions and scaling to very large systems by allowing for the efficient use of large-scale supercomputers and linear-scaling methods that circumvent the cubic scaling bottleneck.The SPARC-X project (https://github.com/SPARC-X)provides highly efficient and portable real-space DFT codes for a wide range of first principle applications, available in both Matlab (M-SPARC (Xu et al., 2020;Zhang et al., 2023)) and C/C++ (SPARC (Xu et al., 2021;Zhang et al., 2024)).The rapid growth of SPARC's feature set has created the need for a fully functional interface to drive SPARC in high-throughput calculations.Here we introduce SPARC-X-API, a Python package designed to bridge the SPARC-X project with broader computational frameworks.Built on the Atomic Simulation Environment (ASE (Hjorth Larsen et al., 2017)) standard, the SPARC-X-API allows users to handle SPARC file formats and run SPARC calculations through the same interface as with other ASE-compatible DFT packages.Beyond standard ASE capabilities, SPARC-X-API provides additional features including 1) support of SPARC-specific setups, including complex boundary conditions and unit conversion, 2) a JSON schema parsed from SPARC's documentation for parameter validation and compatibility checks, and 3) a comprehensive socket communication layer derived from the i-PI protocol (Ceriotti et al., 2014;Kapil et al., 2019) facilitating message passing between low-level C code and the Python interface.The goal of the SPARC-X-API is to provide an easy-to-use interface for users with diverse needs and levels of expertise, allowing for minimal effort in adapting SPARC to existing computational workflows, while also supporting developers of advanced real-space methods.

The Journal of Open Source SoftwareVol. 10(110)
Georgia Institute of Technology (US), University of Alberta (CA)
U.S. Department of Energy, Office of Science
Openalex Percentile: Top 88%
Phase Equilibria and Thermodynamics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.