anchor.diff:        key_tmp(2,2) = xor(key1(2,2,i),key2(2,2))
         degree_alpha = popcnt(key_tmp(1,1)) + popcnt(key_tmp(2,1)) 
         degree_beta  = popcnt(key_tmp(1,2)) + popcnt(key_tmp(2,2)) 
  -      if(degree_alpha .gt.3 .or. degree_beta .gt.3 )cycle !! no double excitations of same spin
  -        degree(l) = ishft(d,-1)
  -        idx(l) = i
  +      if(degree_alpha .ge.3 .or. degree_beta .ge.3 )cycle !! no double excitations of same spin
  +      degree(l) = ishft(d,-1)
  +      idx(l) = i
           l = l+1
       enddo
       
  
positive.code:       key_tmp(1,2) = xor(key1(1,2,i),key2(1,2))
        degree_alpha = popcnt(key_tmp(1,1))
        degree_beta  = popcnt(key_tmp(1,2))
        if(degree_alpha .gt.3 .or. degree_beta .gt.3 )cycle !! no double excitations of same spin
          degree(l) = ishft(d,-1)
          idx(l) = i
          l = l+1
      enddo
    else if (Nint==2) then
      
  
negative.code:       key_tmp(3,2) = xor(key1(3,2,i),key2(3,2))
        degree_alpha = popcnt(key_tmp(1,1)) + popcnt(key_tmp(2,1)) + popcnt(key_tmp(3,1)) 
        degree_beta  = popcnt(key_tmp(1,2)) + popcnt(key_tmp(2,2)) + popcnt(key_tmp(3,2)) 
        if(degree_alpha .ge.3 .or. degree_beta .ge.3 )cycle !! no double excitations of same spin
        degree(l) = ishft(d,-1)
        idx(l) = i
        l = l+1
      enddo
      
    else
  