private float excite() {

		if (!atom.hasElectrons())
			return 0;

		Electron e = atom.getElectron(0);
		EnergyLevel level = e.getEnergyLevel();
		ElectronicStructure es = model.getElement(atom.id).getElectronicStructure();
		int n = es.getNumberOfEnergyLevels();
		int m = es.indexOf(level);
		if (m == -1 || m >= n - 1)
			return 0;

		if (!model.quantumRule.isIonizationDisallowed()) {
			double excess = photon.getEnergy() + level.getEnergy();
			if (excess > 0) {
				loseElectron(e, excess);
				return (float) excess;
			}
		}
		EnergyLevel excite;
		for (int i = m + 1; i < n; i++) {
			excite = es.getEnergyLevel(i);
			if (Math.abs(excite.getEnergy() - level.getEnergy() - photon.getEnergy()) < ENERGY_GAP_TOLL) {
				e.setEnergyLevel(excite);
				return excite.getEnergy() - level.getEnergy(); // return the precise energy
			}
		}

		return 0;

	}