anchor.diff:         dr = rmax/nb
   c      g(r) array
          allocate(gr(nb))
  +       allocate(grs(nb))
          gr = 0
  +       grs = 0.0d0
   c      get reciprocal lattice vectors 
          call smd_lat_invrt(lat,rlat)
          write(*,*) "Inverse Lattice vectors"
  
positive.code:       
  135    continue
          write(*,*) "Number of frames processed",nf
  
         open(12,file="gr.dat",
       $            form='formatted',status='unknown')
  
  
negative.code:          rl = real(k-1)*dr
           ru = rl+dr
           norm = const*(ru**3-rl**3)
           sum = sum + grs(k)*x
  c         write(12,'(i5,F12.6,I5,F12.6,F12.6)') 
  c     >             k,ru,gr(k),sum,real(gr(k))*x/norm
           write(12,'(3F12.6)') 
       >             ru,real(grs(k))*x/norm,sum
         end do
         return
  c      error section
  