This is a Jupyter Notebook to illustrate the difference between the Velocity-Verlet and Euler methods for integrating classical equations of motion for a homonuclear diatomic molecule. The intention was to give chemistry undergraduate students a simple example of how computers can generate molecular trajectories, so that students could better understand how classical molecular dynamics (MD) works.
The code will generate a molecular trajectory of a homonuclear diatomic molecule by treating the bond as a harmonic oscillator and assuming there are no outside forces. The resulting trajectory is animated and the Velocity-Verlet or Euler integration are compared to the exact trajectory.