Spatial confinement affects the properties of matter often markedly. For example entirely novel structures and dynamics have been found for water and hydrocarbons in nanoporous media. Such confinements effects play a pivotal role in a huge variety of natural and technological processes, ranging from frost heave and cloud nucleation to transport in biological tissues and catalysis. X-ray scattering is particularly suitable to unravel the complexity of matter in such restricted geometries and Molecular Dynamics (MD) simulations can nowadays provide atomistic information on these nanoscale systems. However, both approaches produce immense data sets and the extraction of appropriate data descriptors as well as the comparison between experiment and simulation is conceptionally very demanding and time consuming. Thus, this project aims at bridging the gap between MD simulation of such confined systems and X-ray scattering experiments, in particular small- and wide-angle diffraction studies at modern X-ray sources. Specifically, machine learning methods shall be employed to identify characteristic patterns in reciprocal space and to link this information with similarly large MD data sets in direct space. Hence, this project on the structure of confined water and hydrocarbons has a particularly interdisciplinary character linking modern experimental and theoretical condensed-matter research with state-of-the-art materials and data science.