public void setType(Reaction type) {
		this.type = type;
		if (type instanceof Reaction.A2_B2__2AB) {
			double vAA = type.getParameter(Reaction.A2_B2__2AB.VAA).doubleValue();
			double vBB = type.getParameter(Reaction.A2_B2__2AB.VBB).doubleValue();
			double vAB = type.getParameter(Reaction.A2_B2__2AB.VAB).doubleValue();
			react.setInterval(type.getFrequency());
			int idA = ((Reaction.A2_B2__2AB) type).getIDA();
			int idB = ((Reaction.A2_B2__2AB) type).getIDB();
			synchronized (bonds.getSynchronizationLock()) {
				for (Iterator it = bonds.iterator(); it.hasNext();) {
					rBond = (RadialBond) it.next();
					if (rBond.atom1.getID() == idA && rBond.atom2.getID() == idA) {
						rBond.setChemicalEnergy(vAA);
					}
					else if (rBond.atom1.getID() == idB && rBond.atom2.getID() == idB) {
						rBond.setChemicalEnergy(vBB);
					}
					else if ((rBond.atom1.getID() == idA && rBond.atom2.getID() == idB)
							|| (rBond.atom1.getID() == idB && rBond.atom2.getID() == idA)) {
						rBond.setChemicalEnergy(vAB);
					}
				}
			}
		}
		else if (type instanceof Reaction.O2_2H2__2H2O) {
			double vHH = type.getParameter(Reaction.O2_2H2__2H2O.VHH).doubleValue();
			double vOO = type.getParameter(Reaction.O2_2H2__2H2O.VOO).doubleValue();
			double vHO = type.getParameter(Reaction.O2_2H2__2H2O.VHO).doubleValue();
			react.setInterval(type.getFrequency());
			int idH = ((Reaction.O2_2H2__2H2O) type).getIDH();
			int idO = ((Reaction.O2_2H2__2H2O) type).getIDO();
			synchronized (bonds.getSynchronizationLock()) {
				for (Iterator it = bonds.iterator(); it.hasNext();) {
					rBond = (RadialBond) it.next();
					if (rBond.atom1.getID() == idH && rBond.atom2.getID() == idH) {
						rBond.setChemicalEnergy(vHH);
					}
					else if (rBond.atom1.getID() == idO && rBond.atom2.getID() == idO) {
						rBond.setChemicalEnergy(vOO);
					}
					else if ((rBond.atom1.getID() == idH && rBond.atom2.getID() == idO)
							|| (rBond.atom1.getID() == idO && rBond.atom2.getID() == idH)) {
						rBond.setChemicalEnergy(vHO);
					}
				}
			}
		}
		else if (type instanceof Reaction.A2_B2_C__2AB_C) {
			double vAA = type.getParameter(Reaction.A2_B2_C__2AB_C.VAA).doubleValue();
			double vBB = type.getParameter(Reaction.A2_B2_C__2AB_C.VBB).doubleValue();
			double vAB = type.getParameter(Reaction.A2_B2_C__2AB_C.VAB).doubleValue();
			double vAC = type.getParameter(Reaction.A2_B2_C__2AB_C.VAC).doubleValue();
			double vBC = type.getParameter(Reaction.A2_B2_C__2AB_C.VBC).doubleValue();
			react.setInterval(type.getFrequency());
			int idA = ((Reaction.A2_B2_C__2AB_C) type).getIDA();
			int idB = ((Reaction.A2_B2_C__2AB_C) type).getIDB();
			int idC = ((Reaction.A2_B2_C__2AB_C) type).getIDC();
			synchronized (bonds.getSynchronizationLock()) {
				for (Iterator it = bonds.iterator(); it.hasNext();) {
					rBond = (RadialBond) it.next();
					if (rBond.atom1.getID() == idA && rBond.atom2.getID() == idA) {
						rBond.setChemicalEnergy(vAA);
					}
					else if (rBond.atom1.getID() == idB && rBond.atom2.getID() == idB) {
						rBond.setChemicalEnergy(vBB);
					}
					else if ((rBond.atom1.getID() == idA && rBond.atom2.getID() == idB)
							|| (rBond.atom1.getID() == idB && rBond.atom2.getID() == idA)) {
						rBond.setChemicalEnergy(vAB);
					}
					else if ((rBond.atom1.getID() == idA && rBond.atom2.getID() == idC)
							|| (rBond.atom1.getID() == idC && rBond.atom2.getID() == idA)) {
						rBond.setChemicalEnergy(vAC);
					}
					else if ((rBond.atom1.getID() == idB && rBond.atom2.getID() == idC)
							|| (rBond.atom1.getID() == idC && rBond.atom2.getID() == idB)) {
						rBond.setChemicalEnergy(vBC);
					}
				}
			}
		}
		else if (type instanceof Reaction.nA__An) {
			double vAA = type.getParameter(Reaction.nA__An.VAA).doubleValue();
			double vBB = type.getParameter(Reaction.nA__An.VBB).doubleValue();
			double vCC = type.getParameter(Reaction.nA__An.VCC).doubleValue();
			double vDD = type.getParameter(Reaction.nA__An.VDD).doubleValue();
			double vAB = type.getParameter(Reaction.nA__An.VAB).doubleValue();
			double vAC = type.getParameter(Reaction.nA__An.VAC).doubleValue();
			double vAD = type.getParameter(Reaction.nA__An.VAD).doubleValue();
			double vBC = type.getParameter(Reaction.nA__An.VBC).doubleValue();
			double vBD = type.getParameter(Reaction.nA__An.VBD).doubleValue();
			double vCD = type.getParameter(Reaction.nA__An.VCD).doubleValue();
			synchronized (bonds.getSynchronizationLock()) {
				for (Iterator it = bonds.iterator(); it.hasNext();) {
					rBond = (RadialBond) it.next();
					if (rBond.atom1.getID() == ID_NT && rBond.atom2.getID() == ID_NT) {
						rBond.setChemicalEnergy(vAA);
					}
					else if (rBond.atom1.getID() == ID_PL && rBond.atom2.getID() == ID_PL) {
						rBond.setChemicalEnergy(vBB);
					}
					else if (rBond.atom1.getID() == ID_WS && rBond.atom2.getID() == ID_WS) {
						rBond.setChemicalEnergy(vCC);
					}
					else if (rBond.atom1.getID() == ID_CK && rBond.atom2.getID() == ID_CK) {
						rBond.setChemicalEnergy(vDD);
					}
					else if ((rBond.atom1.getID() == ID_NT && rBond.atom2.getID() == ID_PL)
							|| (rBond.atom1.getID() == ID_PL && rBond.atom2.getID() == ID_NT)) {
						rBond.setChemicalEnergy(vAB);
					}
					else if ((rBond.atom1.getID() == ID_NT && rBond.atom2.getID() == ID_WS)
							|| (rBond.atom1.getID() == ID_WS && rBond.atom2.getID() == ID_NT)) {
						rBond.setChemicalEnergy(vAC);
					}
					else if ((rBond.atom1.getID() == ID_NT && rBond.atom2.getID() == ID_CK)
							|| (rBond.atom1.getID() == ID_CK && rBond.atom2.getID() == ID_NT)) {
						rBond.setChemicalEnergy(vAD);
					}
					else if ((rBond.atom1.getID() == ID_PL && rBond.atom2.getID() == ID_WS)
							|| (rBond.atom1.getID() == ID_WS && rBond.atom2.getID() == ID_PL)) {
						rBond.setChemicalEnergy(vBC);
					}
					else if ((rBond.atom1.getID() == ID_PL && rBond.atom2.getID() == ID_CK)
							|| (rBond.atom1.getID() == ID_CK && rBond.atom2.getID() == ID_PL)) {
						rBond.setChemicalEnergy(vBD);
					}
					else if ((rBond.atom1.getID() == ID_WS && rBond.atom2.getID() == ID_CK)
							|| (rBond.atom1.getID() == ID_CK && rBond.atom2.getID() == ID_WS)) {
						rBond.setChemicalEnergy(vCD);
					}
				}
			}
		}
	}