aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-22 15:53:06 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:34 +0100
commit522af8692498ad05a2daa6eae2b1e399b8bf30eb (patch)
treec953addefb68090ab47a6d4acefa3a270d0c0507 /tests
parenta5a7debcccd5c52cc8f96ff516292482a80ad6ba (diff)
Add all remaining point groups
Diffstat (limited to 'tests')
-rw-r--r--tests/symmetry_check.c79
1 files changed, 65 insertions, 14 deletions
diff --git a/tests/symmetry_check.c b/tests/symmetry_check.c
index b3d4cb34..5a2c91d5 100644
--- a/tests/symmetry_check.c
+++ b/tests/symmetry_check.c
@@ -37,11 +37,17 @@ static void check_pg_props(const char *pg, int answer, int centro, int *fail)
SymOpList *sym;
int n, c;
- //STATUS("**************************************** Testing '%s'\n", pg);
-
sym = get_pointgroup(pg);
+
+ if ( sym == NULL ) {
+ *fail = 1;
+ return;
+ }
+
n = num_equivs(sym, NULL);
+ describe_symmetry(sym);
+
if ( n != answer ) {
ERROR("Number of equivalents in '%s' is %i (not %i).\n",
pg, n, answer);
@@ -63,18 +69,63 @@ int main(int argc, char *argv[])
{
int fail = 0;
- check_pg_props( "1", 1, 0, &fail);
- check_pg_props( "-1", 2, 1, &fail);
-
- check_pg_props( "2", 2, 0, &fail);
- check_pg_props( "m", 2, 0, &fail);
- check_pg_props("2/m", 4, 1, &fail);
-
- check_pg_props("222", 4, 0, &fail);
- check_pg_props("mm2", 4, 0, &fail);
- check_pg_props("mmm", 8, 1, &fail);
-
- check_pg_props( "4", 4, 0, &fail);
+ check_pg_props( "1", 1, 0, &fail);
+ check_pg_props( "-1", 2, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "2", 2, 0, &fail);
+ check_pg_props( "m", 2, 0, &fail);
+ check_pg_props( "2/m", 4, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "222", 4, 0, &fail);
+ check_pg_props( "mm2", 4, 0, &fail);
+ check_pg_props( "mmm", 8, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "4", 4, 0, &fail);
+ check_pg_props( "-4", 4, 0, &fail);
+ check_pg_props( "4/m", 8, 1, &fail);
+ check_pg_props( "422", 8, 0, &fail);
+ check_pg_props( "4mm", 8, 0, &fail);
+ check_pg_props( "-42m", 8, 0, &fail);
+ check_pg_props( "-4m2", 8, 0, &fail);
+ check_pg_props( "4/mmm", 16, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "3_R", 3, 0, &fail);
+ check_pg_props( "-3_R", 6, 1, &fail);
+ check_pg_props( "32_R", 6, 0, &fail);
+ check_pg_props( "3m_R", 6, 0, &fail);
+ check_pg_props("-3m_R", 12, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "3_H", 3, 0, &fail);
+ check_pg_props( "-3_H", 6, 1, &fail);
+ check_pg_props( "321_H", 6, 0, &fail);
+ check_pg_props( "312_H", 6, 0, &fail);
+ check_pg_props( "3m1_H", 6, 0, &fail);
+ check_pg_props( "31m_H", 6, 0, &fail);
+ check_pg_props("-3m1_H", 12, 1, &fail);
+ check_pg_props("-31m_H", 12, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "6", 6, 0, &fail);
+ check_pg_props( "-6", 6, 0, &fail);
+ check_pg_props( "6/m", 12, 1, &fail);
+ check_pg_props( "622", 12, 0, &fail);
+ check_pg_props( "6mm", 12, 0, &fail);
+ check_pg_props( "-6m2", 12, 0, &fail);
+ check_pg_props( "-62m", 12, 0, &fail);
+ check_pg_props( "6/mmm", 24, 1, &fail);
+ STATUS("\n");
+
+ check_pg_props( "23", 12, 0, &fail);
+ check_pg_props( "m-3", 24, 1, &fail);
+ check_pg_props( "432", 24, 0, &fail);
+ check_pg_props( "-432", 24, 0, &fail);
+ check_pg_props( "m-3m", 48, 1, &fail);
+ STATUS("\n");
return fail;
}