Jacob Gruber
  • About
  • CV
  • Publications
  • Lab
  • Research

Graphene MD

Controls

Notes

Click/touch and hold to create a point force. Slider controls amplitude.

Control temperature through the thermostat slider.

About Graphene MD

This project demonstrates a minimal molecular dynamics (MD) framework designed to run interactively in a web browser. Although the physical model is intentionally simple, the underlying architecture is representative of many larger simulation codes: particles interact through pairwise potentials, forces are accumulated, the system evolves by numerically integrating Newton’s equations of motion, and temperature is controlled by a thermodynamic ensemble.

Bonds are colored by their strain relative to the original lattice.

Click and hold or drag to create a local displacement field. The mouseforce amplitude slider defines the magnitude of the displacement field.

The temperature slider contoles the target temperature of the thermodynamic ensemble. Energy introduced by mouseforce displacement fields will gradually be sucked out by the thermostat.

The current model uses a nearest-neighbor Lennard-Jones interaction together with a weak second-neighbor repulsion to stabilize a graphene-like lattice.

The simulation engine is written in C and compiled to WebAssembly, while the simulation itself is configured through a Lua script. The goal is not to faithfully reproduce graphene, but to demonstrate a lightweight, extensible molecular dynamics framework that can serve as a foundation for more sophisticated atomistic simulations. It is no LAMMPS, but there are many things I plan to add.