public synchronized void setFriction(float friction) {
		for (int i = 0; i < numberOfAtoms; i++)
			atom[i].setFriction(friction);
		if (obstacles != null && !obstacles.isEmpty()) {
			RectangularObstacle obs = null;
			synchronized (obstacles.getSynchronizationLock()) {
				for (Iterator it = obstacles.iterator(); it.hasNext();) {
					obs = (RectangularObstacle) it.next();
					obs.setFriction(friction);
				}
			}
		}
	}