From 184a21098ac1325c2c02a24ac315584a464532a7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 23 Aug 2019 12:21:00 +0200 Subject: Fix Niggli reduction logic --- libcrystfel/src/cell-utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index 2af3f293..6e7cebb5 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -1893,9 +1893,10 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel) debug_lattice(g, eps, 1); + } - } else if ( GT(g.B, g.C) - || (EQ(g.B, g.C) && GT(fabs(g.E), fabs(g.F))) ) + if ( GT(g.B, g.C) + || (EQ(g.B, g.C) && GT(fabs(g.E), fabs(g.F))) ) { /* Swap b and c */ double temp; @@ -1909,6 +1910,8 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel) mult_in_place(T, M); debug_lattice(g, eps, 2); + + /* ..."and go to 1." */ done_s1s2 = 0; } -- cgit v1.2.3