# Calculating compressibility from a molecular dynamics simulation: what is meant by "volume fluctuation"?

I am trying to calculate isothermal compressibility from an NPT molecular dynamics simulation, but am not that experienced and don't know how to use an expression from a paper to do it.

The part that confuses me is the $$\Delta V^2$$ term in the numerator. I know that to calculate $$\langle V\rangle$$ in the denominator, I should take the average of the volume over a simulation. Does anyone know what the $$\Delta$$ term in the numerator means and how to apply it to volume data like this example, where each value represents a different time step?

34.5
35.4
33.2
30.1


I read in a forum that it is the "fluctuation" volume. The only thing I can come up with is that it means the change in volume from one timestep to another (so $$\Delta V^2$$ at timestep $$i$$ would be $$\Delta V_{i-1} - \Delta V_{i}$$) but that seems strange because I'm pretty sure there should be no path dependence. Maybe I'm wrong?

The equation I'm referencing is from  and I have reproduced it below:

$$\beta_T=\frac{1}{k_BT}\frac{\langle\Delta V^2\rangle_{NTP}}{\langle V\rangle_{NTP}}$$

1. Voichita M. Dadarlat and Carol Beth Post J. Phys. Chem. B 2001, 105, 715-724 DOI: 10.1021/jp0024118 (Also available here)
• I added some mathjax formatting of your equations and an explicit citation of the paper you are referencing. Let me know if there are any errors in the transcription.
– Tyberius
Sep 8, 2021 at 14:00
• @Tyberius, thank you so much. I'm embarrassed it looks so much better. Everything is correct. Thank you.
– NTS
Sep 8, 2021 at 14:13

The fluctuation volume $$\langle\Delta V^2\rangle$$ is the variance of the volume V, defined as the squared distance between V and the average volume $$\langle V \rangle$$, averaged over the trajectory:

$$\langle\Delta V^2\rangle = \langle(V - \langle V \rangle)^2\rangle$$

It can easily be computed with the following equivalent formula, where $$\langle V^2 \rangle$$ is the average over the trajectory of the squared volume:

$$\langle\Delta V^2\rangle = \langle V^2 \rangle - \langle V \rangle^2$$

This method to compute the compressibility assumes that equilibrium is reached and that the system volume fluctuates around the mean volume long enough so that the result is independent of the precise path at equilibrium.

• that makes a lot of sense. Thank you so much and thanks too for the extra tips.
– NTS
Sep 8, 2021 at 17:40