#!/bin/csh -f # # phs2mtz # ------- # # C-shell script to convert phs-file produced by SHELXE # into mtz-format. For running this script, you need to # have the CCP4-programs 'f2mtz' and 'cad' in your path. # # Before running the script you have to adjust the unit # cell parameters and the space group to the appropriate # values. # # (C) Thomas R. Schneider, 22-Oct-2004 # ########################################################## echo "" echo " Converting $1 ... " echo "" if (-e $1) then echo " The file $1 is available" else echo " The file $1 is not available (did you use the extension ?)" echo "" exit endif # Check for programs foreach v (f2mtz cad) echo -n " Checking for $v " if (`which $v | grep -ci "not found"`) then echo " - not found " echo " Exiting. " echo "" exit else echo " - found. OK. " endif end # Run f2mtz echo "" echo " Running f2mtz" f2mtz hklin $1 hklout $1:r.mtz > t_$1:r_f2mtz.log < t_$1:r_cad.log < Logs are in t_$1:r_*.log" echo " -> Data are in $1:r.cad " echo ""