CyRSoXS: a GPU‐accelerated virtual instrument for polarized resonant soft X‐ray scattering - Saurabh, Kumar; Dudenas, Peter J.; Gann, Eliot; Reynolds, Veronica G.; Mukherjee, Subhrangsu; Sunday, Daniel; Martin, Tyler B.; Beaucage, Peter A.; Chabinyc, Michael L.; DeLongchamp, Dean M.; Krishnamurthy, Adarsh; Ganapathysubramanian, Baskar (Journal of applied crystallography, 2023)
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 ed 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. This article presents CyRSoXS – an open‐source virtual instrument that uses GPUs to simulate polarized resonant soft X‐ray scattering (P‐RSoXS) patterns from real‐space material representations. It is significantly faster than the current state‐of‐the‐art software, and it enables quantitative extraction of orientation information from P‐RSoXS data. This enables a wide range of applications, including pattern fitting, co‐simulation, data exploration, machine learning workflows and multi‐modal data assimilation approaches.