Molecular Dynamics of Lennard-Jones Particles Using the Velocity Verlet Algorithm

Molecular dynamics is a computer simulation technique that follows the time evolution of a set of interacting atoms or molecules by integrating their equations of motion. This Demonstration uses molecular dynamics and the velocity Verlet algorithm to simulate the motion of particles interacting under the Lennard–Jones 6-12 potential. You can vary the temperature, volume, and number of particles to change from the formation of clusters to liquid-like behavior. The color of each particle depends on its speed.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


This Demonstration is only illustrative; therefore, naive techniques have been used in the code. For example, the velocities are rescaled at every step to give the desired temperature, which is not a good "thermostat" for real research using molecular dynamics. The Lennard–Jones potential has also been modified in order to avoid the huge forces that can arise when atoms are very close together. On the other hand, this naive implementation does show interesting behavior; at low temperatures particles cluster together in hexagonal arrangements, while at higher temperatures liquid-like behavior can be recognized. Normal modes of oscillation can also be observed in clusters.
The velocity Verlet algorithm is a method for calculating the trajectories of particles in a molecular dynamics simulation. It offers stability and efficient use of computer memory and time when the number of particles is large. This algorithm calculates the position of the particle at step from its position, velocity, and acceleration at step k. Then velocities at the "half step" are calculated. Accelerations at step are obtained from the total force on each particle, and, finally, velocities at step are obtained from velocities at the half step and accelerations at step . If , , , , are the position, velocity, acceleration, mass, and total force on the particle, and τ is the step size, the velocity Verlet algorithm is:
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.