aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-18 18:25:22 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:33 +0100
commitdf9457eb78539b1f577a71db27dcf75d8ab4ad85 (patch)
tree01ff045e6b4f5df341c276bdfe32d82dfd4567e2 /src/pattern_sim.c
parent8e9f89cb00f783b23b3c004976fb08b56819fe64 (diff)
Missed this one
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index e72c023d..0c35cc89 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -222,7 +222,8 @@ int main(int argc, char *argv[])
int random_size = 0;
double min_size = 0.0;
double max_size = 0.0;
- char *sym = NULL;
+ char *sym_str = NULL;
+ SymOpList *sym;
/* Long options */
const struct option longopts[] = {
@@ -298,7 +299,7 @@ int main(int argc, char *argv[])
break;
case 'y' :
- sym = strdup(optarg);
+ sym_str = strdup(optarg);
break;
case 2 :
@@ -358,7 +359,9 @@ int main(int argc, char *argv[])
}
}
- if ( sym == NULL ) sym = strdup("1");
+ if ( sym_str == NULL ) sym_str = strdup("1");
+ sym = get_pointgroup(sym_str);
+ /* sym_str is used below */
if ( config_simdetails ) {
show_details();
@@ -427,7 +430,7 @@ int main(int argc, char *argv[])
/* Check that the intensities have the correct symmetry */
if ( check_list_symmetry(reflections, sym) ) {
ERROR("The input reflection list does not appear to"
- " have symmetry %s\n", sym);
+ " have symmetry %s\n", symmetry_name(sym));
return 1;
}
@@ -527,7 +530,7 @@ int main(int argc, char *argv[])
if ( config_gpu ) {
if ( gctx == NULL ) {
gctx = setup_gpu(config_nosfac,
- intensities, flags, sym,
+ intensities, flags, sym_str,
gpu_dev);
}
get_diffraction_gpu(gctx, &image, na, nb, nc, cell);
@@ -604,7 +607,8 @@ skip:
free(intensities);
free(outfile);
free(filename);
- free(sym);
+ free(sym_str);
+ free_symoplist(sym);
return 0;
}