public void setTemperature(float temperature) {
		if (temperature < ZERO)
			temperature = 0.0f;
		double temp1 = getKin() * UNIT_EV_OVER_KB;
		if (temp1 < ZERO && temperature > ZERO) {
			assignTemperature(temperature);
			temp1 = getKin() * UNIT_EV_OVER_KB;
		}
		if (temp1 > ZERO)
			rescaleVelocities((float) Math.sqrt(temperature / temp1));
	}