The EDMD simulation is driven by the JavaScript files below (and p5.js). The main simulation is controlled by md.js. This program sets-up the simulation box, adds the particles, builds the particle event queue and determines when/how the events are carried out. The simulation particles are defined by the Particle class in particle.js. Each entry in the event queue in md.js is an Event object (defined in event.js).

Note: the code snippets below are associated with older versions of the EDMD module, so they may not contain all the latest features. Nevertheless, the simulation mechanics remain the same. For the latest version, checkout VCE on GitHub.