← All posts

Posts tagged #scientific-computing

A fast molecular-dynamics simulator in pure NumPy

11 min

A naive molecular-dynamics loop is O(N²) and dies past a few hundred particles. With cell lists, a cutoff Lennard-Jones potential, velocity-Verlet integration, and reduced units, you can simulate thousands of particles in pure NumPy and watch a gas equilibrate.