Glauber dynamics explained
In statistical physics, Glauber dynamics[1] is a way to simulate the Ising model (a model of magnetism) on a computer.[2] .
The algorithm
In the Ising model, we have say N particles that can spin up (+1) or down (-1). Say the particles are on a 2D grid. We label each with an x and y coordinate. Glauber's algorithm becomes:[3]
- Choose a particle
at random.
- Sum its four neighboring spins.
S=\sigmax+1,y+\sigmax-1,y+\sigmax,y+1+\sigmax,y-1
.
- Compute the change in energy if the spin x, y were to flip. This is
(see the Hamiltonian for the Ising model).
- Flip the spin with probability
where T is the
temperature .
- Display the new grid. Repeat the above N times.
In Glauber algorithm, if the energy change in flipping a spin is zero,
, then the spin would flip with probability
.
Comparison to Metropolis
In the Glauber dynamic, however, every spin has an equal chance of being chosen at each time step, regardless of being chosen before. The Metropolis acceptance criterion includes the Boltzmann weight,
, but it always flips a spin in favor of lowering the energy, such that the spin-flip probability is:
p(\DeltaE)=\left\{\begin{matrix}
1, \DeltaE\leqslant0\
e-\Delta, \DeltaE>0\
\end{matrix}\right.
.Although both of the acceptance probabilities approximate a step curve and they are almost indistinguishable at very low temperatures, they differ when temperature gets high. For an Ising model on a
2d lattice, the critical temperature is
.
In practice, the main difference between the Metropolis–Hastings algorithm and with Glauber algorithm is in choosing the spins and how to flip them (step 4). However, at thermal equilibrium, these two algorithms should give identical results. In general, at equilibrium, any MCMC algorithm should produce the same distribution, as long as the algorithm satisfies ergodicity and detailed balance. In both algorithms, for any change in energy,
, meaning that transition between the states of the system is always possible despite being very unlikely at some temperatures. So, the condition for ergodicity is satisfied for both of the algorithms. Detailed balance, which is a requirement of reversibility, states that if you observe the system for a long enough time, the system goes from state
to
with the same frequency as going from
to
. In equilibrium, the probability of observing the system at state A is given by the
Boltzmann weight,
. So, the amount of time the system spends in low energy states is larger than in high energy states and there is more chance that the system is observed in states where it spends more time. Meaning that when the transition from
to
is energetically unfavorable, the system happens to be at
more frequently, counterbalancing the lower intrinsic probability of transition. Therefore, both, Glauber and Metropolis–Hastings algorithms exhibit detailed balance.
History
The algorithm is named after Roy J. Glauber.
Software
- Simulation package IsingLenzMC provides simulation of Glauber Dynamics on 1D lattices with external field. CRAN.
Related pages
References
- Roy J. Glauber "Time-Dependent Statistics of the Ising Model". Journal of Mathematical Physics. February 1963. 4. 2. 294–307. 10.1063/1.1703954. en-US. 2021-03-21. Glauber. Roy J..
- M. Suzen "Effective ergodicity in single-spin-flip dynamics". Physical Review E. 29 September 2014. 90. 3. 032141. 10.1103/PhysRevE.90.032141. en-US. 2022-08-09. Süzen. Mehmet. 25314429. 1405.4497. 118355454.
- An introduction to Monte Carlo methods . 2015 . 10.1016/j.physa.2014.06.014 . 1404.0209 . en-US. Walter . J.-C. . Barkema . G.T. . Physica A: Statistical Mechanics and Its Applications . 418 . 78–87 . 118589022 .