Rust-accelerated powder X-ray diffraction simulation for high-throughput and machine-learning-driven materials science

Abstract

High-throughput powder X-ray diffraction (XRD) simulations are a key prerequisite for generating large datasets used in the development of machine-learning models for XRD-based materials analysis. However, the widely used pymatgen powder XRD calculator, implemented entirely in Python, can be computationally inefficient for large-scale workloads, limiting throughput. We present XRD-Rust, a Rust-accelerated implementation of the pymatgen powder XRD calculator that maintains full compatibility with existing Python-based workflows. The method retains pymatgen for crystal structure handling and symmetry analysis while reimplementing the computationally intensive parts of the XRD calculation in Rust. Performance benchmarks were carried out on large crystallographic datasets from the Materials Cloud Three-Dimensional Structure Database (MC3D, 33 142 structures) and the Crystallography Open Database (COD 515 181). For the MC3D dataset, XRD-Rust achieves an average speedup of 4.7 +- 1.6 and a maximum speedup of 25, reducing computation from 34.9 s to 1.4 s. For the COD dataset, the average speedup is 6.1 +- 4.6 with a maximum speedup of 719 (1437 min to 2 min). These benchmarks demonstrate that XRD-Rust significantly accelerates powder XRD simulations, enabling efficient high-throughput dataset generation and improved performance in interactive diffraction analysis applications.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…