Metropolis Sampling (1953)


back up forward

Generates configurations with weight exp(-U/kT) using the following procedure:-

assume that the system
is in a current configuration
(of the particle positions)
labelled C(n)
configuration C(n)
  1. Generate a trial configuration, C(t), (from C(n) by selecting an atom i at random and moving it according to:

    x(i) -> x(i) + (s/2)*r(1)
    y(i) -> y(i) + (s/2)*r(2)
    z(i) -> z(i) + (s/2)*r(3)

    where r(1), r(2), r(3) are uniform random numbers between -1 and 1, and s is the step size, i.e.:

    select atom i trial configuration C(t)
  2. Calculate the change in energy for the trial configuration C(t):

    delta_U = U(t) - U(n)

  3. If delta_U <= 0, accept the move, so that the trial configuration C(t) becomes the (n+1)th configuration C(n+1)i.e.

    C(n+1) = C(t)

    new configuration C(n+1)

  4. If delta_U >= 0, generate a random number r(4) between o and 1

  5. If r(4) <= exp(-delta_U/kT), accept the move. i.e.:

    C(n+1) = C(t)

    new configuration C(n+1)

  6. If r(4) > exp(-delta_U/kT), reject the move. i.e.:

    C(n+1) = C(n)

    return atom i to original 
position New Configuration C(n+1)

    In this case the new configuration is the same as the old one! -- This must be done to calculate the average correctly.

Animated summarys of successful and unsuccessful motion attempts are available for those using netscape v.2.0+ or higher using animated gifs.

successful

unsuccessful

A sequence of configurations can be generated by using steps 1 to 6 repeatedly. Properties from the system can be obtained by simply averaging the properties of a large number of these configurations.

back up forward

© Peter H. Nelson 1995-1997. All rights reserved.
Last updated December 10, 1997