About the density of numbers

Hello, I have 190 ozone molecules and 1,000 water molecules in my system, but using the GMX density command (shown here) , adding up the numbers on the y-axis gives me more than 700, if you multiply that by the volume of the box, it’s much bigger than my molecule. What’s going on, please?

You shouldn’t add up the numbers but take the average, which would give you the mean number density of ozone in your box. Check if that yields the correct number of molecules (or perhaps atoms? not sure about gmx density) when multiplied by the volume of your box.

I see. Thank you very, very much!

But I still have questions,

  1. Why did I use the gmx density -dt option and end up with only one density per layer instead of the density over time?

  2. Does gmx density calculate the average density over time?

Best wishes to you~

You’re welcome!

From the description, gmx density computes densities from weighted histograms of particle positions, which by default will be an average over time (a histogram from one frame might be very coarse). The option -dt only skips frames that do not fulfill the condition from the analysis.

If you instead wish to have block-averaged densities for different time intervals, the easiest way is to use the -b X and -e Y options to run gmx density multiple times from time X to time Y, changing X and Y in a loop.