HomePhysics & MechanicsMolecular Dynamics

Lennard-Jones Molecular Dynamics (2D)

Watch N particles interact through the real Lennard-Jones potential, numerically integrated with velocity Verlet: attraction pulls them together at medium range, then a steep repulsive wall pushes them apart the instant they get too close.

Physics & Mechanics2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
physics-ext-topic-57 ↗ Open standalone

This simulation numerically integrates the equations of motion for a 2D gas of particles interacting through the real Lennard-Jones pair potential V(r)=4ε[(σ/r)^12-(σ/r)^6], the same functional form used in real molecular dynamics codes to model van der Waals interactions. Every particle pair repels steeply the instant it gets closer than about one sigma, and attracts weakly across a wider medium-range band — the balance that gives real gases their equation of state and drives condensation into liquid-like clusters when the temperature is low enough. Velocity Verlet integration keeps the total energy (kinetic + potential) nearly constant, which the live energy chart makes visible: a good integrator holds that white line flat even as the pair colors flicker between attraction and repulsion. Adjust particle count, well depth, particle size and initial temperature to explore gas, liquid and clustering regimes.

⚙ Under the hood

Simulate particle interactions using Lennard-Jones potential with velocity Verlet integration.

PhysicsMolecular DynamicsSimulation

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)