private void thermallyDeexciteAtoms() {
		if (thermalDeexcitor == null)
			thermalDeexcitor = new ThermalDeexcitor(this);
		double sig;
		for (int i = 0; i < numberOfAtoms - 1; i++) {
			rxi = atom[i].rx;
			ryi = atom[i].ry;
			for (int j = i + 1; j < numberOfAtoms; j++) {
				if (atom[i].isExcitable() || atom[j].isExcitable()) {
					rxij = rxi - atom[j].rx;
					ryij = ryi - atom[j].ry;
					rijsq = rxij * rxij + ryij * ryij;
					// 0.55 < 0.5*2^(1/6)~0.56 --- allow a bit penetration
					sig = 0.55 * (atom[i].sigma + atom[j].sigma);
					sig *= sig;
					if (rijsq < sig) {
						Photon p = thermalDeexcitor.deexcite(atom[i], atom[j]);
						if (p != null) {
							p.setModel(this);
							p.setAngle((float) (Math.random() * 2 * Math.PI));
							Electron e = thermalDeexcitor.getElectron();
							if (e != null) {
								Atom a = e.getAtom();
								if (a != null) {
									double x = a.sigma * 0.51 * Math.cos(p.getAngle());
									double y = a.sigma * 0.51 * Math.sin(p.getAngle());
									p.setX(p.getX() + (float) x);
									p.setY(p.getY() + (float) y);
								}
							}
							addPhoton(p);
							// notifyModelListeners(new ModelEvent(this, "Photon emitted", null, p));
							// postone to be handled by RectangularBoundary when the photon exits
						}
					}
				}
			}
		}
	}