private void makeBond(int i, int j) {

		// if the chemical energy stored in the supposed bond is zero, do not make it
		bondEnergy = getBondEnergy(i, j);
		if (bondEnergy <= 0.0)
			return;

		/*
		 * "dpot" is the amount of energy needed to be exchanged with the kinetic energy reservior. If it is negative,
		 * it will be substracted from the reservior. This means that, for example, this amount of heat needs to be
		 * borrowed from the reservior to form a chemical bond. If it is positive, it will be added to the reservior.
		 * This means that, for example, this amount of heat will be returned to the reservior to increase the
		 * temperature.
		 */
		bondLength = getBondLength(atom[i], atom[j]);
		bondStrength = getBondStrength(atom[i], atom[j]);
		dpot = Math.sqrt(rij) - bondLength;
		dpot *= dpot;
		dpot *= -0.5 * bondStrength;
		dpot += bondEnergy;

		atom[i].storeCurrentVelocity();
		atom[j].storeCurrentVelocity();
		if (conserve(i, j, dpot)) {

			bonds.add(new RadialBond.Builder(atom[i], atom[j]).bondLength(bondLength).bondStrength(bondStrength)
					.chemicalEnergy(bondEnergy).build());

			if ((type instanceof Reaction.A2_B2__2AB) || (type instanceof Reaction.A2_B2_C__2AB_C)) {
				// atoms of A2, B2 and AB should not be treated as free radicals any more
				atom[i].setRadical(false);
				atom[j].setRadical(false);
			}
			else if (type instanceof Reaction.O2_2H2__2H2O) {
				// atoms of H2 and O2 molecules should not be treated as free radials any more, but atoms of HO
				// fragments are still reactive.
				if (atom[i].getID() == atom[j].getID()) {
					atom[i].setRadical(false);
					atom[j].setRadical(false);
				}
			}

			bondChanged = true;

		}
		else {
			atom[i].restoreVelocity();
			atom[j].restoreVelocity();
		}

	}