anchor.diff:      i1 = A(i)
       do j=1, size(A)
           j1 = A(j)
  -        call set_next_eigeval(iunt, g, kpr, j1, 0, i1, w, dk, prg)
  +        call set_next_eigeval(iunt, g, kpc, j1, 0, i1, w, dk, prg)
       end do
   end do
   
  
positive.code: end do
  write(ilog,*)
  
  kpr = pureDEGMV(g, kp, 'T')
  write(ilog,*) "k-point in: reciprocal space       reciprocal Cartesian space"
  write(ilog,"(3F10.6,A,3F10.6)") (kp(j), j=1,3), "     ", (kpr(j), j=1,3)
  
  ! write KPOINTS file ###########################################
  
  open(unit=iunt,file='KPOINTS',form='formatted')
  
  write(unit=iunt,fmt='(A,F7.4,F7.4,F7.4,A,F7.5)') 'kp: ', (kpr(j), j=1,3), ', dk: ', dk
  write(unit=iunt,fmt='(I2)') nkpoints
  write(unit=iunt,fmt='(A)') 'Cartesian'
  
  ! x
  do i=-2,2
      call set_next_eigeval(iunt, g, kpr, i, 0, 0, w, dk, prg)
  end do
  
  ! http://stackoverflow.com/questions/9791001/loop-in-fortran-from-a-list
  
negative.code:     i1 = A(i)
      do j=1, size(A)
          j1 = A(j)
          call set_next_eigeval(iunt, g, kpc, j1, i1, 0, w, dk, prg)
      end do
  end do
  
  