public void equiPartitionEnergy(MDModel model) {

		if (list == null) {
			list = new ArrayList<Particle>();
		}
		else {
			list.clear();
		}

		int n = model.getNumberOfParticles();
		for (int i = 0; i < n; i++) {
			Particle p = model.getParticle(i);
			if (p.isCenterOfMassContained(scope))
				list.add(p);
		}

		if (list.size() < 2)
			return;

		double v2 = 0.0;
		double omega = 0.0;
		for (Particle p : list) {
			v2 += p.getMass() * (p.getVx() * p.getVx() + p.getVy() * p.getVy());
			if (p instanceof UnitedAtom) {
				omega = ((UnitedAtom) p).getOmega();
				v2 += omega * omega * ((UnitedAtom) p).getInertia();
			}
		}
		v2 = v2 / list.size();
		for (Particle p : list) {
			if (p instanceof UnitedAtom) {
				// two translational degrees of freedom
				p.setRandomVelocity(Math.sqrt(0.66666667 * v2 / p.getMass()));
				// one rotational degree of freedom
				((UnitedAtom) p).setRandomAngularVelocity(Math.sqrt(0.33333 * v2 / ((UnitedAtom) p).getInertia()));
			}
			else {
				p.setRandomVelocity(Math.sqrt(v2 / p.getMass()));
			}
		}

	}