public void refresh() {
		synchronized (viewer) {
			int n = model.getAtomCount();
			Atom at;
			for (int i = 0; i < n; i++) {
				at = model.getAtom(i);
				if (at.isGenericParticle()) {
					int vdw = viewer.getPercentVdwAtom();
					viewer.setAtomSize(i, vdw == 100 ? 1000 * at.getSigma() : at.getSigma() * vdw * 10);
				}
				if (keShading) {
					viewer.setAtomCoordinates(i, at.getRx(), at.getRy(), at.getRz(), getKeShadingColor(at.getKe()));
				}
				else {
					viewer.setAtomCoordinates(i, at.getRx(), at.getRy(), at.getRz());
				}
				if (velocityBitSet.get(i))
					viewer.setAtomVelocities(i, at.getVx(), at.getVy(), at.getVz());
			}
			if (showVdwLines) {
				viewer.setVdwForceLines(model.getVdwPairs());
			}
			if (viewer.getNavigationMode() && cameraAtom >= 0) {
				at = model.getAtom(cameraAtom);
				if (at != null) {
					if (hasCameraMoved(at)) {
						if (!mountCameraOn(at)) {
							at.setVx(at.getVx() + 0.000001f); // shift a bit to handle singularity
							mountCameraOn(at);
						}
					}
				}
			}
			viewer.refresh();
		}
	}