public void minimize(int nstep, float delta, BitSet selectionSet, int delay) {
		float oldPot = compute(0);
		for (int i = 0; i <= nstep; i++) {
			pot = SteepestDescentMinimizer.minimize(this, delta, selectionSet);
			if (i % 10 == 0) {
				view.setInfoString("Energy minimizer: " + (pot - oldPot) + " eV");
				view.refresh();
				view.repaint();
				// System.out.println(i + "=" + pot);
				if (delay > 0) {
					try {
						Thread.sleep(delay);
					} catch (InterruptedException e) {
					}
				}
			}
		}
		view.setInfoString(null);
		view.repaint();
	}