arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.11709cond-mat.mtrl-sci
收藏

基于Rust的粉末X射线衍射模拟用于高通量和机器学习驱动的材料科学

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

Faculty of Mechanical Engineering, Czech Technical University in Prague(布拉格捷克理工大学机械工程学院);Faculty of Nuclear Sciences and Physical Engineering, Czech Technical University in Prague(布拉格捷克理工大学核科学与物理工程学院);FZU – Institute of Physics of the Czech Academy of Sciences(捷克科学院物理研究所)

Miroslav Lebeda, Jan Drahokoupil, Petr Veřtát, Petr Vlčák

AI总结:

XRD-Rust通过Rust加速提升粉末X射线衍射模拟效率,实现高通量数据生成和机器学习应用性能优化

摘要:

高通量粉末X射线衍射(XRD)模拟是生成用于基于XRD的材料分析的机器学习模型所需大数据集的关键前提。然而,广泛使用的pymatgen粉末XRD计算器完全用Python实现,在大规模工作负载下计算效率较低,限制了吞吐量。我们提出了XRD-Rust,这是pymatgen粉末XRD计算器的Rust加速实现,保持与现有基于Python的工作流程的完全兼容性。该方法保留pymatgen用于晶体结构处理和对称性分析,同时用Rust重新实现XRD计算中计算密集的部分。在来自Materials Cloud Three-Dimensional Structure Database(MC3D,33142个结构)和Crystallography Open Database(COD 515181)的大型晶体学数据集上进行了性能基准测试。对于MC3D数据集,XRD-Rust实现了平均加速4.7±1.6和最大加速25,将计算时间从34.9秒减少到1.4秒。对于COD数据集,平均加速为6.1±4.6,最大加速为719(1437分钟到2分钟)。这些基准测试表明,XRD-Rust显著加速了粉末XRD模拟,使高效的大数据集生成成为可能,并提高了交互式衍射分析应用的性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑