Monte Carlo simulation of a 3D Lennard-Jones liquid

Demonstration:

LJ3MCApp

Downloads

Source code: LJ3MCApp.java.

Explanation

We use the Metropolis algorithm to sample the system. In each step.

  1. We displace a random particle for a random distance.
  2. We then compute the (potential) energy change ΔE caused by the displacement.
  3. We accept the move according to a random probability:
    Acc = min {1, exp(−ΔE/kT) }.