code: private void checkSetHelix(int n, SecStrucType type){
  
  		int idx = n - 3;
  		logger.debug("Set helix {} {} {}", type, n, idx);
  
  		for (int i = 1; i < groups.length-n; i++) {
  
  			SecStrucState state = getSecStrucState(i);
  			SecStrucState previousState = getSecStrucState(i-1);
  
  			//Check that no other helix was assgined to this range
  			if (state.getType().compareTo(type) < 0) continue;
  			if (getSecStrucState(i+1).getType().compareTo(type) < 0) continue;
  
  			char turn = state.getTurn()[idx];
  			char pturn = previousState.getTurn()[idx];
  
  			//Two consecutive n-turns present to define a n-helix
  			if ((turn=='>' || turn=='X') && (pturn=='>' || pturn=='X')) {
  				//Mark following n residues as turn
  				for (int k=0; k<n; k++){
  					setSecStrucType(i+k, type);
  				}
  				if (!DSSP_HELICES) {
  					setSecStrucType(i-1, type);
  					setSecStrucType(i+n, type);
  				}
  			}
  		}
  	}
docs: A minimal helix is defined by two consecutive n-turns.
  For example, a 4-helix, of minimal length 4 from residues
  i to (i+3), requires turns (of type 4) at residues (i-1) and i.
  <p>
  Note that the orignal DSSP implementation does not assign
  helix type to residue (i-1) and residue (i+n+1), although
  they contain a helix turn. As they state in the original paper,
  "the helices are one residue shorter than they would be according
  to rule 6.3 of IUPAC-IUB".
  
  @param n
  @param type