/** Simulate the system. */
  public void simulate() {
    logHeader();
    dataLog("Starting Simulation...");
    system.simulate();
    logFooter();

    writer.close(system);
  }
 /**
  * Records the system created by the setup frame.
  *
  * @param sys
  */
 public void setSystem(ParticleSystem sys) {
   system = sys;
   writer = new DataWriter(sys);
   system.addListener(writer);
 }