Related Experiment Video
Updated: Aug 7, 2026

X-ray Powder Diffraction in Conservation Science: Towards Routine Crystal Structure Determination of Corrosion Products on Heritage Art Objects
Published on: June 8, 2016
Rust-accelerated powder X-ray diffraction simulation for high-throughput and machine-learning-driven materials
Miroslav Lebeda1,2,3, Jan Drahokoupil1,3, Petr Veřtát3
1Faculty of Mechanical Engineering Czech Technical University in Prague Technická 4 16607Prague 6 Czechia.
XRD-Rust significantly accelerates powder X-ray diffraction (XRD) simulations by reimplementing computationally intensive calculations in Rust. This enables faster generation of large datasets for machine learning in materials analysis.
Area of Science:
- Computational Materials Science
- Crystallography
- Software Development
Background:
- High-throughput powder X-ray diffraction (XRD) simulations are crucial for creating datasets for machine learning in materials analysis.
- The existing Python-based pymatgen powder XRD calculator can be computationally inefficient, limiting the scale of these simulations.
- There is a need for accelerated computational methods to improve the efficiency of XRD data generation.
Purpose of the Study:
- To develop a Rust-accelerated implementation of the pymatgen powder XRD calculator, named XRD-Rust.
- To maintain compatibility with existing Python-based workflows while significantly improving computational performance.
- To enable efficient high-throughput dataset generation for machine learning applications and enhance interactive diffraction analysis.
Main Methods:
- Reimplemented computationally intensive parts of the pymatgen powder XRD calculation in the Rust programming language.
- Integrated Rust code into existing Python workflows, retaining pymatgen for crystal structure handling.
- Utilized optional acceleration techniques including single instruction, multiple data (SIMD) vectorization and multi-threaded execution (Rayon library).
Main Results:
- XRD-Rust demonstrated substantial speedups on large crystallographic datasets (MC3D and COD).
- Median speedups ranged from 10.7× (serial SIMD) to 19.5× (eight-thread parallel execution) on the Crystallography Open Database.
- Runtime reductions were significant, e.g., from 1437 minutes to 1 minute for the COD dataset with parallel execution.
Conclusions:
- XRD-Rust offers a significant performance improvement over the original pymatgen implementation for powder XRD simulations.
- The acceleration enables more efficient generation of large datasets required for machine learning models in materials science.
- XRD-Rust enhances the feasibility of high-throughput computational materials analysis and interactive diffraction applications.
Related Concept Videos
X-ray Diffraction of Biological Samples
According to Bragg's law, when X-rays strike the sample positioned on a stage, the rays are scattered by the electron clouds around the sample atoms. The X-ray diffraction or scattering is caused by constructive interference of the X-ray waves that reflect off the internal crystal...
Determination of Crystal Structures
X-ray Crystallography
Diffraction
Diffraction is the change in the direction of travel experienced by an electromagnetic wave when it encounters a physical barrier whose dimensions are comparable to those of the wavelength of the light. X-rays are electromagnetic radiation with wavelengths about as long as the distance between neighboring...

