aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen-sfs
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-03-06 16:15:29 +0100
committerThomas White <taw@physics.org>2012-03-06 16:16:30 +0100
commit8a314b6b40b20bb0d908df0f1af8e2f6292c1b0f (patch)
tree980df632e982bb73b32797458b33465982225e0f /scripts/gen-sfs
parented7337aae441e400e3bafd8c76300fc8a55cf535 (diff)
scripts/gen-sfs: better error handling
Diffstat (limited to 'scripts/gen-sfs')
-rwxr-xr-xscripts/gen-sfs17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/gen-sfs b/scripts/gen-sfs
index 619ac08f..7dec7ee7 100755
--- a/scripts/gen-sfs
+++ b/scripts/gen-sfs
@@ -27,7 +27,10 @@ FORM NGAUSS 5
SYMM $SYMM
END
EOF
-if [ $? -ne 0 ]; then exit 1; fi
+if [ $? -ne 0 ]; then
+ echo "Failed! Please examine gen-sfs.html for more information."
+ exit 1
+fi
echo "Running cad to get the right asymmetric unit..."
cad HKLIN1 ${PDB}.mtz HKLOUT ${PDB}-sorted.mtz >> gen-sfs.html <<EOF
@@ -35,15 +38,23 @@ TITLE Sorted blah
LABIN FILE 1 E1=FC E2=PHIC
CTYPE FILE 1 E1=F E2=P
EOF
-if [ $? -ne 0 ]; then exit 1; fi
+if [ $? -ne 0 ]; then
+ echo "Failed! Please examine gen-sfs.html for more information."
+ exit 1
+fi
echo "Converting structure factors to text..."
mtz2various hklin ${PDB}-sorted.mtz hklout ${PDB}-temp.hkl >> gen-sfs.html <<EOF
LABIN H=H K=K L=L FC=FC PHIC=PHIC
OUTPUT USER '(3I4,2F9.1)'
EOF
-if [ $? -ne 0 ]; then exit 1; fi
+if [ $? -ne 0 ]; then then
+ echo "Failed! Please examine gen-sfs.html for more information."
+ exit 1
+fi
+
rm -f ${PDB}.mtz
+
perl < ${PDB}-temp.hkl > ${PDB}.hkl << WIBBLE
use strict;