private float getKEOfAtoms(List<Atom> list) {
		if (list == null || list.isEmpty())
			return 0;
		float x = 0;
		int n = 0;
		synchronized (list) {
			for (Atom a : list) {
				x += (a.vx * a.vx + a.vy * a.vy + a.vz * a.vz) * a.mass;
				n++;
			}
		}
		x *= EV_CONVERTER;
		// the prefactor 0.5 doesn't show up here because of mass unit conversion.
		return n > 0 ? x / n : x;
	}