public synchronized void setTemperature(List<Atom> list, double temperature) {
		if (list == null || list.isEmpty())
			return;
		if (temperature < ZERO)
			temperature = 0.0;
		double temp1 = getKEOfParticles(list) * UNIT_EV_OVER_KB;
		if (temp1 < ZERO) {
			assignTemperature(list, 100.0);
			temp1 = getKEOfParticles(list) * UNIT_EV_OVER_KB;
		}
		rescaleVelocities(list, Math.sqrt(temperature / temp1));
	}