private void setupRepeatRun(BigInteger numPrunedConfsToAllow, int numRotForResNonPruned[], 
			int numLevels, int numMutable){
		
		BigInteger totalNumConfsUnpruned = new BigInteger("0");
		Iterator<RotInfo<Boolean>> elimRotIter = eliminatedRotAtRes.iterator();
		Iterator<RotInfo<Boolean>> prunedStericIter = prunedIsSteric.iterator();
		while(elimRotIter.hasNext()){
		//for (int i=0; i<eliminatedRotAtRes.length; i++){
			RotInfo<Boolean> elimRotInfo = elimRotIter.next();
			RotInfo<Boolean> prunedStericInfo = prunedStericIter.next();
			//check to make sure we are always checking same index
			assert (elimRotInfo.curPos == prunedStericInfo.curPos && elimRotInfo.curAA == prunedStericInfo.curAA &&
					elimRotInfo.curRot == prunedStericInfo.curRot) : "ElimRot and PrunedSteric indexes don't match";
			
			if ((elimRotInfo.state)&&(!prunedStericInfo.state)){ //pruned non-steric rotamer
			//if ((eliminatedRotAtRes[i])&&(!prunedIsSteric[i])){ //pruned non-steric rotamer
				
				int curLevel = elimRotInfo.curPos;//(int)Math.floor(i/numTotalRotamers); //the residue number for the cur rot index
				//TODO: fix that all positions are assumed to have "numTotalRotamers" number of rotamers
				/*if (curLevel>=numInAS) //ligand level (the ligand may have more than numTotalRotamers rotamers)
					curLevel = numInAS; //the residue number for the cur rot index*/
				numRotForResNonPruned[curLevel]++;
				eliminatedRotAtRes.set(elimRotInfo,false);
				
				BigInteger numConfsAtLevelUnpruned = new BigInteger("1"); //count the unpruned confs by unpruning the cur rot index
				for (int j=0; j<numLevels; j++){
					if (j!=curLevel){
						numConfsAtLevelUnpruned = numConfsAtLevelUnpruned.multiply(BigInteger.valueOf(numRotForResNonPruned[j]));
					}
				}
				
				totalNumConfsUnpruned = totalNumConfsUnpruned.add(numConfsAtLevelUnpruned);
				if (totalNumConfsUnpruned.compareTo(numPrunedConfsToAllow)>=0) // num pruned confs reduced by the necessary number
					break;
			}