character*132 line character*40 flname,FILENAME,outname,imagefile,rflfile character*2 number character*10 base LOGICAL EFLG real*4 crysx,crysy,crysz,cella,cellc,beamx,beamy,oscstrt WRITE(6,*)'PROGRAM TO SUMMARIZE DENZO LOG FILE (FITTING PROGRESS).' WRITE(6,*)' MAKES A TABLE W 1 LINE FOR EACH ITERATION' WRITE(6,*)' GIVING VALUES OF PARAMETERS AND OPTIMIZED VARIABLES' WRITE(6,*)' TABLE IS WRITTEN TO FILE DENZO.PRM' WRITE(6,*)' 940623 revision' WRITE(6,*) 5 write(6,*)' Enter name of denzo log file:' read(5,11) flname 11 format(a40) INQUIRE(FILE=flname, NAME=FILENAME,EXIST=EFLG) IF (.NOT.EFLG) GOTO 5 open(unit=2,file=flname,status='old',readonly,recl=132) c write(6,*)' Enter name for output file:' c read(5,11) outname open(unit=9,file='denzo.prm',status='new') write(9,*)'Denzo log file:',FILENAME write(6,*)'Denzo log file:',FILENAME 30 read(2,31) line 31 format(a132) if (line(1:1).eq.' ') line=line(2:80) if (line(:8).ne.'Film out') goto 30 imagefile=line(20:) cFilm output file : bc29_001.out write(6,*)line(:70) write(9,*)line(:70) write(9,17) write(6,17) 17 format(' x-err y-err p-err crysx crysy crysz cella ', $ 'cellc beamx beamy rados angos xfx xfy xfxy', $ ' skew yscale') 35 read(2,31,end=200) line if (line(1:1).eq.' ') line=line(2:80) c if (line(:13).eq.'spots refined') then if (line(2:13).eq.'pots refined') then c (new cycle starts, so write out old: write(9,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale write(6,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale 141 format( 3f6.2,3f8.3,2f7.2,2f8.3,5f7.3,2f8.5) c write(6,*) line decode(80,351,line)xe,ye 351 format(36x,f7.2,2x,f7.2) c write(6,*)'xe,ye:',xe,ye cSpots refined: 996 Chi**2/#refl: X 2.27 Y 2.56 Pred. decrease: 0.009 * 996 = 9.0 cpartiality refinement: 384 chi**2/#refl: 5.35 pred. decrease: 0.113 * 384 = 43.4 else if (line(:8).eq.'Film out') then write(9,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale write(6,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale write(6,*)line(:70) write(9,*)line(:70) write(9,17) write(6,17) c Starting new film, so zero errors. other param reread. xe=0 ye=0 pe=0 else if (line(:13).eq.'partiality re') then decode(80,41,line) pe 41 format(41x,f7.2) else if (line(:13).eq.'Partiality re') then decode(80,42,line) pe 42 format(39x,f7.2) elseif (line(:5).eq.'CrysZ') then decode(80,51,line) crysz 51 format(22x,f8.3) c write(6,*) line,crysz elseif (line(:5).eq.'CrysY') then decode(80,51,line) crysy c write(6,*) line,crysy elseif (line(:5).eq.'CrysX') then decode(80,51,line) crysx c write(6,*) line,crysx elseif (line(:6).eq.'X beam') then decode(80,81,line) beamx c write(6,*) line,beamx 81 format( 14x,f8.3) elseif (line(:6).eq.'Y beam') then decode(80,81,line) beamy c write(6,*) line,beamy elseif (line(:10).eq.'Real space') then decode(80,101,line) cella,cellc c write(6,*) line,cella,cellc 101 format( 23x,f7.2,17x,f7.2) elseif (line(13:18).eq.'radial') then decode(80,103,line) radoff c write(6,*) line,radoff 103 format( 19x,f8.3) elseif (line(13:19).eq.'angular') then decode(80,105,line) angoff c write(6,*) line,angoff 105 format( 20x,f8.3) elseif (line(:11).eq.'Scaner skew') then decode(80,113,line) skew c write(6,*) line,skew 113 format( 15x,f9.5) c ZO spells scanner diferently in final output; formats value differently: elseif (line(:12).eq.'Scanner skew') then decode(80,119,line) skew c write(6,*) line,skew 119 format( 16x,f12.5) elseif (line(:7).eq.'Y scale') then decode(80,115,line) yscale c write(6,*) line,yscale 115 format( 29x,f9.5) cMAR offset, radial -0.370 shift 0.003 error 0.022 cMAR offset, angular 0.002 shift -0.002 error 0.086 cY scale (relative to X scale) 1.00628 shift 0.00000 error 0.00191 cScaner skewness 0.00447 shift 0.00000 error 0.00196 c12345678901234567890123456789012345678901234567890123456789012345678901234567890 c 1 2 3 4 5 6 7 elseif (line(:12).eq.'Crossfire y ') then decode(80,107,line) xfirey c write(6,*) line,xfirey 107 format( 12x,f9.3) elseif (line(:12).eq.'Crossfire x ') then decode(80,109,line) xfirex c write(6,*) line,xfirex 109 format( 12x,f9.3) elseif (line(:12).eq.'Crossfire xy') then decode(80,111,line) xfirexy c write(6,*) line,xfirexy 111 format( 12x,f9.3) endif goto 35 200 write(9,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale write(6,141) xe,ye,pe,crysx,crysy,crysz,cella,cellc,beamx,beamy, $ radoff,angoff,xfirex,xfirey,xfirexy,skew,yscale close (unit=2) close (unit=9) end cCrossfire y -0.010 shift 0.001 error 0.037 cCrossfire x 0.004 shift -0.001 error 0.037 cCrossfire xy -0.018 shift 0.000 error 0.057 cspots refined: 842 chi**2/#refl: x 1.46 y 1.31 pred. decrease: 0.005 * 842 = 4.1 cCrystal (mis)orientation angles: cCrysZ (beam) axis 29.949 shift 0.002 error 0.142 cX beam coord 90.625 shift -0.001 error 0.022 cY beam coord 88.866 shift 0.000 error 0.022 cMAR offset, radial -0.373 shift -0.001 error 0.089 cMAR offset, angular 0.003 shift 0.000 error 0.091 cReal space unit cell, a 214.01 b 214.01 c 358.89 c alpha 90.00 beta 90.00 gamma 120.00 cReciprocal unit cell, a* 0.005395 b* 0.005395 c* 0.002786 c shifts 0.000000 0.000001 c errors 0.000013 0.000012 c alpha* 90.00 beta* 90.00 gamma* 60.00 c cspots refined: 841 chi**2/#refl: x 1.53 y 1.32 pred. decrease: 0.028 * 841 = 23.7 cCrossfire y -0.010 shift 0.000 error 0.038 cCrossfire x 0.004 shift 0.000 error 0.038 cCrossfire xy -0.010 shift 0.007 error 0.057 cCrystal (mis)orientation angles: cCrysZ (beam) axis 29.944 shift 0.000 error 0.135 cCrysY (vertical) axis 29.018 shift 0.018 error 0.004 cCrysX (spindle) axis -13.293 shift -0.021 error 0.004 cX beam coord 90.623 shift -0.002 error 0.022 cY beam coord 88.867 shift 0.001 error 0.022 cRaw data file : bc26_001.image cSpots refined: 996 Chi**2/#refl: X 2.27 Y 2.56 Pred. decrease: 0.009 * 996 = 9.0 cSpot to weak for refiment when below sigma * 3.0000 cCrystal (mis)orientation angles: cCrysZ (beam) axis -68.489 shift -0.001 error 0.024 cCrysY (vertical) axis -30.990 shift 0.014 error 0.022 cCrysX (spindle) axis 26.003 shift 0.014 error 0.021 cCassette (mis)orientation angles: cCassZ (beam) axis 180.00 cCassY (vertical) axis 0.00000E+00 cCassX (spindle) axis 0.00000E+00 cFilm to crystal distance 350.00 cFilm rotation inside cassette 0.00000E+00 cX beam coord 90.693 shift 0.001 error 0.021 c123456789012345678901234567890123456789012345678901234567890 c0000000001111111111222222222233333333334444444444 cY beam coord 88.799 shift 0.001 error 0.020 ccMAR offset, radial 0.00000E+00 cMAR offset, angular 0.00000E+00 cReal space unit cell, a 217.41 b 217.41 c 378.15 c123456789012345678901234567890123456789012345678901234567890 c0000000001111111111222222222233333333334444444444 c