anchor.diff:      do i=1,NL
         ix=Lx(i);iy=Ly(i);iz=Lz(i)
         ixt=iy;iyt=ix;izt=iz ! R_1
  -      itable_sym(1,i)=Lxyz(ixt,iyt,izt)
  +      itable_sym(1,Lxyz(ixt,iyt,izt))=i
       end do
   ! 2. T_2
       do i=1,NL
         ix=Lx(i);iy=Ly(i);iz=Lz(i)
         ixt=-iy;iyt=-ix;izt=iz
         ixt=mod(ixt+2*NLx,NLx);iyt=mod(iyt+2*NLy,NLy);izt=mod(izt+2*NLz,NLz)
  -      itable_sym(2,i)=Lxyz(ixt,iyt,izt)
  +      itable_sym(2,Lxyz(ixt,iyt,izt))=i
       end do
   ! 3. T_3
       do i=1,NL
         ix=Lx(i);iy=Ly(i);iz=Lz(i)
         ixt=-iy+NLx/4;iyt=ix+NLy/4;izt=iz+NLz/4 ! R_3
         ixt=mod(ixt+2*NLx,NLx);iyt=mod(iyt+2*NLy,NLy);izt=mod(izt+2*NLz,NLz)
  -      itable_sym(3,i)=Lxyz(ixt,iyt,izt)
  +      itable_sym(3,Lxyz(ixt,iyt,izt))=i
       end do
   ! 4. T_4
       do i=1,NL
         ix=Lx(i);iy=Ly(i);iz=Lz(i)
         ixt=ix+NLx/2;iyt=iy+NLy/2;izt=iz
         ixt=mod(ixt+2*NLx,NLx);iyt=mod(iyt+2*NLy,NLy);izt=mod(izt+2*NLz,NLz)
  -      itable_sym(4,i)=Lxyz(ixt,iyt,izt)
  +      itable_sym(4,Lxyz(ixt,iyt,izt))=i
       end do
   ! 5. T_3*T_3
       do i=1,NL
  
positive.code:     do i=1,NL
        ix=Lx(i);iy=Ly(i);iz=Lz(i)
        ixt=iy;iyt=ix;izt=iz ! R_1
        itable_sym(1,i)=Lxyz(ixt,iyt,izt)
      end do
  ! 2. T_2
      do i=1,NL
        ix=Lx(i);iy=Ly(i);iz=Lz(i)
        ixt=-iy;iyt=-ix;izt=iz
        ixt=mod(ixt+2*NLx,NLx);iyt=mod(iyt+2*NLy,NLy);izt=mod(izt+2*NLz,NLz)
        itable_sym(2,i)=Lxyz(ixt,iyt,izt)
      end do
  ! 3. T_3
      do i=1,NL
        ix=Lx(i);iy=Ly(i);iz=Lz(i)
        ixt=-iy;iyt=ix;izt=iz ! R_3
        ixt=mod(ixt+2*NLx,NLx);iyt=mod(iyt+2*NLy,NLy);izt=mod(izt+2*NLz,NLz)
        itable_sym(3,i)=Lxyz(ixt,iyt,izt)
      end do
  ! 4. T_3*T_3
      do i=1,NL
  
negative.code:   end do
  
  ! make symmetry table
  ! table gives the relation between an original point "i"
  ! and a moved position "j" by a symmetry operation; j <+ T*i
    if(Sym == 1)then
    else if((Sym == 8).and.(crystal_structure == 'diamond2')) then
  !=== start diamond(8) ====================================================================
  