Computational Physics: Advanced Monte Carlo Methods

First semester 2016-17

This course provide an Introduction to Monte Carlo techniques in Equilibrium and Non-equilibrium Systems.
The program is: Monte Carlo computation of Integrals, Importance sampling, Markov Chains and Detailed Balance, The Metropolis Algorithm, Critical slowing down, Cluster algorithms, Monte Carlo in continuous time, Kawasaki algorithm: local and non-local, Coupled chemical reactions: the Gillespie algorithm.


Lecture notes (pdf)
One of the first papers on Monte Carlo methods N. Metropolis and S. Ulam, The Monte Carlo method, JSTOR 44, 335 (1949).
M.E.J. Newman and G.T. Barkema, "Monte Carlo Methods in Statistical Physics" (Oxford University Press). (This is an excellent and very detailed book about Monte Carlo simulations in classical Statistical Physics, where the emphasis is on lattice models).
D. Frenkel and B. Smit, "Understanding molecular simulations", Academic Press (2002). (A very detailed and good book, containing also some material on Molecular Dynamics simulations).
B.A. Berg, Markov-Chain Monte Carlo Methods for Simulations of Biomolecules.
An online course on Monte Carlo simulation is provided by P. Coddington, Monte Carlo simulations in Statistical Physics
D. T. Gillespie, Exact Stochastic Simulation of Coupled Chemical Reactions, J. Phys. Chem. 81, 2340 (1977)

Additional Material

Applet fot the Buffon needle
Demonstration of Buffon's needle
Estimating pi with the hit-and-miss method
Calculation of pi using rain
Applet for Ising model simulations (I) - This applet gives the possibility of choosing between different algorithms (Single spin flip, Wolff, Kawasaki....)
Applet for Ising model simulations (II) - This applet is very fast, but only restricted to single spin flip. It shows also magnetization and energy plots produced while the simulation runs

Simple Codes in Octave/Matlab

Octave is a language intended for numerical computations, which is essentially compatible with Matlab, but it is free. You can download it from this website. Here below some examples of simple codes in Octave. They should also work in Matlab, although I haven't tested them.

Uniform Random Numbers with a gap
Estimating the area of a circle of radius 1 using the hit-and-miss method
A simple example of Markov process via matrix products and direct Monte Carlo simulation
How to select efficiently from q states according to a given probability distribution (q large)
(to run these codes in Octave copy them on a file, say file.m, and they type source("file.m") from the octave input line).

Exam guidelines

The exam consists in the discussion of the assignments, with some questions about the theory. All relevant output of your exercises should be collected in a single pdf file containing the plots produced by your simulations. Each figure should contain a caption describing (i) what you plot (eg. x-y axes with their units, MC steps or, better, use sweeps), (ii) the parameters used (e.g.T=0.8, q=10 Potts model) and (iii) the type of algorithm used (eg. "Local Kawasaki", "Heat Bath"...). Send this file with your codes by e-mail a few days before the exam. The codes should also contain some comments so that the different parts can be understood.

For the exam all assignments up to 4.8 (included) should be solved. In addition choose one of the additional assignments from the list below.

Additional assignment

  • Wolff algorithm for the Ising model

    The Wolff algorithm is a cluster algorithm for the Ising model which does not suffer from the critical slowing down as the single spin flip Metropolis algorithm. In this assignment the student uses the Wolff algorithm to compute the autocorrelation time τ for the two dimensional Ising model at the critical point T=Tc. Show that tau diverges as a power law as a function of the lattice size L: τ ~ L^z and determine the value of the dynamical exponent z. Use finite size scaling ansatz to analyze the behavior of the magnetic susceptibility in the vicinity of the critical point and determine the exponents γ and ν. To solve this assignment check the book by Newman and Barkema where details are discussed.

  • The Kawasaki dynamics and continuous time algorithm

    The Kawasaki dynamics consists in swapping the positions of two opposite spins of an Ising model using Metropolis acceptance rule. In this way the total magnetization of the system remains conserved. There are different ways to implement the Kawasaki algorithm. One can use for instance a local or a non-local algorithm. In this assignment the student implements both algorithms as discussed in Problems 4.10 and 4.11 of the lecture notes. Facultative: The student may also try to implement a continuous time algorithm, as discussed in the book by Newman and Barkema.

  • The heat bath algorithm for the Potts model

    The Metropolis algorithm is very popular and simple to implement. However there are situations in which it does not work very well and there are more suitable Monte Carlo algorithms. This is the case of the Potts model, which is a generalization of the Ising model to more states per site. In this assignment the student compares the performances of the Metropolis and Heat Bath algorithms for the q-state Potts model (Problem 4.9 of the lecture notes).

  • Hard spheres fluid

    In the assignment about hard spheres the student learns to use the Monte Carlo algorithm for a continuum system (Problem 4.12 of the lecture notes). The scope of the problem is the calculation of the pair correlation function g(r). Faculatitve: from this quantity one can compute the pressure of the system using the virial theorem and compare the results with those of the virial expansion. Another possibility is to try some cluster algorithms which are quite easy to implement.

  • Coupled chemical reactions and the Gillespie algorithm

    The Gillespie algorithm is a Monte Carlo algorithm to simulate systems of coupled chemical reactions. The system is assumed to be well-mixed so that no spatial effects are taken into account. In this assignment the students solve the last three problems of the lecture notes (Birth-annihilation process, Lotka-Volterra Model, Brusselator).

  • Kosterlits-Thouless transition in the XY model

    The two dimensional xy model is a model of interacting spins, which differently from the Ising case, can point to any direction on the xy plane. The peculiarity of this system is that there can be no spontaneous symmetry breaking, as it has been rigorously proved. Therefore there is no low temperature ferromagnetic phase. Nonetheless there is a phase transition. The nature of this phase transition was elucidated by Kosterlitz and Thouless who got the Nobel prize for Physics in 2016 for this (and other) work. It is a topological phase transition involving the unbinding of vortices and anti-vortices.