program chopg character*80 s80,fn character*160 s160 character*2 s2 open(2,file='LOG') read(2,200)fn 200 format(a80) close(2) is=0 5 is=is+1 if(fn(is:is).ne.' ')goto 5 open(2,file='tem.out') open(3,file=fn(1:is-1)//'.GOT') c c find root 2 read(2,200)s80 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