From 0821a7ddae7901b70ea5ae216c71fe41109fec55 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 18 Oct 2017 10:23:25 +0200 Subject: indexamajig: Auto-detection of available indexing methods --- src/indexamajig.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src') 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=.\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=.\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 ) { -- cgit v1.2.3