void refresh() {
		int n = view.getModel().getNumberOfParticles();
		if (n > viewer.getAtomCount())
			n = viewer.getAtomCount();
		Atom at;
		int argb = 0;
		float sigma = 0;
		for (int i = 0; i < n; i++) {
			at = view.atom[i];
			if (at.isVisible()) {
				sigma = getCurrentSigma(at);
				if (view.model instanceof ReactionModel) {
					sigma *= 2; // special treatment to deal with covalent bond is much shorter than vdw bond
				}
			}
			else {
				sigma = 0;
			}
			if (sigma > 0.000001f) {
				if (at.isMarked()) {
					argb = view.getMarkColor().getRGB();
				}
				else if (view.shadingShown()) {
					argb = view.getKeShadingColor((at.getVx() * at.getVx() + at.getVy() * at.getVy()) * at.getMass())
							.getRGB();
				}
				else if (view.chargeShadingShown()) {
					argb = view.getChargeShadingColor(at.getCharge()).getRGB();
				}
				else {
					// argb = view.getColor(at);
					argb = at.getColor().getRGB();
				}
			}
			viewer.setAtomCoordinates(i, 0.1f * (float) (at.getRx() - view.getWidth() * 0.5),
					0.1f * (float) (0.5 * view.getHeight() - at.getRy()), 0, 100 * sigma, argb | 0xff000000);
			// set alpha to 255
		}
		viewer.refresh();
	}