#! /bin/csh -f # # C shell program to filter CRYLSQ output file awk ' BEGIN { control=0 ; atoms = 0 \ params = 0 ; extmin = 1000.} \ /CRYLSQ CONTROL PARAMETERS/ {control = 15}\ { if (control > 0) { \ if ( $1 == "NUMBER" ) cycles = $4 \ else if ( $1 == "REFINEMENT" ) extinc = $6 \ else if ( $1 == "WEIGHTING" ) weights = $3 \ control-- }\ }\ /PARAMETERS AFTER CYCLE/ {if ($4 == cycles) params = 8}\ { if (params > 0) {\ if (params == 2) {skf = $2 ; if (extinc != "NO") extf=$3 }\ if (params == 1) {skfsig =$2; if (extinc != "NO") extfsig=$3 }\ params-- \ if (params == 0) {atoms = 1} }\ }\ /UIJ MATRIX/ { if (atoms == 1) print "UIJ MATRIX for "$5" is npd" } \ { if (atoms == 1) \ { if ($2 == "OLD") {\ U11= $6 ; U22 = $7 ;U33=$8\ if (U11 > 1.0 || U22 >1.0 || U33 >1.0)\ {print "large vibrations for atom " $1 }\ }\ }\ }\ /MAXIMUM SHIFT.ERROR/ { atoms = 0 } \ END { print "Number of cycles ",cycles \ print "refine extinction ",extinc \ print "weighting scheme ",weights \ print "extinction parameter " extf*10000. "(" extfsig*10000. ")" \ print "scale factor is " 1/skf "(" skfsig/ skf/skf")" } ' $1.lst # # # awk ' BEGIN { rfacta=1000 ; wrfacta=1000 ; \ sflist = 0 ; params = 0 ; extmin = 1000.} \ /MAXIMUM SHIFT.ERROR/ { sflist = 1} \ { if (sflist == 1) \ { items= split($0,parts,FS)\ lindx = substr($0,10,4) \ if (items ==16 && $10 < extmin)\ {extmin=$10;hind=$1;kind=$2 ; lind= lindx}\ else if (items ==17 && $11 < extmin)\ {extmin=$11;hind=$1;kind=$2 ; lind= lindx}\ }\ }\ /STRUCTURE FACTOR SUMS/ {cycle = $6 ; sflist = 0} \ /Goodness of fit S/ { gof = $6 }\ /Sigma on g.o.f. S/ { sgof = $6 }\ /Number of variables/ {vars = $4 }\ /Number of reflections/ {refst= $4 ; rcodref = $6}\ /R-factor .using .F../ { rfactb = $5\ if (rfactb <= rfacta) {rfacta= rfactb}\ else print "R-factor increasing" }\ /wR-factor .using .Y../ { wrfactb = $5\ if (wrfactb <= wrfacta) {wrfacta= wrfactb}\ else print "weighted R-factor increasing" }\ /MIN.MAX DENSITY VALUES/ {dmax= $5 ; dmin = $4} \ /MEAN ESD OF DENSITY/ {dsig = $5}\ END { print "Min y value is " extmin*extmin" for " hind",",kind","lind\ print " R-factor is " rfactb \ print "wR-factor is " wrfactb \ print "gof is " gof "(" sgof ")" \ print "numb of vars " vars \ print "numb of refs " refst "(" rcodref ")" \ print "density min max sigma " dmin ", " dmax " ("dsig ")" } ' $1.lst # # exit # quit