⚛️ Cell-List Molecular Dynamics: Lennard-Jones Atoms in a Periodic Box
Real molecular dynamics of hundreds of Lennard-Jones atoms in a periodic box: velocity-Verlet integration, forces from a cell list that scales as O(N), energy conservation, equipartition and virial pressure checked live.
This is a real 3D molecular dynamics engine, not a reskin of the 2D version: particles live in a cubic box and interact through the same Lennard-Jones potential V(r)=4ε[(σ/r)^12-(σ/r)^6], but neighbor forces are found with a spatial cell-linked list rather than an all-pairs scan, and every particle is one instance of a single InstancedMesh so the whole cloud renders in one draw call while you orbit and zoom the camera freely. Velocity Verlet integration advances positions and velocities each substep with a clamped timestep, so the simulation stays stable even if a frame stalls. Watch clusters of particles pull into loosely bound groups at medium range, then flash apart the instant two get pushed inside the steep repulsive core — the same balance of attraction and repulsion that governs real van der Waals gases and liquids.
Real molecular dynamics of hundreds of Lennard-Jones atoms in a periodic box: velocity-Verlet integration, forces from a cell list that scales as O(N), energy conservation, equipartition and virial pressure checked live.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install