Search arXivSearch

arXiv · 2602.11709

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 compatibility with existing Python-based workflows. The method retains pymatgen for crystal structure handling while reimplementing the computationally intensive parts of the XRD calculation in Rust, with optional further acceleration via SIMD vectorization and multi-threaded execution across reflections using the Rayon library. Performance benchmarking on two large crystallographic datasets, the Materials Cloud Three-Dimensional Structure Database (MC3D, 33 142 structures) and the Crystallography Open Database (COD, 515 181 structures), demonstrates substantial speedups. For MC3D, XRD-Rust achieves a median serial SIMD speedup of 10.8x (median absolute deviation, MAD, 1.8x), increasing to 15.1x (MAD 3.8x) with 8-thread parallel execution, with a maximum runtime reduction from 40.5 s to 0.9 s. For COD, the median serial SIMD acceleration reaches 10.7x (MAD 4.2x), while 8-thread parallel execution yields 19.5x (MAD 10.0x), with a maximum reduction from 1437 min to 1 min. SIMD vectorization alone provides additional performance gains ranging from a few percent to several tens of percent, depending on the workload and execution mode. Overall, these benchmarks demonstrate that XRD-Rust significantly accelerates powder XRD simulations compared to the original pymatgen implementation, enabling efficient high-throughput dataset generation and improving performance in interactive diffraction analysis applications.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Miroslav Lebeda, Jan Drahokoupil, Petr Veřtát, Petr Vlčák. 2026-07-09. Rust-accelerated powder X-ray diffraction simulation for high-throughput and machine-learning-driven materials science. https://doi.org/10.1107/s1600576726005273

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Incommensurate structural and magnetic modulations in potassium-rich cryptomelane, K$_x$Mn$_8$O$_{16}$ ($x\approx1.45$)

Cryptomelane is a hollandite-like material consisting of K$^+$ cations in an $α$-MnO$_2$ tunnel-like crystallographic motif. Cryptomelane with stoichiometry K$_x$Mn$_8$O$_{16}$ ($x\approx1.45$) has been synthesized and its magnetic properties investigated using variable-temperature magnetic susceptibility, heat capacity, and neutron powder diffraction. Three distinct transitions at $T_1=184$\,K, $T_2=54.5$\,K, and $T_3=24$\,K are observed. At $T_1$ there is a subtle tetragonal$\rightarrow$monoclinic transition associated with emergence of a set of non-magnetic superstructure peaks indexable to a $\vec{k}_\mathrm{struc}\approx0.74\vec{c^*}$ incommensurate modulation parallel to the $α$-MnO$_2$ tunnels. Our findings are consistent with a relation previously reported in titanate hollandites, that $x\approx2|\vec{k}_\mathrm{struc}|$. Magnetic Bragg peaks emerge below $T_2=54.5$\,K, and their positions indicate an incommensurate modulated magnetic structure. The model consistent with the data is a dual-$\vec{k}_\mathrm{mag}$ structure with a ferromagnetic $|\vec{k}_\mathrm{mag}|=0$ component and an incommensurate $\vec{k}_\mathrm{mag}\approx0.37\vec{c^*}$, with the latter most likely to be helical. The period of oscillation of the incommensurate magnetic component is in line with predictions based on a Heisenberg spin Hamiltonian [Mandal \textit{et al}. Phys. Rev. B 90, 104420 (2014)]. Below $T_3=24$\,K, there is a magnetic transition, which gives rise to a different set of magnetic Bragg peaks indicative of a highly complex magnetic structure.

cond-mat.mtrl-sci

An anisotropic functional for two-dimensional material systems

Density function theory is the workhorse of modern electronic structure theory. However, its accuracy in practical calculations is limited by the choice of the exchange-correlation potential. In this respect, two-dimensional materials pose a special challenge, as all these materials and their heterostructures have a crucial similarity. The underlying atomic structures are strongly spatially inhomogeneous, implying that current exchange-correlation functionals, that in almost all cases are isotropic, are ill-prepared for an accurate description. We present an anisotropic screened-exchange potential, that remedies this problem and reproduces the band-gap of 2D materials as well as the piecewise linearity of the total energy with fractional occupation number.

cond-mat.mtrl-sci

Thermally-driven reorientation of the Néel vector in altermagnetic MnTe

Altermagnets are novel magnetic systems that possess a spin-polarized electronic band structure without a net magnetic moment, making them promising for device applications. Hexagonal MnTe, a prototypical altermagnet, arguably exhibits the most properties consistent with theoretical predictions, including an anomalous Hall effect despite a vanishing net magnetization, and altermagnetinduced electronic band splitting. However, fundamental questions remain, including why some effects only appear significantly below the magnetic ordering temperature. Here, we resolve this discrepancy by revealing a reorientation of the Néel vector in single-crystalline MnTe. The Néel vector points 30° from the a-axis at low $T$, before aligning directly with the a-axis around $T\simeq 260$ K. We attribute this to single-ion anisotropy, which depends on temperature-dependent lattice parameters. We obtained these results using muon-spin spectroscopy, magnetization measurements, and X-ray diffraction; we show that the findings are consistent with neutron diffraction. Manipulating this effect, for example through strain, could unlock sensitive electronic detection schemes for external stimuli, paving the way for functional altermagnetic devices.

cond-mat.mtrl-sci