CyRSoXS: a GPU-accelerated virtual instrument for polarized resonant soft X-ray scattering

J Appl Crystallogr. 2023 May 23;56(Pt 3):868-883. doi: 10.1107/S1600576723002790. eCollection 2023 Jun 1.

Abstract

Polarized resonant soft X-ray scattering (P-RSoXS) has emerged as a powerful synchrotron-based tool that combines the principles of X-ray scattering and X-ray spectroscopy. P-RSoXS provides unique sensitivity to molecular orientation and chemical heterogeneity in soft materials such as polymers and biomaterials. Quantitative extraction of orientation information from P-RSoXS pattern data is challenging, however, because the scattering processes originate from sample properties that must be represented as energy-dependent three-dimensional tensors with heterogeneities at nanometre to sub-nanometre length scales. This challenge is overcome here by developing an open-source virtual instrument that uses graphical processing units (GPUs) to simulate P-RSoXS patterns from real-space material representations with nanoscale resolution. This computational framework - called CyRSoXS (https://github.com/usnistgov/cyrsoxs) - is designed to maximize GPU performance, including algorithms that minimize both communication and memory footprints. The accuracy and robustness of the approach are demonstrated by validating against an extensive set of test cases, which include both analytical solutions and numerical comparisons, demonstrating an acceleration of over three orders of magnitude relative to the current state-of-the-art P-RSoXS simulation software. Such fast simulations open up a variety of applications that were previously computationally unfeasible, including pattern fitting, co-simulation with the physical instrument for operando analytics, data exploration and decision support, data creation and integration into machine learning workflows, and utilization in multi-modal data assimilation approaches. Finally, the complexity of the computational framework is abstracted away from the end user by exposing CyRSoXS to Python using Pybind. This eliminates input/output requirements for large-scale parameter exploration and inverse design, and democratizes usage by enabling seamless integration with a Python ecosystem (https://github.com/usnistgov/nrss) that can include parametric morphology generation, simulation result reduction, comparison with experiment and data fitting approaches.

Keywords: CyRSoXS; P-RSoXS; polarized resonant soft X-ray scattering; virtual instruments.

Grants and funding

Funding for this research was provided by National Science Foundation XSEDE (grant No. TG-CTS11000); Office of Naval Research (grant No. 6119-ISU-ONR-245 to Baskar Ganapathysubramanian and Kumar Saurabh); National Science Foundation (grant No. DMR-1808622 to Michael L. Chabinyc and Veronica G. Reynolds); National Science Foundation (grant No. 1650114. to Veronica G. Reynolds).