diff options
author | Thomas White <taw@physics.org> | 2013-02-15 10:50:08 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-02-15 10:50:38 +0100 |
commit | 9b4ab9508f4721c19f58c5f29dbe47736602fd12 (patch) | |
tree | f9a2a446b4f8f22fccd9f182135e25902f7f42a2 | |
parent | 0cda27a3fdfbfb45f3433d9dce541adb79a8762a (diff) |
Use "CRYSTAL R" to avoid having to uncenter the unit cell from MOSFLM
-rw-r--r-- | libcrystfel/src/mosflm.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 22606fa4..0e00993a 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -162,23 +162,20 @@ static int check_cell(struct mosflm_private *mp, struct image *image, latt_m = cell_get_lattice_type(out); cen_m = cell_get_centering(out); - /* If we ask MOSFLM for 'rhombohedral R', it gives us - * 'hexagonal H' back. Grumble. Time to fix that up... */ - if ( (latt_r == L_RHOMBOHEDRAL) && (latt_m == L_HEXAGONAL) ) { - - UnitCell *fixup; - - assert(cen_r == 'R'); - assert(cen_m == 'H'); - - /* Mercifully, MOSFLM seems to use the obverse setting - * for this transformation, which is the same as - * uncenter_cell(). Otherwise, this would have to be - * done by a separate routine. */ - fixup = uncenter_cell(out, NULL); - cell_free(out); - out = fixup; + if ( latt_r != latt_m ) { + ERROR("Lattice type produced by MOSFLM (%i) does not " + "match what was requested (%i). " + "Please report this.\n", latt_m, latt_r); + crystal_free(cr); + return 0; + } + if ( cen_r != cen_m ) { + ERROR("Centering produced by MOSFLM (%c) does not " + "match what was requested (%c). " + "Please report this.\n", cen_m, cen_r); + crystal_free(cr); + return 0; } } @@ -511,9 +508,16 @@ static void mosflm_send_next(struct image *image, struct mosflm_data *mosflm) && (mosflm->mp->template != NULL) ) { const char *symm; + + if ( cell_get_lattice_type(mosflm->mp->template) + == L_RHOMBOHEDRAL ) { + mosflm_sendline("CRYSTAL R\n", mosflm); + } + symm = spacegroup_for_lattice(mosflm->mp->template); snprintf(tmp, 255, "SYMM %s\n", symm); mosflm_sendline(tmp, mosflm); + } else { mosflm_sendline("SYMM P1\n", mosflm); } |