diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-07-21 16:34:24 -0400 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:54 +0100 |
commit | 8431193a77077f6bb0c136b902df4b0604deda88 (patch) | |
tree | d7acff0ea63718ac39ac12705a56d10ff23c902d /src | |
parent | 6a6ca3f4ff5ea8ccc22edca441a67c6598f9c69b (diff) |
process_hkl: Don't resolve twins/inversion unless requested
Diffstat (limited to 'src')
-rw-r--r-- | src/process_hkl.c | 42 | ||||
-rw-r--r-- | src/symmetry.c | 4 |
2 files changed, 27 insertions, 19 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c index 6d17349e..ec23e1cd 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -379,6 +379,7 @@ int main(int argc, char *argv[]) ReflItemList *twins; ReflItemList *observed; int i; + const char *holo = NULL; /* Long options */ const struct option longopts[] = { @@ -442,31 +443,36 @@ int main(int argc, char *argv[]) pdb = strdup("molecule.pdb"); } - if ( sym == NULL ) { - sym = strdup("1"); - } - cell = load_cell_from_pdb(pdb); free(pdb); /* Show useful symmetry information */ - const char *holo = get_holohedral(sym); - int np = num_general_equivs(holo) / num_general_equivs(sym); - if ( np > 1 ) { - - STATUS("Resolving point group %s into %s (%i possibilities)\n", - holo, sym, np); - /* Get the list of twin/Bijvoet possibilities */ - twins = get_twin_possibilities(holo, sym); - STATUS("Twin/inversion operation indices (from %s) are:", holo); - for ( i=0; i<num_items(twins); i++ ) { - STATUS(" %i", get_item(twins, i)->op); - } - STATUS("\n"); + if ( sym != NULL ) { + holo = get_holohedral(sym); + int np = num_general_equivs(holo) / num_general_equivs(sym); + if ( np > 1 ) { + + STATUS("Resolving point group %s into %s " + "(%i possibilities)\n", + holo, sym, np); + /* Get the list of twin/Bijvoet possibilities */ + twins = get_twin_possibilities(holo, sym); + STATUS("Twin/inversion operation indices from %s are:", + holo); + for ( i=0; i<num_items(twins); i++ ) { + STATUS(" %i", get_item(twins, i)->op); + } + STATUS("\n"); + } else { + STATUS("No twin/inversion resolution necessary.\n"); + twins = NULL; + } } else { - STATUS("No twin/inversion resolution necessary.\n"); + STATUS("Not performing any twin/inversion resolution.\n"); twins = NULL; + sym = strdup("1"); + holo = strdup("1"); } /* Open the data stream */ diff --git a/src/symmetry.c b/src/symmetry.c index 54b7f5cc..4178855d 100644 --- a/src/symmetry.c +++ b/src/symmetry.c @@ -34,7 +34,9 @@ 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 ); + return ( (l>0) + || ( (l==0) && (k>0) ) + || ( (l==0) && (k==0) && (h>=0) ) ); if ( strcmp(sym, "6") == 0 ) return ( ((h>0) && (k>=0)) || ((h==0) && (k==0)) ); if ( strcmp(sym, "6/m") == 0 ) |