This is a Java Applet for investigating the properties of symplectic integrators when applied to a simple harmonic oscillator.
This set of Mathematica notebook files compute the first few terms of the perturbed Hamiltonian for the Verlet method and two Symplectic Euler methods applied to a one degree-of-freedom mechanical Hamiltonian system: H(q,p) = T(p) + V(q)
Analysis of Leapfrog/Verlet: [HTML] [Mathematica Notebook]
Analysis of Symplectic Euler A: [HTML] [Mathematica Notebook]
Analysis of Symplectic Euler B: [HTML] [Mathematica Notebook]
This set of Mathematica notebook files compute the first few terms of the modified Equations (and if possible modified Hamiltonian) for the backward Euler and generalized Leapfrog method and two Symplectic Euler methods applied to one degree-of-freedom systems. Forming the series requires some special tricks since these methods are both implicit.
Analysis of implicit Euler: [HTML] [Mathematica Notebook]
Analysis of generalized Leapfrog: [HTML] [Mathematica Notebook]
This Mathematica notebook file computes the first term of the modified Equations for a symmetric three-term splitting, f = 0.5 f3 + 0.5 f2 + f1 + 0.5 f2 + 0.5 f3, where the method simply solves for the dynamics of each vector field in turn. Forming the series is a little tricky since it requires composing series expansions for the flow-map of each of the fi's. The final modified vector field is then written as a sum of 9 commutators.
Analysis of a symmetric three term splitting method: [HTML] [Mathematica Notebook]
This code can be used to reproduce the numerical experiments in the paper by S. Bond, B. Laird, and B. Leimkuhler on The Nosé-Poincaré Method for Constant Temperature Molecular Dynamics (1999). In particular, it simulates a system of N-particles in a periodic cell using one of four different numerical methods: (a) Verlet, (b) Nosé-Hoover I, (c) Nosé-Hoover II, and (d) Nosé-Poincaré. The interaction potential can be specified by the user, and it comes with the Lennard-Jones potential already implemented. Note that the Verlet method is actually a method for systems at constant energy (NVE), while the Nosé methods simulate systems at constant temperature (NVT). This code is released under GPL.
Download the source code here: constant-temperature-code.tar.gz
Sphere-MD uses the SHAKE algorithm to simulate the motion of a collection of N-bodies constrained to the surface of a sphere. The code is split into two programs: (1) The core MD code which generates a trajectory and (2) An OpenGL which provides interactive visualization of the trajectory. This code is released under GPL.
Download it here: sphere-md.tar.gz