public void setTemplateOff(int[][] strandMut, int res1, int res2, boolean shellRun, boolean templateOnly){
		templateOffA96ff = new Amber96ext(m, distDepDielect, dielectConst, doSolvationE, solvScale, vdwMultiplier);
		
		boolean savedEnergyEvalSC[] = new boolean[m.numberOfResidues];
		boolean savedEnergyEvalBB[] = new boolean[m.numberOfResidues];
		
		
			
		// Save the energy eval flag, clear them at the same time
		for(int i=0;i<m.numberOfResidues;i++){
			savedEnergyEvalSC[i] = m.residue[i].getEnergyEvalSC();
			savedEnergyEvalBB[i] = m.residue[i].getEnergyEvalBB();
			m.residue[i].setEnergyEval(false, false);
		}
						
		//Clear the energy evaluation flags for the AS residues and the ligand (if present), so that
		//		the energies only between template residues are computed
		
		/*if (ligStrNum>=0)
			m.strand[ligStrNum].residue[0].setEnergyEval(false, false);*/
		
		
		if(!shellRun){
			int str2 = mutRes2Strand[res2];
			int strResNum2 = strandMut[str2][mutRes2StrandMutIndex[res2]];
			m.strand[str2].residue[strResNum2].setEnergyEval(true,true);
		}
		else { //(shellRun){
			//SHL-AS run needs SHL on
			for(int i=0;i<m.numberOfResidues;i++){
				m.residue[i].setEnergyEval(true,true);
			}
			for (int str=0; str<strandMut.length;str++)
			for (int i=0; i<strandMut[str].length; i++){
				if(isTemplateOn)
					m.strand[str].residue[strandMut[str][mutRes2StrandMutIndex[i]]].setEnergyEval(false, false);
				else
					m.strand[str].residue[strandMut[str][mutRes2StrandMutIndex[i]]].setEnergyEval(false, false);
			}
		}
		
		if(!templateOnly){
			int str1 = mutRes2Strand[res1];
			int strResNum1 = strandMut[str1][mutRes2StrandMutIndex[res1]];
			//Do this after so the above function doesn't make it false.
			//if((ligPresent && ! shellRun) || !ligPresent)
		
			m.strand[str1].residue[strResNum1].setEnergyEval(true,true);
			//if(ligPresent)
			//	m.strand[ligStrNum].residue[0].setEnergyEval(true, true);
		}
		
		templateOffA96ff.initializeCalculation();
		templateOffA96ff.setNBEval(hElect,hVDW);
		
		// Restore the energy eval and flexibility flags
		for(int i=0;i<m.numberOfResidues;i++){
			m.residue[i].setEnergyEval(savedEnergyEvalSC[i], savedEnergyEvalBB[i]);
		}