aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-10-18 10:23:25 +0200
committerThomas White <taw@physics.org>2017-10-18 10:23:25 +0200
commit0821a7ddae7901b70ea5ae216c71fe41109fec55 (patch)
treeaf0ee22beb0c6fb4b315449c262a595161b27a8f /src/indexamajig.c
parent7f708ef255f068ef9e91941ac3a0a3d0e04e5ff8 (diff)
indexamajig: Auto-detection of available indexing methods
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 691d6e11..d11663e4 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -835,17 +835,25 @@ int main(int argc, char *argv[])
}
free(outfile);
+ if ( indm_str == NULL ) {
+
+ STATUS("No indexing methods specified. I will try to ");
+ STATUS("automatically detect the available methods.\n");
+ STATUS("To disable auto-detection of indexing methods, specify ");
+ STATUS("which methods to use with --indexing=<methods>.\n");
+ STATUS("Use --indexing=none to disable indexing and integration.\n");
+ indm_str = detect_indexing_methods(iargs.cell);
+
+ }
+
/* Prepare the indexing system */
if ( indm_str == NULL ) {
- STATUS("You didn't specify an indexing method, so I won't try "
- " to index anything.\n"
- "If that isn't what you wanted, re-run with"
- " --indexing=<methods>.\n");
- if ( iargs.cell != NULL ) {
- STATUS("Ignoring your unit cell.\n");
- }
- iargs.ipriv = NULL;
+ ERROR("No indexing method specified, and no usable indexing ");
+ ERROR("methods auto-detected.\n");
+ ERROR("Install some indexing programs (mosflm,dirax etc), or ");
+ ERROR("try again with --indexing=none.\n");
+ return 1;
} else if ( strcmp(indm_str, "none") == 0 ) {