From 89a309c13b57011930ed452d1c3a1cd350f67bcb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 20 Sep 2011 13:41:56 +0200 Subject: Work on symmetry_check --- tests/symmetry_check.c | 92 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 14 deletions(-) (limited to 'tests/symmetry_check.c') diff --git a/tests/symmetry_check.c b/tests/symmetry_check.c index 41e900b1..7beb51b8 100644 --- a/tests/symmetry_check.c +++ b/tests/symmetry_check.c @@ -23,6 +23,55 @@ #include "../src/utils.h" +static int is_nonmirror_subgroup(SymOpList *holo, SymOpList *mero) +{ + SymOpList *twins; + int index; + + if ( !is_subgroup(holo, mero) ) return 0; + + twins = get_ambiguities(holo, mero); + if ( twins == NULL ) return 0; + + index = num_equivs(twins, NULL); + free_symoplist(twins); + + return index; +} + + +static int is_maximal_nonmirror_subgroup(SymOpList *holo, SymOpList *mero, + SymOpList **list, int n) +{ + int i; + int index; + + index = is_nonmirror_subgroup(holo, mero); + if ( index == 0 ) return 0; + + /* Try to find a group ... */ + for ( i=0; i