# viewSq, a Visual Molecular Dynamics (VMD) module for calculating, analyzing, and visualizing X-ray and neutron structure factors from atomistic simulations

## Description

viewSq is a Visual Molecular Dynamics (VMD) module for calculating structure factors (S (q)) and partial structure factors for any user-selected atomic selections (S_sel1,sel2 (q)) derived from computer simulation trajectories, as well as quantifying, analyzing, and visualizing atomic contributions to them. viewSq offers radial distribution functions (g (r)), S (q) and S_sel1,sel2 (q) with and without X-ray atomic form factors or neutron scattering lengths, partial radial distribution functions (g_sel1,sel2 (r)), as well as decompositions of S (q) and S_sel1,sel2 (q) into various positive and negative components (each of which indicate periodic atomic ordering). Additionally, viewSq plots as a function of distance r the Fourier transform summands used to transform g (r) to S (q), allowing understanding of the atom-specific distances around atomic centers that contribute to S (q), S_sel1,sel2 (q), and their various positive and negative components. viewSq will also rank atoms by their contributions to S (q), S_sel1,sel2 (q), and the positive and negative components, and uses VMD to visualize those atoms interactively. Another feature performs the same rankings for atoms within a cutoff distance of a user-selected central atom, allowing the fundamental contributions atoms make with each other to be quantified and interactively visualized. Analysis may be done for any user-selected range of wavenumber (q) for a single structure or a small ensemble of structures. viewSq’s features are illustrated by using a single frame from an MD simulation of a box of water.