aboutsummaryrefslogtreecommitdiff
path: root/src/symmetry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/symmetry.c')
-rw-r--r--src/symmetry.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/symmetry.c b/src/symmetry.c
index 921041d4..ee8ead3c 100644
--- a/src/symmetry.c
+++ b/src/symmetry.c
@@ -33,6 +33,8 @@ static int check_cond(signed int h, signed int k, signed int l, const char *sym)
{
if ( strcmp(sym, "1") == 0 )
return ( 1 );
+ if ( strcmp(sym, "-1") == 0 )
+ return ( 1 );
if ( strcmp(sym, "6") == 0 )
return ( ((h>0) && (k>=0)) || ((h==0) && (k==0)) );
if ( strcmp(sym, "6/m") == 0 )
@@ -57,8 +59,13 @@ static int check_cond(signed int h, signed int k, signed int l, const char *sym)
int num_equivs(signed int h, signed int k, signed int l, const char *sym)
{
+ /* 000 is always unique */
+ if ( (h==0) && (k==0) && (l==0) ) return 1;
+
if ( strcmp(sym, "1") == 0 ) return 1;
+ if ( strcmp(sym, "-1") == 0 ) return 2;
+
if ( strcmp(sym, "6") == 0 ) {
if ( (h==0) && (k==0) ) return 2; /* a */
return 6; /* b */
@@ -96,6 +103,13 @@ void get_equiv(signed int h, signed int k, signed int l,
*he = h; *ke = k; *le = l; return;
}
+ if ( strcmp(sym, "-1") == 0 ) {
+ switch ( idx ) {
+ case 0 : *he = h; *ke = k; *le = l; return;
+ case 1 : *he = -h; *ke = -k; *le = -l; return;
+ }
+ }
+
if ( strcmp(sym, "6") == 0 ) {
/* a */
if ( (h==0) && (k==0) ) {