Complementary use of scattering methods and molecular dynamics (MD) makes it possible to elucidate structural details of complex molecular systems such as biological or electrochemical interfaces.
Although several softwares aiming at some of the tasks involved in the process have been described in the past, an easy to use, well documented and tested, fully FOSS, solution was lacking.
In this work we present a Python software package aimed at evaluating the neutron or X-ray reflectivity of systems for which the structure has been simulated via atomistic MD.
Made2Reflect was written to be a fully featured package with both a functional programming API and an Object Oriented interface.
The low level API allows to write scripts, in which every single step, from reading the data, extracting the relevant atomic concentration profiles, conversion to SLD profiles, up to the actual reflectivity computation, is performed as an individual function call. The object oriented API, on the other hand, abstracts the overall process into an intuitive high level language formulation which mimics an actual measurement on a digital twin of the sample.
Detailed analysis such as elemental or isotopic substitution, evaluation of instrumental effects and of the influence of substrate roughness over lengthscales which cannot be accessed by the MD simulation are easily performed.
The package was built with the ultimate goal to lower the barrier to a routine use of the combination of scattering experiments and MD simulations.
A special attention was given to the documentation aspects, numerous Jupyter notebooks describing in detail how to perform an analysis.
Last but not least, in order to ensure the stability of the package during further development, a comprehensive test suite has been built.