cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     xyz2p
c     Converts binary xyz format to post format.

      character*4 id(2)
      character*80 ifile,ofile
      real post(8),xyz(3)

      data post/8*0.0/
      data id/'    ','    '/

      print*,'*Give input xyz file:'
      read 800, ifile
800   format(a80)
      open(10, file=ifile, form='unformatted', status='old')
      print*,'*Give output post file name: '
      read 800, ofile
      open(11, file=ofile, form='unformatted', status='new')

c      write(*, 801)
c801   format(/' Which post option goes to z? [1 to 6]:  '$)
c      read *,ipick
c      ipick=ipick+2

 30   read(10,end=90) xyz
      post(1)=xyz(1)
      post(2)=xyz(2)
      post(3)=xyz(3)
      write(11) id,post
      go to 30

 90   close(10)
      close(11)
      return
      end



