*/
	synchronized double getKEOfParticles(List list) {
		if (list == null || list.isEmpty())
			return 0.0;
		double x = 0.0;
		Object o = null;
		Atom a = null;
		int n = 0;
		synchronized (list) {
			for (Iterator it = list.iterator(); it.hasNext();) {
				o = it.next();
				if (o instanceof Atom) {
					a = (Atom) o;
					x += (a.vx * a.vx + a.vy * a.vy) * 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;
	}