From 5d9cd6f40e08f498cc6ff852a6aba9d9b569fd20 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 24 Mar 2014 13:15:37 +0100 Subject: get_ambiguities() should not return the identity operation --- libcrystfel/src/symmetry.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index 47ba088b..67298ec1 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -1511,6 +1511,7 @@ SymOpList *get_ambiguities(const SymOpList *source, const SymOpList *target) SymOpList *tgt_reordered; SymOpMask *used; char *name; + int have_identity = 0; n_src = num_ops(source); n_tgt = num_ops(target); @@ -1569,7 +1570,16 @@ SymOpList *get_ambiguities(const SymOpList *source, const SymOpList *target) free_symoplist(src_reordered); return NULL; } - add_symop(twins, intmat_copy(src_reordered->ops[i])); + if ( !intmat_is_identity(src_reordered->ops[i]) ) { + add_symop(twins, intmat_copy(src_reordered->ops[i])); + } else { + have_identity = 1; + } + + } + + if ( !have_identity ) { + ERROR("WARNING: Identity not found during left coset decomp\n"); } free_symopmask(used); -- cgit v1.2.3