public void clear() {
		// haltScriptExecution();
		// if we halt scripts, then the scripts that may call this method will not be able to run
		tot = 0;
		kin = 0;
		pot = 0;
		setModelTime(0);
		setTimeStep(2);
		stopAtNextRecordingStep = false;
		if (hasEmbeddedMovie())
			insertNewTape();
		if (movie != null) {
			movie.enableAllMovieActions(false);
			movie.getMovieSlider().repaint();
		}
		if (job != null) {
			job.setIndexOfStep(0);
		}
		for (int i = 0; i < iAtom; i++) {
			atom[i].setMovable(true);
			atom[i].setCharge(0);
			atom[i].setDamp(0);
			atom[i].setRestraint(null);
			atom[i].zeroVelocity();
			atom[i].zeroAcceleration();
			atom[i].clearBondLists();
		}
		iAtom = 0;
		forceCalculator.setUpdateList(true);
		if (obstacles != null)
			obstacles.clear();
		rBonds.clear();
		aBonds.clear();
		tBonds.clear();
		molecules.clear();
		activateHeatBath(false);
		clearScriptQueue();
		clearMouseScripts();
		initializationScript = null;
	}