private double getBondEnergy(int i, int j) {

		if (type instanceof Reaction.A2_B2__2AB) {

			int idA = ((Reaction.A2_B2__2AB) type).getIDA();
			int idB = ((Reaction.A2_B2__2AB) type).getIDB();

			if (atom[i].getID() == idA && atom[j].getID() == idA)
				return type.getParameter(Reaction.A2_B2__2AB.VAA).doubleValue();

			if (atom[i].getID() == idB && atom[j].getID() == idB)
				return type.getParameter(Reaction.A2_B2__2AB.VBB).doubleValue();

			if ((atom[i].getID() == idA && atom[j].getID() == idB)
					|| (atom[i].getID() == idB && atom[j].getID() == idA))
				return type.getParameter(Reaction.A2_B2__2AB.VAB).doubleValue();

		}
		else if (type instanceof Reaction.O2_2H2__2H2O) {

			int idH = ((Reaction.O2_2H2__2H2O) type).getIDH();
			int idO = ((Reaction.O2_2H2__2H2O) type).getIDO();

			if (atom[i].getID() == idH && atom[j].getID() == idH)
				return type.getParameter(Reaction.O2_2H2__2H2O.VHH).doubleValue();

			if (atom[i].getID() == idO && atom[j].getID() == idO)
				return type.getParameter(Reaction.O2_2H2__2H2O.VOO).doubleValue();

			if ((atom[i].getID() == idH && atom[j].getID() == idO)
					|| (atom[i].getID() == idO && atom[j].getID() == idH))
				return type.getParameter(Reaction.O2_2H2__2H2O.VHO).doubleValue();

		}
		else if (type instanceof Reaction.A2_B2_C__2AB_C) {

			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();

			if (atom[i].getID() == idA && atom[j].getID() == idA)
				return type.getParameter(Reaction.A2_B2_C__2AB_C.VAA).doubleValue();

			if (atom[i].getID() == idB && atom[j].getID() == idB)
				return type.getParameter(Reaction.A2_B2_C__2AB_C.VBB).doubleValue();

			if ((atom[i].getID() == idA && atom[j].getID() == idB)
					|| (atom[i].getID() == idB && atom[j].getID() == idA))
				return type.getParameter(Reaction.A2_B2_C__2AB_C.VAB).doubleValue();

			if ((atom[i].getID() == idA && atom[j].getID() == idC)
					|| (atom[i].getID() == idC && atom[j].getID() == idA))
				return type.getParameter(Reaction.A2_B2_C__2AB_C.VAC).doubleValue();

			if ((atom[i].getID() == idB && atom[j].getID() == idC)
					|| (atom[i].getID() == idC && atom[j].getID() == idB))
				return type.getParameter(Reaction.A2_B2_C__2AB_C.VBC).doubleValue();

		}
		else if (type instanceof Reaction.nA__An) {

			if (atom[i].getID() == ID_NT && atom[j].getID() == ID_NT)
				return type.getParameter(Reaction.nA__An.VAA).doubleValue();

			if (atom[i].getID() == ID_PL && atom[j].getID() == ID_PL)
				return type.getParameter(Reaction.nA__An.VBB).doubleValue();

			if (atom[i].getID() == ID_WS && atom[j].getID() == ID_WS)
				return type.getParameter(Reaction.nA__An.VCC).doubleValue();

			if (atom[i].getID() == ID_CK && atom[j].getID() == ID_CK)
				return type.getParameter(Reaction.nA__An.VDD).doubleValue();

			if ((atom[i].getID() == ID_NT && atom[j].getID() == ID_PL)
					|| (atom[i].getID() == ID_PL && atom[j].getID() == ID_NT))
				return type.getParameter(Reaction.nA__An.VAB).doubleValue();

			if ((atom[i].getID() == ID_NT && atom[j].getID() == ID_WS)
					|| (atom[i].getID() == ID_WS && atom[j].getID() == ID_NT))
				return type.getParameter(Reaction.nA__An.VAC).doubleValue();

			if ((atom[i].getID() == ID_NT && atom[j].getID() == ID_CK)
					|| (atom[i].getID() == ID_CK && atom[j].getID() == ID_NT))
				return type.getParameter(Reaction.nA__An.VAD).doubleValue();

			if ((atom[i].getID() == ID_PL && atom[j].getID() == ID_WS)
					|| (atom[i].getID() == ID_WS && atom[j].getID() == ID_PL))
				return type.getParameter(Reaction.nA__An.VBC).doubleValue();

			if ((atom[i].getID() == ID_PL && atom[j].getID() == ID_CK)
					|| (atom[i].getID() == ID_CK && atom[j].getID() == ID_PL))
				return type.getParameter(Reaction.nA__An.VBD).doubleValue();

			if ((atom[i].getID() == ID_WS && atom[j].getID() == ID_CK)
					|| (atom[i].getID() == ID_CK && atom[j].getID() == ID_WS))
				return type.getParameter(Reaction.nA__An.VCD).doubleValue();

		}

		return 0.0;

	}