From c4a9925905abc1108b33057240b17913de2e671a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Nov 2016 13:35:15 +0100 Subject: Add (more) warnings about unique axes --- libcrystfel/src/symmetry.c | 21 ++++++++++++++++++--- libcrystfel/src/symmetry.h | 8 +++++--- 2 files changed, 23 insertions(+), 6 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index 503078a7..d675fb30 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -3,12 +3,12 @@ * * Symmetry * - * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2016 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2010-2014 Thomas White - * 2014 Kenneth Beyerlein + * 2010-2014,2016 Thomas White + * 2014 Kenneth Beyerlein * * This file is part of CrystFEL. * @@ -1088,6 +1088,21 @@ SymOpList *get_pointgroup(const char *sym) } +void pointgroup_warning(const char *sym) +{ + if ( (strcmp(sym, "m") == 0) + || (strcmp(sym, "2/m") == 0) + || (strcmp(sym, "2") == 0) ) + { + ERROR("WARNING: You have specified a monoclinic point group " + "without a unique axis. The default unique axis is 'c'. " + "If you want unique axis b, append '_uab' to your point " + "group.\n"); + } + +} + + static void do_op(const IntegerMatrix *op, signed int h, signed int k, signed int l, signed int *he, signed int *ke, signed int *le) diff --git a/libcrystfel/src/symmetry.h b/libcrystfel/src/symmetry.h index c29164ef..a61ca96f 100644 --- a/libcrystfel/src/symmetry.h +++ b/libcrystfel/src/symmetry.h @@ -3,12 +3,12 @@ * * Symmetry * - * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2016 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2010-2014 Thomas White - * 2014 Kenneth Beyerlein + * 2010-2014,2016 Thomas White + * 2014 Kenneth Beyerlein * * This file is part of CrystFEL. * @@ -90,6 +90,8 @@ extern void describe_symmetry(const SymOpList *s); extern int is_centric(signed int h, signed int k, signed int l, const SymOpList *ops); +extern void pointgroup_warning(const char *sym); + extern void add_symop(SymOpList *ops, IntegerMatrix *m); extern SymOpList *parse_symmetry_operations(const char *s); extern char *get_matrix_name(const IntegerMatrix *m, int row); -- cgit v1.2.3