c============================================================
c  prests2
c   Program for calculating transition energy in F08E
c   Prests is an abbreviation of Pre-Slater-Transition-State.
c    1992.01.16  Version 1.0   written by G.Sakane
c    2004.10.16  Version 1.1 
c============================================================
      program prests2
      integer numsym(10000),numsym2(10000)
      character*5 sym(10000),updown(10000),sym2(10000),
     &updown2(10000)
      double precision tenm(10000),teev(10000),tecm(10000),
     &tenm2(10000)
      open (unit=28, form='formatted', status='old',
     &      access='sequential', file='prests.nm')
      open (unit=38, form='formatted', status='unknown',
     &      access='sequential', file='prests.nm2')
      do 10 i=1,10000
      read(28,1005,err=11,end=13) tenm(i),numsym(i),sym(i),
     &updown(i),numsym2(i),sym2(i),updown2(i),teev(i),
     &tecm(i),tenm2(i)
      write(38,1003) numsym(i),sym(i),updown(i),numsym2(i),
     &sym2(i),updown2(i),teev(i),tecm(i),tenm2(i)
   10 continue
   11 write(*,1002)
   13 continue
 1002 format('*** Read Error ***')
 1003 format(1x,i4,1x,a5,1x,a5,1x,'==>',i4,1x,a5,1x,a5,1x,f6.3,2x,
     &f7.1,1x,f8.1)
 1005 format(f8.1,1x,i4,1x,a5,1x,a5,4x,i4,1x,a5,1x,a5,1x,
     &f6.3,2x,f7.1,1x,f8.1)
      end
