GROMACS version: 5.1.4 and 2020.1 among others
GROMACS modification: No
When calculating the density profile across the box axis for lipid bilayer simulations, I noticed that gmx density scales the output to the dimension of the last frame. This poses a problem eg. when one wants to Fourier transform the electron density from NPT simulation to compare with scattering experiments. Something like an average box dimension or max box dimension would make more sense for the axis scaling, and is also what I would expect based on the documentation. I created two 2-frame trajectories with the frames (numbers 2 and 31 from another trajectory) in opposite orderings to demonstrate:
gmx density -f frames31_2.trr -s …/prod.tpr -ei electrons.dat -dens electron -o electronDENSITYsys31_2.xvg -xvg none -sl 100
[antila@hot nocentered]$ tail -n 3 electronDENSITYsys31_2.xvg
gmx density -f frames2_31.trr -s …/prod.tpr -ei electrons.dat -dens electron -o electronDENSITYsys2_31.xvg -xvg none -sl 100
[antila@hot nocentered]$ tail -n 3 electronDENSITYsys2_31.xvg
While going down this rabbit hole I also noticed that some gromacs versions don’t handle uneven numbers of bins for gmx density and the 2020.1 crashes on random frames of the trajectory when option -center is not used. This perhaps signals some general issues with the binning for NPT simulations. I attempted to file an issue on these matters but encountered a “403 You are not authorized to access this page.” despite being logged in the system.