aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/indexamajig.114
-rw-r--r--libcrystfel/src/dirax.c6
-rw-r--r--libcrystfel/src/grainspotter.c6
-rw-r--r--libcrystfel/src/index.c25
-rw-r--r--libcrystfel/src/index.h4
-rw-r--r--libcrystfel/src/mosflm.c7
-rw-r--r--libcrystfel/src/xds.c2
-rw-r--r--src/im-sandbox.c4
8 files changed, 56 insertions, 12 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 098de504..92619d65 100644
--- a/libcrystfel/src/xds.c
+++ b/libcrystfel/src/xds.c
@@ -648,7 +648,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;
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index d393c356..0afe9ff3 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -202,13 +202,13 @@ static void process_image(const struct index_args *iargs,
image.flags = NULL;
image.copyme = iargs->copyme;
image.id = cookie;
- image.filename = filename;
+ image.filename = pargs->filename; /* Relative to top level */
image.beam = iargs->beam;
image.det = iargs->det;
image.crystals = NULL;
image.n_crystals = 0;
- hdfile = hdfile_open(image.filename);
+ hdfile = hdfile_open(filename); /* Relative to temporary folder */
if ( hdfile == NULL ) return;
if ( iargs->element != NULL ) {