diff options
author | Thomas White <taw@physics.org> | 2010-11-12 16:45:13 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:05 +0100 |
commit | 55b16c49424cd61d6a00a167862c390c274c307e (patch) | |
tree | f60e375efb95f495e0ae7f29c14d3aa4578246e9 | |
parent | abb67df4b77364b20a64b43ee3e427cacd60e22f (diff) |
Add more symmetries, update docs about cell settings
-rw-r--r-- | doc/indexamajig.txt | 8 | ||||
-rw-r--r-- | doc/pattern_sim.txt | 7 | ||||
-rw-r--r-- | src/cell.c | 1 | ||||
-rw-r--r-- | src/symmetry.c | 14 |
4 files changed, 29 insertions, 1 deletions
diff --git a/doc/indexamajig.txt b/doc/indexamajig.txt index eca053e4..a602a87d 100644 --- a/doc/indexamajig.txt +++ b/doc/indexamajig.txt @@ -95,6 +95,14 @@ Always using a right-handed cell means that the Bijvoet pairs can be told apart. +A Note about Unit Cell Settings +------------------------------- + +CrystFEL's core symmetry module only knows about one setting for each unit cell. +You must use the same setting. That means that the unique axis (for cells which +have one) must be "c". + + Unconventional Use ------------------ diff --git a/doc/pattern_sim.txt b/doc/pattern_sim.txt index f70123e1..cbbcb749 100644 --- a/doc/pattern_sim.txt +++ b/doc/pattern_sim.txt @@ -18,3 +18,10 @@ $ echo symgen P63 | pdbset xyzin model.pdb xyzout model-P1.pdb While on this subject, you might also want to include hydrogens in the model using something like: $ echo HYDROGENS APPEND | hgen xyzin model.pdb xyzout model-with-H.pdb + + +A Note about Unit Cell Settings +------------------------------- + +Please be sure to read the "Note about Unit Cell Settings" in the documentation +for indexamajig. @@ -801,6 +801,7 @@ static void cell_set_pointgroup_from_pdb(UnitCell *cell, const char *sym) if ( strcmp(sym, "P 63") == 0 ) new = "6"; if ( strcmp(sym, "P 21 21 21") == 0 ) new = "222"; + if ( strcmp(sym, "P 2 2 2") == 0 ) new = "222"; if ( strcmp(sym, "P 43 21 2") == 0 ) new = "422"; if ( new != NULL ) { diff --git a/src/symmetry.c b/src/symmetry.c index 48194c8c..9153049d 100644 --- a/src/symmetry.c +++ b/src/symmetry.c @@ -52,8 +52,10 @@ static int check_cond(signed int h, signed int k, signed int l, const char *sym) return ( (((h>0) && (k>=0)) || ((h==0) && (k==0))) && (l>=0) && (h>=k) ); /* Like 6/mmm */ if ( strcmp(sym, "422") == 0 ) - return ( (((h>=0) && (k>0)) || ((h==0) && (k==0))) + return ( (((h>0) && (k>=0)) || ((h==0) && (k==0))) && (h>=k) ); + if ( strcmp(sym, "4") == 0 ) + return ( ((h>0) && (k>=0)) || ((h==0) && (k==0)) ); /* Hexagonal */ if ( strcmp(sym, "6") == 0 ) @@ -89,6 +91,7 @@ int num_general_equivs(const char *sym) if ( strcmp(sym, "mmm") == 0 ) return 8; /* Tetragonal */ + if ( strcmp(sym, "4") == 0 ) return 4; if ( strcmp(sym, "422") == 0 ) return 8; if ( strcmp(sym, "4/mmm") == 0 ) return 16; @@ -145,6 +148,15 @@ void get_general_equiv(signed int h, signed int k, signed int l, } } + if ( strcmp(sym, "4") == 0 ) { + switch ( idx ) { + case 0 : *he = h; *ke = k; *le = l; return; + case 1 : *he = -h; *ke = -k; *le = l; return; + case 2 : *he = -k; *ke = h; *le = l; return; + case 3 : *he = k; *ke = -h; *le = l; return; + } + } + if ( strcmp(sym, "422") == 0 ) { switch ( idx ) { case 0 : *he = h; *ke = k; *le = l; return; |