program chopg1 character*80 s80,f1,f2 character*160 s160 write(6,*)' Chops off Gaussian TDDFT output for RNSOS' if(iargc().ne.2)call report('usage: chopg1 file_inp file_out') call getarg(1,f1) call getarg(2,f2) open(2,file=f1) open(3,file=f2) c c find root 2 read(2,200)s80 200 format(a80) if(s80(2:2).ne.'#')goto 2 write(3,200)s80 c 1 read(2,400,err=888,end=999)s160 400 format(a160) ln1=161 3 ln1=ln1-1 if(s160(ln1:ln1).eq.' '.and.ln1.gt.1)goto 3 write(3,401)(s160(ii:ii),ii=1,ln1) 401 format(160a1) c c skip cores if(s160(2:17).eq.'Core hamiltonian')then 4 read(2,200,err=888,end=999)s80 if(s80(2:10).ne.'SCF Done:')goto 4 write(3,200)s80 endif c c skip density matrices if(s160(1:22).eq.' Alpha density matrix:')then 6 read(2,200,err=888,end=999)s80 if(s80(13:22).ne.'Population')goto 6 write(3,200)s80 endif c goto 1 c 999 close(2) close(3) goto 777 888 write(6,*)'error in chopg' 777 stop end subroutine report(s) character*(*) s write(6,*)s stop end