LiquidLib: A comprehensive toolbox for analyzing classical and ab initio molecular dynamics simulations of liquids and liquid-like matter with applications to neutron scattering experiments
Neutron scattering is a powerful experimental technique for characterizing the structure and dynamics of materials on the atomic or molecular scale. However, the interpretation of experimental data from neutron scattering is oftentimes not trivial, partly because scattering methods probe ensemble-averaged information in the reciprocal space. Therefore, computer simulations, such as classical and ab initio molecular dynamics, are frequently used to unravel the time-dependent atomistic configurations that can reproduce the scattering patterns and thus assist in the understanding of the microscopic origin of certain properties of materials. LiquidLib is a post-processing package for analyzing the trajectory of atomistic simulations of liquids and liquid-like matter with application to neutron scattering experiments. From an atomistic simulation, LiquidLib provides the computation of various statistical quantities including the pair distribution function, the weighted and unweighted structure factors, the mean squared displacement, the non-Gaussian parameter, the four-point correlation function, the velocity auto correlation function, the self and collective van Hove correlation functions, the self and collective intermediate scattering functions, and the bond orientational order parameter. LiquidLib analyzes atomistic trajectories generated from packages such as LAMMPS, GROMACS, and VASP. It also offers an extendable platform to conveniently integrate new quantities into the library and integrate simulation trajectories of other file formats for analysis. Weighting the quantities by element-specific neutron-scattering lengths provides results directly comparable to neutron scattering measurements. Lastly, LiquidLib is independent of dimensionality, which allows analysis of trajectories in two, three, and higher dimensions. The code is beginning to find worldwide use.