aboutsummaryrefslogtreecommitdiff
path: root/src/ambigator.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-03-10 20:13:57 +0100
committerThomas White <taw@bitwiz.org.uk>2014-03-10 20:13:57 +0100
commit41b7558be6bf25250cc4ad6e1b720837f7a6549e (patch)
treee2f3ef9370bd93e9acdeffbab53016c64a0680c8 /src/ambigator.c
parent7c19d12fd954bc08708f710c3da7cbe9769ed615 (diff)
Check symmetry options
Diffstat (limited to 'src/ambigator.c')
-rw-r--r--src/ambigator.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index 4f008633..da7e0e11 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -842,6 +842,7 @@ int main(int argc, char *argv[])
return 1;
}
s_sym = get_pointgroup(s_sym_str);
+ if ( s_sym == NULL ) return 1;
free(s_sym_str);
if ( w_sym_str == NULL ) {
@@ -852,9 +853,19 @@ int main(int argc, char *argv[])
free(w_sym_str);
if ( w_sym == NULL ) return 1;
amb = get_ambiguities(w_sym, s_sym);
- if ( amb == NULL ) return 1;
+ if ( amb == NULL ) {
+ ERROR("Couldn't find ambiguity operator.\n");
+ ERROR("Check that your values for -y and -w are "
+ "correct.\n");
+ return 1;
+ }
STATUS("Ambiguity operations:\n");
describe_symmetry(amb);
+ if ( num_equivs(amb, NULL) != 2 ) {
+ ERROR("There must be only one ambiguity operator.\n");
+ ERROR("Try again with a different value for -w.\n");
+ return 1;
+ }
}
crystals = NULL;