aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorCornelius Gati <cgati@cfelsgi.desy.de>2013-02-19 15:11:18 +0100
committerCornelius Gati <cgati@cfelsgi.desy.de>2013-02-19 15:11:18 +0100
commit37747e4e80d98a0c8d2e1baa32c9524608009536 (patch)
tree7cb04244fc1df88ca7517a46aa8d7c97afdb7d43 /libcrystfel
parent29d992a05fc1ed56274a2af9078c1b16bd2d2ab2 (diff)
XDS.INP
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/xds.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c
index 84cf828a..a70caaf5 100644
--- a/libcrystfel/src/xds.c
+++ b/libcrystfel/src/xds.c
@@ -452,7 +452,7 @@ static const char *spacegroup_for_lattice(UnitCell *cell)
}
assert(g != NULL);
- return g;
+ return 0;
}
@@ -464,7 +464,7 @@ static int write_inp(struct image *image, struct xds_private *xp)
fh = fopen("XDS.INP", "w");
if ( !fh ) {
ERROR("Couldn't open XDS.INP\n");
- return 1;
+ return 0;
}
fprintf(fh, "JOB= IDXREF\n");
@@ -478,8 +478,9 @@ static int write_inp(struct image *image, struct xds_private *xp)
fprintf(fh, "SPOT_RANGE=1 1\n");
fprintf(fh, "SPACE_GROUP_NUMBER= %s\n",
spacegroup_for_lattice(xp->cell));
+ printf("%s\n", spacegroup_for_lattice(xp->cell));
cell_get_parameters(xp->cell, &a, &b, &c, &al, &be, &ga);
- fprintf(fh, "UNIT_CELL_CONSTANTS= %.6f %.6f %.6f %.6f %.6f %.6f P\n",
+ fprintf(fh, "UNIT_CELL_CONSTANTS= %.2f %.2f %.2f %.2f %.2f %.2f\n",
a*1e10, b*1e10, c*1e10,rad2deg(al), rad2deg(be), rad2deg(ga));
//fprintf(fh, "SPACE_GROUP_NUMBER= 0\n");
//fprintf(fh, "UNIT_CELL_CONSTANTS= 0 0 0 0 0 0\n");
@@ -524,7 +525,9 @@ int run_xds(struct image *image, IndexingPrivate *priv)
xds->target_cell = xp->cell;
- if ( write_inp(image, xp) ) {
+ write_inp(image, xp);
+
+ if ( write_inp == NULL ) {
ERROR("Failed to write XDS.INP file for XDS.\n");
return 0;
}