program readqa c reads QGRAD.OUT and writes params into table character*80 s80 parameter (is0=2000,ip0=30) dimension p(is0,ip0) open(4,file='QGRAD.OUT') is=0 nt=0 ntm=0 ir=0 1 read(4,4000,err=2,end=2)s80 4000 format(a80) if(s80(1:22).eq.' ------------ Step')then if(is.gt.0.and.nt.eq.0)goto 1 is=is+1 nt=0 endif if(is.gt.is0)then write(6,*)'too many steps' close(4) stop endif if(s80(1:23).eq.' Step will be reduced.')then is=is-1 ir=ir+1 endif if(s80(4:10).eq.'torsion')then nt=nt+1 if(nt.gt.ip0)then write(6,*)'too many parameters' close(4) stop endif open(5,file='scr') write(5,4001)s80(35:46) 4001 format(a11) rewind 5 read(5,*)p(is,nt) close(5) if(nt.gt.ntm)ntm=nt endif goto 1 2 close(4) write(6,*)is,' steps, ',ir,' reduced, ',ntm,' parameters' open(4,file='PAR.LST') do 3 i=1,is 3 write(4,3000)i,(p(i,j),j=1,ntm) 3000 format(i5,30f9.2) close(4) write(6,*)'PAR.LST written' stop end