program turbog character*80 filename,st parameter (n0=100) dimension d(100,3),a(100,3),v(100,3),w(100) c write(6,*)' Reading of GAUSSIAN 98 output' write(6,*)' Writing spectrum into TURBO.TAB' write(6,*)' Filename:' read(5,'(a)')filename open(7,file=filename,status='old') c 1 read(7,8,end=8001)st 8 format(A80) if(st(1:24).ne.' Ground to excited state')goto 1 c c dipole: read(7,*) itr=0 8080 read(7,8)st if(st(2:5).eq.' ')then itr=itr+1 if(itr.gt.n0)then write(3,*)'too many transitions' goto 8001 endif backspace 7 read(7,*)id,d(itr,1),d(itr,2),d(itr,3) goto 8080 endif c c velocity: read(7,*) do 8003 i=1,itr 8003 read(7,*)id,v(i,1),v(i,2),v(i,3) c c magnetic: read(7,*) read(7,*) do 8004 i=1,itr 8004 read(7,*)id,a(i,1),a(i,2),a(i,3) c write(6,*)itr,' transitions found' c ii=0 8005 read(7,8,end=8001)st if(st(1:15).eq.' Excited State ')then ii=ii+1 w(ii)=xs(st(49:57)) endif if(ii.lt.itr)goto 8005 c write(6,*)' energies found' c open(8,file='TURBO.TAB') write(8,8000)filename 8000 format(A80,/,'transition e(nm) DS (D^2) ', 1' Rv (D^2) Rr', 1/,60(1h-)) do 8008 ii=1,itr ds=d(ii,1)*d(ii,1)+d(ii,2)*d(ii,2)+d(ii,3)*d(ii,3) rs=d(ii,1)*a(ii,1)+d(ii,2)*a(ii,2)+d(ii,3)*a(ii,3) rv=v(ii,1)*a(ii,1)+v(ii,2)*a(ii,2)+v(ii,3)*a(ii,3) ds=ds*2.541765d0**2 rs=rs*2.541765d0**2 rv=rv*2.541765d0**2 8008 write(8,8007)ii,w(ii),ds,rv,rs 8007 format(I4,f12.2,3G15.6) write(8,9) 9 format(60(1h-)) close(8) write(6,*)'TURBO.TAB written' c 8001 close(7) write(6,*)'end of file' stop end function xs(s) real xs character*(*) s rewind 9 write(9,*)s rewind 9 read(9,*)a xs=a return end