From 32d6d83a69b852170ba56f40f2e3d0b7536b34fb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 9 Feb 2013 17:34:15 -0800 Subject: MOSFLM returns 'hexagonal H' if we ask for 'rhombohedral R'. Growl. --- libcrystfel/src/mosflm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 43bfdea6..9b1e36e3 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -150,9 +150,30 @@ static int check_cell(struct mosflm_private *mp, struct image *image, } if ( mp->indm & INDEXING_USE_LATTICE_TYPE ) { + LatticeType latt; + char cen; + latt = cell_get_lattice_type(mp->template); + cen = cell_get_centering(mp->template); + + /* If we ask MOSFLM for 'rhombohedral R', it gives us + * 'hexagonal H' back. Grumble. Time to fix that up... */ + if ( latt == L_RHOMBOHEDRAL ) { + + UnitCell *fixup; + assert(cen == 'R'); + cell_set_lattice_type(out, L_HEXAGONAL); + cell_set_centering(out, 'H'); + fixup = uncenter_cell(out, NULL); + cell_free(out); + out = fixup; + + } + cell_set_lattice_type(out, latt); + cell_set_centering(out, cen); + } crystal_set_cell(cr, out); -- cgit v1.2.3