anchor.diff:             lat(k,k) = latv(k)
            end do
          end if
  -       if(any(lat.lt.0)) then
  -          message = "problems with lattice input"
  -          goto 911
  -       end if
   c      maximum radius
          if(rmax.lt.0) then
            message = "please provide rmax"
  
positive.code: c      set some default values
  c      --------------------------------------------      
         fn_in = 10
         fn_out = 11
         nfrm = 0
         aformat = " "
         overb = .false.
  
negative.code:        nf = 0
         do
           if(aformat.eq."trj") then
             call trj_read(fn_in,n,c,lat1,ok)
           else if(aformat.eq."xyz")  then
             call xyz_read(n,c,atag,fn_in)
             ok=n.ne.0
             lat1=lat
           end if
  c        check lattice
           if(any(lat1.lt.0)) then
              message = "problems with lattice input"
              goto 911
           end if
           if(.not.ok) exit
           oc1=.false.
  