TY - GEN A1 - Laskina, Sofya T1 - Computing the forward and inverse problem of X-ray scattering N2 - Continuing progress in the field of X-ray scattering methods empowers scientists with new possibilities to capture the most important piece of information about the structure of the sample - its 3D electron density. Although the first methods appeared almost a century ago, recovering the density structure of a sample is still very problematic. Most avail-able imaging techniques transform a 3D electron density of a realspace structure into the 2D Fourier Transform of the intensity of scattered waves in the reciprocal space. This process causes a loss of information. Firstly, instead of a 3D sample, a 2D image is created, and secondly, the phase information of the scattered waves is lost. The latter is known as the ”phase problem” and poses a serious obstacle on a way to recover a 3D electron density. In this work, we draw attention to the problem of forward and inverse Small Angle X-Ray Scattering. In the first, forward, part, we rethink the existing pipelines to computationally simulate such scattering experiments. Although there are efficient implementations of fast Fourier transformation, they often have some drawbacks. For instance, to calculate a 3D fast Fourier transform it is required to place its density in the RAM. For high-resolution structures of size > 1024 3 , this becomes very problematic, as the whole density structure requires more than 16 GB of memory. CUDA solution allows for a very fast and parallelizable implementation of high-resolution data on hundreds of last-generation machines. Such computations are very pricy and inaccessible for most scientists. To bypass this limitation, we propose a solution for a split-up 3D fast Fourier transform, which is implemented as a sequence of 2D and 1D operations. We compare our implementation on the simulated 3D shapes and show the result of a proof-of-concept on 4096 3 Metallorganic framework density structure. In the second, inverse problem, we train an invertible neural network, that given scattering data can predict the shape and its parameters. The architecture is built such, that the inverse problem is learned together with the forward process - the Fourier Transformation. We achieved very good results with this architecture, nonetheless, further testing is required, as the current training set only encompasses three simple shapes: sphere, hard sphere and cylinder. All code to reproduce and analyze the results is available at https: //github.com/sofyalaski/SAXS-simulations. KW - Machine Learning KW - SAXS KW - DFT PY - 2023 SP - 1 EP - 76 PB - Freie Universität Berlin CY - Berlin AN - OPUS4-56798 LA - eng AD - Bundesanstalt fuer Materialforschung und -pruefung (BAM), Berlin, Germany ER -