diff options
-rw-r--r-- | doc/man/indexamajig.1 | 14 | ||||
-rw-r--r-- | libcrystfel/src/dirax.c | 6 | ||||
-rw-r--r-- | libcrystfel/src/grainspotter.c | 6 | ||||
-rw-r--r-- | libcrystfel/src/index.c | 25 | ||||
-rw-r--r-- | libcrystfel/src/index.h | 4 | ||||
-rw-r--r-- | libcrystfel/src/mosflm.c | 7 | ||||
-rw-r--r-- | libcrystfel/src/xds.c | 2 |
7 files changed, 54 insertions, 10 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1 index 91474156..1195d417 100644 --- a/doc/man/indexamajig.1 +++ b/doc/man/indexamajig.1 @@ -81,6 +81,10 @@ Invoke GrainSpotter, which will use your cell parameters to find multiple crysta .sp To use this option, 'GrainSpotter.0.93' must be in your shell's search path. If you see the GrainSpotter version information when you run \fBGrainSpotter.0.93\fR on the command line, things are set up correctly. +.IP \fBxds\fR +.PD +Invoke XDS, and use its REFIDX procedure to attempt to index the pattern. + .PP You can add one or more of the following to the above indexing methods: @@ -106,7 +110,15 @@ Do not use the lattice type information from the PDB file to help guide the inde .IP \fB-latt\fR .PD -This is the opposite of \fB-nolatt\fR, and is the default behaviour for \fBmosflm\fR and \fBreax\fR. +This is the opposite of \fB-nolatt\fR, and is the default behaviour for \fBmosflm\fR, \fBxds\fR and \fBgrainspotter\fR. It is the only behaviour for \fBreax\fR. + +.IP \fB-cell\fR +.PD +Provide your unit cell parameters to the indexing algorithm. This is the default for \fBxds\fR and \fBgrainspotter\fR, and the only behaviour for \fBreax\fR. This option makes no sense for \fBdirax\fR and \fBmosflm\fR, neither of which can make use of this information. + +.IP \fB-nocell\fR +.PD +Do not provide your unit cell parameters to the indexing algorithm. This is the only behaviour for \fBmosflm\fR and \fBdirax\fR, both of which cannot make use of the information. Can be used with \fBgrainspotter\fR and \fBxds\fR, and makes no sense for \fBreax\fR, which is intrinsically based on using known cell parameters. .PP The default indexing method is 'none', which means no indexing will be done. This is useful if you just want to check that the peak detection is working properly. diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index e6ff36b1..fb60656a 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -637,8 +637,10 @@ IndexingPrivate *dirax_prepare(IndexingMethod *indm, UnitCell *cell, if ( *indm & INDEXING_CHECK_CELL_AXES ) need_cell = 1; if ( need_cell && (cell == NULL) ) { - ERROR("DirAx needs a unit cell for this set of flags.\n"); - return NULL; + ERROR("Altering your DirAx flags because no PDB file was" + " provided.\n"); + *indm &= ~INDEXING_CHECK_CELL_COMBINATIONS; + *indm &= ~INDEXING_CHECK_CELL_AXES; } /* Flags that DirAx knows about */ diff --git a/libcrystfel/src/grainspotter.c b/libcrystfel/src/grainspotter.c index 8bdb03aa..8def8091 100644 --- a/libcrystfel/src/grainspotter.c +++ b/libcrystfel/src/grainspotter.c @@ -482,10 +482,8 @@ IndexingPrivate *grainspotter_prepare(IndexingMethod *indm, UnitCell *cell, if ( gp == NULL ) return NULL; /* Flags that GrainSpotter knows about */ - *indm &= INDEXING_METHOD_MASK | INDEXING_CHECK_PEAKS; - - /* Flags that GrainSpotter requires */ - *indm |= INDEXING_USE_LATTICE_TYPE; + *indm &= INDEXING_METHOD_MASK | INDEXING_CHECK_PEAKS + | INDEXING_USE_LATTICE_TYPE | INDEXING_USE_CELL_PARAMETERS; gp->cell = cell; gp->indm = *indm; diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 0ab467a6..311dc2ce 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -316,6 +316,19 @@ static IndexingMethod set_lattice(IndexingMethod a) } +/* Set the indexer flags for "use no unit cell parameters" */ +static IndexingMethod set_nocellparams(IndexingMethod a) +{ + return a & ~INDEXING_USE_CELL_PARAMETERS; +} + + +/* Set the indexer flags for "use unit cell parameters" */ +static IndexingMethod set_cellparams(IndexingMethod a) +{ + return a | INDEXING_USE_CELL_PARAMETERS; +} + char *indexer_str(IndexingMethod indm) { char *str; @@ -379,6 +392,12 @@ char *indexer_str(IndexingMethod indm) strcat(str, "-nolatt"); } + if ( indm & INDEXING_USE_CELL_PARAMETERS ) { + strcat(str, "-cell"); + } else { + strcat(str, "-nocell"); + } + return str; } @@ -433,6 +452,12 @@ IndexingMethod *build_indexer_list(const char *str) } else if ( strcmp(methods[i], "nolatt") == 0) { list[nmeth] = set_nolattice(list[nmeth]); + } else if ( strcmp(methods[i], "cell") == 0) { + list[nmeth] = set_cellparams(list[nmeth]); + + } else if ( strcmp(methods[i], "nocell") == 0) { + list[nmeth] = set_nocellparams(list[nmeth]); + } else { ERROR("Bad list of indexing methods: '%s'\n", str); return NULL; diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h index 94b0d457..f60bb18f 100644 --- a/libcrystfel/src/index.h +++ b/libcrystfel/src/index.h @@ -52,13 +52,16 @@ | INDEXING_USE_LATTICE_TYPE) #define INDEXING_DEFAULTS_REAX (INDEXING_REAX | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS \ | INDEXING_CHECK_PEAKS) #define INDEXING_DEFAULTS_GRAINSPOTTER (INDEXING_GRAINSPOTTER \ | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS \ | INDEXING_CHECK_PEAKS) #define INDEXING_DEFAULTS_XDS (INDEXING_XDS | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS \ | INDEXING_CHECK_PEAKS) /** @@ -87,6 +90,7 @@ typedef enum { INDEXING_CHECK_CELL_AXES = 512, INDEXING_CHECK_PEAKS = 1024, INDEXING_USE_LATTICE_TYPE = 2048, + INDEXING_USE_CELL_PARAMETERS = 4096, } IndexingMethod; diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index a03e621d..187d0c9b 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -817,8 +817,11 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell, if ( *indm & INDEXING_USE_LATTICE_TYPE ) need_cell = 1; if ( need_cell && (cell == NULL) ) { - ERROR("MOSFLM needs a unit cell for this set of flags.\n"); - return NULL; + ERROR("Altering your MOSFLM flags because no PDB file was" + " provided.\n"); + *indm &= ~INDEXING_CHECK_CELL_COMBINATIONS; + *indm &= ~INDEXING_CHECK_CELL_AXES; + *indm &= ~INDEXING_USE_LATTICE_TYPE; } /* Flags that MOSFLM knows about */ diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c index 786e2ae0..9660b5bc 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/xds.c @@ -577,7 +577,7 @@ IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell, /* Flags that XDS knows about */ *indm &= INDEXING_METHOD_MASK | INDEXING_CHECK_CELL_COMBINATIONS | INDEXING_CHECK_CELL_AXES | INDEXING_USE_LATTICE_TYPE - | INDEXING_CHECK_PEAKS; + | INDEXING_CHECK_PEAKS | INDEXING_USE_CELL_PARAMETERS; xp->ltl = ltl; xp->cell = cell; |