Generate XDS.INP: Difference between revisions

xds_graph.sh will now run xdsstat, if available, and display Rmeas and Rd per image.
mNo edit summary
(xds_graph.sh will now run xdsstat, if available, and display Rmeas and Rd per image.)
Line 392: Line 392:
# revision 0.25 . KD 3/2012 - remove revision 0.22 for PSI Pilatus 2M; see http://www.globalphasing.com/autoproc/wiki/index.cgi?TroubleShootingKnownIssues
# revision 0.25 . KD 3/2012 - remove revision 0.22 for PSI Pilatus 2M; see http://www.globalphasing.com/autoproc/wiki/index.cgi?TroubleShootingKnownIssues
# revision 0.26 Oliver Clarke 10/12 - Added generation of shell scripts for conversion to MTZ and visualisation of statistics. Other minor alterations to XDS.INP.
# revision 0.26 Oliver Clarke 10/12 - Added generation of shell scripts for conversion to MTZ and visualisation of statistics. Other minor alterations to XDS.INP.
REVISION="0.26 (18-Oct-2012)"                                                                                 
# revision 0.27 Oliver Clarke 10/12 - xds_graph.sh will now run xdsstat, if available, and plot Rmeas and Rd per image.
REVISION="0.27 (19-Oct-2012)"                                                                                 
#                                                                                                             
#                                                                                                             
# usage: e.g. xds_generate_all "frms/mydata_1_???.img"                                                       
# usage: e.g. xds_generate_all "frms/mydata_1_???.img"                                                       
Line 429: Line 430:
X_RAY_WAVELENGTH=XXX  
X_RAY_WAVELENGTH=XXX  
X_RAY_ENERGY=XXX
X_RAY_ENERGY=XXX
STARTING_ANGLE=XXX
QX=XXX                                                                                                           
QX=XXX                                                                                                           
QY=XXX                                                                                                           
QY=XXX                                                                                                           
Line 499: Line 501:
   PHIEND=$(od -t dI -j $SKIP -N 4 $FIRSTFRAME | head -1 | awk '{print $2}')   
   PHIEND=$(od -t dI -j $SKIP -N 4 $FIRSTFRAME | head -1 | awk '{print $2}')   
   OSCILLATION_RANGE=`echo "scale=3; ($PHIEND-($PHISTART))/1000" | bc -l`                         
   OSCILLATION_RANGE=`echo "scale=3; ($PHIEND-($PHISTART))/1000" | bc -l`                         
                                                                                               
  STARTING_ANGLE=`echo "scale=3; ($PHISTART/1000)" | bc -l`
                                                                                             
   let SKIP=1024+256+128+256+128+4                                                                 
   let SKIP=1024+256+128+256+128+4                                                                 
   QX=$(od -t dI -j $SKIP -N 4 $FIRSTFRAME | head -1 | awk '{print $2}')       
   QX=$(od -t dI -j $SKIP -N 4 $FIRSTFRAME | head -1 | awk '{print $2}')       
Line 543: Line 546:
       # find NX, QX, ORGX and ORGY:
       # find NX, QX, ORGX and ORGY:
       X_RAY_ENERGY=`echo "12398.5/$X_RAY_WAVELENGTH" | bc -l | awk '{printf "%5.1f", $1}'`
       X_RAY_ENERGY=`echo "12398.5/$X_RAY_WAVELENGTH" | bc -l | awk '{printf "%5.1f", $1}'`
      STARTING_ANGLE=`grep PHI tmp2 | sed s/PHI=//`
       NX=`grep SIZE1 tmp2 | tail -1 | sed s/SIZE1=//`
       NX=`grep SIZE1 tmp2 | tail -1 | sed s/SIZE1=//`
       QX=`grep PIXEL_SIZE tmp2 | sed s/PIXEL_SIZE=//`
       QX=`grep PIXEL_SIZE tmp2 | sed s/PIXEL_SIZE=//`
Line 876: Line 880:
tail -f -n1 INTEGRATE_STATS.LP &
tail -f -n1 INTEGRATE_STATS.LP &
exec > INTEGRATE_STATS.LP 2>&1
exec > INTEGRATE_STATS.LP 2>&1
if command -v xdsstat >/dev/null; then
echo \"\" | xdsstat > XDSSTAT.LP
echo \"\" | xdsstat 100 6 > XDSSTAT.LP_low
echo \"
\\\$TABLE:Rmeas vs image (to 6A):
\\\$SCATTER:Rmeas vs image for low resolution reflections:A:1,2: \\$\\$
IMAGE RMEAS
\\$\\$ \\$\\$
\"
grep ' L\$' XDSSTAT.LP_low | awk '{print \$1,\$9}'
echo \" \\$\\$ \"
echo \"
\\\$TABLE:Rmeas vs image (all):
\\\$SCATTER:Rmeas vs image (all reflections):A:1,2: \\$\\$
IMAGE RMEAS
\\$\\$ \\$\\$
\"
grep ' L$' XDSSTAT.LP | awk '{print \$1,\$9}'
echo \" \\$\\$ \"
echo \"
\\\$TABLE:Rd vs image (to 6A):
\\\$SCATTER:Rd (from XDSSTAT) for low resolution reflections:A:1,2: \\$\\$
IMAGE RD
\\$\\$ \\$\\$
\"
grep 'DIFFERENCE' XDSSTAT.LP_low | awk '{print \$1,\$7}'
echo \" \\$\\$ \"
echo \"
\\\$TABLE:Rd vs image (all):
\\\$SCATTER:Rd (from XDSSTAT) for all reflections:A:1,2: \\$\\$
IMAGE RD
\\$\\$ \\$\\$
\"
grep 'DIFFERENCE' XDSSTAT.LP | awk '{print \$1,\$7}'
echo \" \\$\\$ \"
fi
echo \"
echo \"
\\\$TABLE: XDS Integration Statistics :
\\\$TABLE: XDS Integration Statistics :
Line 976: Line 1,017:
     Two shell scripts have been generated that may be of use.  
     Two shell scripts have been generated that may be of use.  


     The first, xds_graph.sh, will plot various statistics after an XDS run.  
     The first, xds_graph.sh, will plot various statistics after an XDS run.
     After both INTEGRATE and CORRECT have finished, run it by typing \"./xds_graph.sh\"  
     After both INTEGRATE and CORRECT have finished, run it by typing \"./xds_graph.sh\"  
     without the quotation marks. This script uses loggraph to plot data, so you will
     without the quotation marks. This script uses loggraph to plot data, so you will
     need CCP4 to see the graphical output. All the raw data is piped out to a log file,
     need CCP4 to see the graphical output. All the raw data is piped out to a log file,
     INTEGRATE_STATS.LP.
     INTEGRATE_STATS.LP.
    If XDSSTAT is present in your path, xds_graph will also plot some of the statistics it
    calculates - specifically the Rmeas and Rd per image, for all reflections and only
    low resolution reflections.


     The second script, xds_to_ccp4.sh, will take XDS_ASCII.HKL and generate both a CCP4
     The second script, xds_to_ccp4.sh, will take XDS_ASCII.HKL and generate both a CCP4
7

edits