Next: Detailed balance
Up: Off-lattice Monte-Carlo Simulations. Lennard-Jones
Previous: Periodic Boundaries for Off-Lattice
- 1.
- Prepare the initial configuration of the system with the desired
density (box size and number of particles). Usually just a simple
cubic lattice will work.
- 2.
- Loop through the particles, trying to make a MC loop
- Pick up a particle and decide it's new position by choosing
the displacement components at random . ( is a random number from 0
to 1, is the maximum allowed displacement magnitude).
- Calculate the energy change induced by displacement and decide whether accept it or not
according to the Metropolis criterium.
- if accepted, update position, energy, etc.
- Pick the next particle, etc.
- 3.
- Calculate necessary averages, printout the results, etc. Go back to
step 2.
- Fortran code Example 5
- Here is an example of the Fortran code for the 2D Lennard-Jones fluid
Code.
© 1997
Boris Veytsman
and Michael Kotelyanskii
Tue Nov 11 18:36:02 EST 1997