C----------------------------------------------------------------------------- c c P M I X C - Extraction of data from an EGY output file for use in C a contour plot of mixing coefficients C C----------------------------------------------------------------------------- C C Input is from an .EGY file from SPCAT, and quantisation has to be C J,Ka,Kc,v C C Output is in the form of .OUT files for use by the .gle routine C FITZ, which converts those to contour files .Z C Each line in the .OUT is C Ka, J, 1-Pmix C C The number of .OUT files and the maximum value of J depends C on the contents of the .EGY file, while maximum Ka is hardcoded C by MAXKOUT in the PARAMETER statement. C C C Version 22a.XI.2011 ----- Zbigniew KISIEL ----- C C __________________________________________________ C | Institute of Physics, Polish Academy of Sciences | C | Al.Lotnikow 32/46, Warszawa, POLAND | C | kisiel@ifpan.edu.pl | C | http://info.ifpan.edu.pl/~kisiel/prospe.htm | C_________________________/-------------------------------------------------- C C C Modification history: C C 22.11.11: creation by hacking away at PMIX C C=========================================================================== c implicit real*8 (a-h,o-z) c parameter (maxj=300, maxk=maxj, maxv=10, maxkout=30) c integer nvlev(maxv),jvmax(maxv) real*8 cmix(maxj,maxk,maxv) character line*100,filin*50,ivc c WRITE(*,3344) 3344 FORMAT(1X//' ',76('_')/' |',T79,'|'/ * ' | PMIXC - Extraction of mixing coefficient data from EGY ', * 'output file',T79,'|'/ * ' | for use in a GLE contour plot',T79,'|'/ * ' |',76('_'),'|'/' version 22a.XI.2011',T64,'Zbigniew KISIEL'/) c c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c...Read the EGY file, assuming that leading quantum numbers are three c asymmetric rotor qns followed by the vibrational identifier c 2 write(*,1)' Name of the EGY file:' 1 format(1x//1x,a,' ',$) read(*,'(a)',err=2)filin open(3,file=filin,err=2,status='old') c c older: c c364 122 1682.981020 0.276285 0.644081 362: 90 62 28 2 c c 2007: c c 1 2 21.008525 0.006859 0.863177 4: 0 0 0 1 c 262 161 3682.729014 0.001914 0.967439 261:130 19111 3 c maxiv1=0 do 11 n=1,maxv nvlev(n)=0 jvmax(n)=0 do 11 nn=1,maxj do 11 nnn=1,maxj cmix(nn,nnn,n)=0.d0 11 continue c 5 read(3,'(a)',end=6,err=5)line if(line(62:62).eq.':')read(line(63:74),'(4i3)',err=5)j,ka,kc,iv if(line(64:64).eq.':')read(line(65:76),'(4i3)',err=5)j,ka,kc,iv c if(j.gt.maxj)then write(*,3)j,maxj 3 format(1x//'**** ERROR: data contains j=',i4/ * ' current limit is j=',i4//) stop endif c if(iv+1.gt.maxv)then write(*,4)iv,maxv-1 4 format(1x//'**** ERROR: data contains v=',i4/ * ' current limit is v=',i4//) stop endif c if(line(62:62).eq.':')read(line(46:56),'(f11.6)',err=5)pmix if(line(64:64).eq.':')read(line(48:58),'(f11.6)',err=5)pmix c c...NOTE: iv is now made to be v+1 in order to avoid starting indexing from 0 c j is now made to be j+1 in order to avoid starting indexing from 0 c k is now made to be k+1 in order to avoid starting indexing from 0 c iv1=iv+1 j1=j+1 ka1=ka+1 c nvlev(iv1)=nvlev(iv1)+1 if(jvmax(iv1).lt.j)jvmax(iv1)=j nn=nvlev(iv1) cm=1.d0-pmix c if(cmix(j1,ka1,iv1).lt.cm)cmix(j1,ka1,iv1)=cm if(iv1.gt.maxiv1)maxiv1=iv1 c goto 5 c 6 write(*,'(1x)') write(*,7)((i-1,nvlev(i),jvmax(i)),i=1,maxiv1) 7 format(' state v=',i2,': no of levels=',i6,' maxJ=',i3) close(3) c c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c...Generate data files for the plot c do 12 iv1=1,maxiv1 c iv=iv1-1 write(ivc,'(i1)')iv open(11,file='pm_v'//ivc//'.out',status='unknown') write(11,15) 15 format('!'/'! Ka J 1-Pmix'/'!'/ * '! * * * '/'!') c do 10 ka1=1,maxkout+1 do 10 j1=1,jvmax(iv1)+1 j=j1-1 ka=ka1-1 c write(11,30)ka,j,cmix(j1,ka1,iv1) c 10 continue 30 format(2i5,f15.6) c close(11) c 12 continue c 9 stop end C_____________________________________________________________________________ C_____________________________________________________________________________