I'm trying to study the thermodynamics of an N particles system in a fixed volume. In particular, I'm using Metropolis algorithm for simulating the dynamics of such system. My interest is to calculate the average of the potential among the particles, this can be done by evaluating the potential at each step and summing the potential of all steps, the error of such average can be simply evaluated using: $$ \sigma(V) = \sqrt{\frac{\langle V^2 \rangle-\langle V\rangle^2}{M}}$$ where $M$ is the number of steps. But this method allows me to calculate the average potential only at one temperature for simulation. But if we rewrite the average definition we can calculate the average of the potential at any temperature with only one simulation, using: $$\langle V\rangle_{T'} \simeq \frac{\sum_i V(x_i)e^{-(\beta'-\beta)V(x_i)}}{\sum_i e^{-(\beta'-\beta)V(x_i)}} $$ where $\beta' = 1/T'$ and $\beta = 1/T$ with T the temperature of the simulation. My problem is: What's the error of the average evaluated with the last equation? Furthermore, I was wondering if there is any difference if, in a single step of the Metropolis algorithm, I move only one particle and then check if the move is accepted or it's better if I randomly move every particle and then I check if the new state is accepted.
1 Answer
I am afraid that your estimate $\sigma(V)$ underestimates the true error. Implicitly, you made use of the central limit theorem. But you omitted one necessary condition for this theorem to hold: the random variables must be uncorrelated which is absolutely not the case for the measurements of $V$ at each Monte Carlo step. Apart when the system undergoes a phase transition, one expects exponential autocorrelations between the measurements $${1\over M-t}\sum_{i=1}^{M-t} V(x_i)V(x_i+t)-\langle V\rangle^2\sim e^{-t/\tau}$$ where $\tau$ is the autocorrelation time, i.e. the number of Monte Carlo steps that are necessary to obtain two statistically uncorrelated configurations of the system. Taking into account these autocorrelations, the error reads $$\sqrt{{\langle V^2\rangle-\langle V\rangle^2\over M}(1+2\tau)}$$ Another possibility is to first estimate $\tau$ and then measure $V$, not every Monte Carlo steps, but every $\tau$ steps. Then, the error is given by $\sigma(V)$. The original reference on the subject is H. Muller-Krumbhaar et K. Binder (1973), J. Stat. Phys. 8, 1. but you can find a discussion in any book on Monte Carlo simulations (for e.g. Monte Carlo Methods in Statistical Physics by M.E.J. Newman and G.T. Barkema, Clarendon Press).
The histogram reweighting technique and the error estimation is discussed in A.M. Ferrenberg, D.P. Landau et R.H. Swendsen (1995), Phys. Rev. E 51, 5092. A recent reference on the subject is Error estimation and reduction with cross correlations Martin Weigel and Wolfhard Janke Phys. Rev. E 81, 066701 (2010)
-
$\begingroup$ thanks for the references, they look what I'm searching for. Anything about moving a single particle or all particles at each step? $\endgroup$ Commented May 31, 2017 at 8:41
-
$\begingroup$ Usually, one Monte Carlo step means that $N$ attempts to move a randomly chosen particle have been performed where $N$ is the number of particles. $\endgroup$ Commented May 31, 2017 at 14:44