public void setShiftMatrix(float cutoff) {

		if (cutoff <= 0)
			throw new IllegalArgumentException("cutoff<=0");

		double eps[] = new double[Element.NMAX];
		eps[ID_NT] = nt.getEpsilon();
		eps[ID_PL] = pl.getEpsilon();
		eps[ID_WS] = ws.getEpsilon();
		eps[ID_CK] = ck.getEpsilon();
		eps[ID_MO] = mo.getEpsilon();
		eps[ID_SP] = sp.getEpsilon();

		double sig[] = new double[Element.NMAX];
		sig[ID_NT] = nt.getSigma();
		sig[ID_PL] = pl.getSigma();
		sig[ID_WS] = ws.getSigma();
		sig[ID_CK] = ck.getSigma();
		sig[ID_MO] = mo.getSigma();
		sig[ID_SP] = sp.getSigma();

		for (int i = ID_ALA; i <= ID_VAL; i++) {
			eps[i] = aminoAcidElement[i - ID_ALA].getEpsilon();
			sig[i] = aminoAcidElement[i - ID_ALA].getSigma();
		}

		for (int i = ID_A; i <= ID_U; i++) {
			eps[i] = nucleotideElement[i - ID_A].getEpsilon();
			sig[i] = nucleotideElement[i - ID_A].getSigma();
		}

		int n = eps.length;
		double epsij[][] = new double[n][n];
		double sigij[][] = new double[n][n];
		for (int i = 0; i < n; i++) {
			epsij[i][i] = getElement(i).getEpsilon();
			sigij[i][i] = getElement(i).getSigma();
		}
		for (int i = 0; i < n - 1; i++) {
			for (int j = i + 1; j < n; j++) {
				epsij[j][i] = epsij[i][j] = affinity.getEpsilon(getElement(i), getElement(j));
				sigij[j][i] = sigij[i][j] = affinity.getSigma(getElement(i), getElement(j));
			}
		}

		double r2 = 1.0 / (cutoff * cutoff);
		double sr6 = r2 * r2 * r2;
		double sr12 = sr6 * sr6;
		double rtemp = 1.0;
		boolean hate = false, mix = false;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				hate = isRepulsive(i, j);
				mix = i != j ? affinity.isLBMixed(getElement(i), getElement(j)) : false;
				if (hate) {
					poten_LJ[i][j] = 4.0 * epsij[i][j] * sr6 * crossRepulsionIntensity;
					rtemp = 1.0 / (cutoff * sigij[i][j]);
					slope_LJ[i][j] = -24.0 * epsij[i][j] * sr6 * rtemp * crossRepulsionIntensity * GF_CONVERSION_CONSTANT;
				} else if (!hate && !mix) {
					poten_LJ[i][j] = 4.0 * epsij[i][j] * (sr12 - sr6);
					rtemp = 1.0 / (cutoff * sigij[i][j]);
					slope_LJ[i][j] = 4.0 * epsij[i][j] * (-12.0 * sr12 * rtemp + 6.0 * sr6 * rtemp) * GF_CONVERSION_CONSTANT;
				} else {
					poten_LJ[i][j] = 2.0 * (eps[i] + eps[j]) * (sr12 - sr6);
					rtemp = 1.0 / (cutoff * Math.sqrt(sig[i] * sig[j]));
					slope_LJ[i][j] = 2.0 * (eps[i] + eps[j]) * (-12.0 * sr12 * rtemp + 6.0 * sr6 * rtemp) * GF_CONVERSION_CONSTANT;
				}
			}
		}

	}