diff options
author | Thomas White <taw@physics.org> | 2014-03-24 13:15:37 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-03-24 13:20:29 +0100 |
commit | 5d9cd6f40e08f498cc6ff852a6aba9d9b569fd20 (patch) | |
tree | 1ae45c136073907ee1a5d8a582027dba068117b8 /libcrystfel/src | |
parent | f50355434a331e1480f30086789fa61a2c1af991 (diff) |
get_ambiguities() should not return the identity operation
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/symmetry.c | 12 |
1 files changed, 11 insertions, 1 deletions
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); |