Glauber dynamics
In statistical physics, Glauber dynamics[1] is a way to simulate the Ising model (a model of magnetism) on a computer.[2] It is a type of Markov Chain Monte Carlo algorithm.[3]
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:[4]
- Choose a particle [math]\displaystyle{ \sigma_{x,y} }[/math] at random.
- Sum its four neighboring spins. [math]\displaystyle{ S = \sigma_{x+1,y} + \sigma_{x-1,y} + \sigma_{x,y+1} + \sigma_{x,y-1} }[/math].
- Compute the change in energy if the spin x, y were to flip. This is [math]\displaystyle{ \Delta E = 2\sigma_{x, y} S }[/math] (see the Hamiltonian for the Ising model).
- Flip the spin with probability [math]\displaystyle{ 1/(1 + e^{\Delta E/T}) }[/math] 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, [math]\displaystyle{ \Delta E = 0 }[/math], then the spin would flip with probability [math]\displaystyle{ p(0, T) = 0.5 }[/math].
Glauber V.S. Metropolis–Hastings algorithm
Metropolis–Hastings algorithm gives identical results as Glauber algorithm does, but it is faster.[5] In the Metropolis algorithm, selecting a spin is deterministic. Usually, one may select the spins one by one following some order, for example “typewriter order”. 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 also includes the Boltzmann weight, [math]\displaystyle{ e^{-\Delta E/T} }[/math], but it always flips a spin in favor of lowering the energy, such that the spin-flip probability is:
[math]\displaystyle{ p(\Delta E) = \left\{\begin{matrix} 1, \ \ \ \ \ \ \ \ \ \Delta E \leqslant 0\\ e^{-\Delta E/T}, \ \Delta E \gt 0\\ \end{matrix}\right. }[/math].
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 [math]\displaystyle{ T = 2.27 }[/math].
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, [math]\displaystyle{ p(\Delta E) \neq 0 }[/math], 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 [math]\displaystyle{ A }[/math] to [math]\displaystyle{ B }[/math] with the same frequency as going from [math]\displaystyle{ B }[/math] to [math]\displaystyle{ A }[/math]. In equilibrium, the probability of observing the system at state A is given by the Boltzmann weight, [math]\displaystyle{ e^{-E_A/T} }[/math]. 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 [math]\displaystyle{ A }[/math] to [math]\displaystyle{ B }[/math] is energetically unfavorable, the system happens to be at [math]\displaystyle{ A }[/math] 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.[3]
Software
- Simulation package IsingLenzMC provides simulation of Glauber Dynamics on 1D lattices with external field. CRAN.
Related pages
- Metropolis algorithm
- Ising model
- Monte Carlo algorithm
- Simulated annealing
References
- ↑ Glauber, Roy J. (February 1963). "Roy J. Glauber "Time‐Dependent Statistics of the Ising Model"" (in en-US). Journal of Mathematical Physics 4 (2): 294–307. doi:10.1063/1.1703954. https://aip.scitation.org/doi/abs/10.1063/1.1703954. Retrieved 2021-03-21.
- ↑ Süzen, Mehmet (29 September 2014). "M. Suzen "Effective ergodicity in single-spin-flip dynamics"" (in en-US). Physical Review E 90 (3): 032141. doi:10.1103/PhysRevE.90.032141. PMID 25314429. http://journals.aps.org/pre/abstract/10.1103/PhysRevE.90.032141. Retrieved 2022-08-09.
- ↑ 3.0 3.1 "Glauber's dynamics | bit-player" (in en-US). http://bit-player.org/2019/glaubers-dynamics.
- ↑ Walter, J.-C.; Barkema, G.T. (2015). "An introduction to Monte Carlo methods" (in en-US). Physica A: Statistical Mechanics and Its Applications 418: 78–87. doi:10.1016/j.physa.2014.06.014.
- ↑ "Three Months in Monte Carlo | bit-player" (in en-US). http://bit-player.org/2021/three-months-in-monte-carlo.
Original source: https://en.wikipedia.org/wiki/Glauber dynamics.
Read more |