private synchronized boolean evaluateMinimizeClause(String str) throws InterruptedException {
		if (!(model instanceof MolecularModel))
			return false;
		if (str == null || str.trim().equals(""))
			return false;
		String[] s = str.split(REGEX_WHITESPACE);
		List<String> list = new ArrayList<String>();
		for (String si : s) {
			if (si.trim().equals(""))
				continue;
			list.add(si.trim());
		}
		float x = 0;
		int y = 0;
		String t = "SD";
		switch (list.size()) {
		case 2:
			try {
				x = Float.parseFloat(list.get(0)) * 10;
				y = (int) Float.parseFloat(list.get(1));
			} catch (NumberFormatException e) {
				out(ScriptEvent.FAILED, "Unable to parse number: " + str);
				return false;
			}
			break;
		case 3:
			try {
				x = Float.parseFloat(list.get(1)) * 10;
				y = (int) Float.parseFloat(list.get(2));
			} catch (NumberFormatException e) {
				out(ScriptEvent.FAILED, "Unable to parse number: " + str);
				return false;
			}
			t = list.get(0);
			break;
		}
		if (x > 0 && y > 0) {
			Minimizer m = new Minimizer((MolecularModel) model);
			float pot = 0;
			boolean b = t.equalsIgnoreCase("SD");
			for (int i = 0; i < y; i++) {
				pot = b ? (float) m.sd(x) : (float) m.cg(x);
				if (i % 20 == 0) {
					view.getGraphics().drawString(i + " steps, V = " + pot + " eV", 5, 20);
					view.repaint();
					try {
						Thread.sleep(50);
					} catch (InterruptedException e) {
						stop();
						throw new InterruptedException();
					}
				}
			}
			notifyChange();
			return true;
		}
		out(ScriptEvent.FAILED, "Syntax error: " + str);
		return false;
	}