aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen-sfs-expand
diff options
context:
space:
mode:
authorChuck <chuck@cfel-chuck.desy.de>2014-05-23 11:31:10 +0200
committerThomas White <taw@physics.org>2014-05-23 20:46:59 +0200
commitfb98f51efea510f351ef4a3d3fb75541b45d736a (patch)
tree1aba5060a46d3e6347d862443332f613f8041de6 /scripts/gen-sfs-expand
parentd7f3beb9fdbce11539fe5dec1c7db372d736f4f0 (diff)
new reflection list format
Diffstat (limited to 'scripts/gen-sfs-expand')
-rwxr-xr-xscripts/gen-sfs-expand22
1 files changed, 17 insertions, 5 deletions
diff --git a/scripts/gen-sfs-expand b/scripts/gen-sfs-expand
index edc3ee1d..baadbf27 100755
--- a/scripts/gen-sfs-expand
+++ b/scripts/gen-sfs-expand
@@ -3,9 +3,14 @@
PDB=$1
SYMM=$2
RESOLUTION=$3
+PG=$4
if [ "x$PDB" = "x" ]; then
- echo "Syntax: $0 <PDB file> <space group> [<resolution>]"
+ echo "Syntax: $0 <PDB file> <space group> [<resolution>] [<point group>]"
+ echo
+ echo "The space group and point group must be consistent, it's just"
+ echo "that I don't know how to convert the space group to a point"
+ echo "group."
exit
fi
@@ -19,6 +24,11 @@ if [ "x$RESOLUTION" = "x" ]; then
RESOLUTION=3
fi
+if [ "x$PG" = "x" ]; then
+ echo "Point group not given. Output will not contain symmetry information."
+ PG=unknown
+fi
+
echo "Running sfall to calculate structure factors..."
sfall XYZIN $PDB HKLOUT ${PDB}.mtz > gen-sfs.html << EOF
MODE SFCALC XYZIN
@@ -32,7 +42,6 @@ if [ $? -ne 0 ]; then
exit 1
fi
-
echo "Running cad to get the right asymmetric unit..."
cad HKLIN1 ${PDB}.mtz HKLOUT ${PDB}-sorted.mtz >> gen-sfs.html <<EOF
TITLE Sorted blah
@@ -71,7 +80,10 @@ use strict;
my \$line;
open(FILE, "${PDB}-temp.hkl");
-printf(" h k l I phase sigma(I) counts fs/px ss/px\\n");
+printf("CrystFEL reflection list version 2.0\n");
+printf("Symmetry: ${PG}\n");
+
+printf(" h k l I phase sigma(I) nmeas\n");
while ( \$line = <FILE> ) {
@@ -83,8 +95,8 @@ while ( \$line = <FILE> ) {
my \$intensity = \$4*\$4; # Square to convert F->I
my \$phase = \$5;
- printf("%3i %3i %3i %10.2f %8.2f %10.2f %7i %6.1f %6.1f\n",
- \$h, \$k, \$l, \$intensity, \$phase, 0.0, 1, 0.0, 0.0);
+ printf("%4i %4i %4i %10.2f %8.2f %10.2f %7i\n",
+ \$h, \$k, \$l, \$intensity, \$phase, 0.0, 1);
} else {
printf(STDERR "Couldn't understand line '%s'\n", \$line);