Molecular Dynamics Simulation of a Spring

Several options to try:

  1. The default.
  2. Set "Position" to 1.0, and "Velocity" to a small value like 0.5, check "Double well", uncheck "Thermostat" (without thermostat).
  3. Set temperature "T" to a small value like 0.1, check "Thermostat" (thermostat). The default is a simple Monte Carlo thermostat.
  4. Check "v-rescale" for velocity rescaling thermostat, does it work well in this case? Try a few "Therm. dt" values.
Spring.class

Download: source code in Java, or vanilla version in C.