aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-09 10:18:48 -0800
committerThomas White <taw@physics.org>2013-02-09 11:31:26 -0800
commit8907b7cb333a893720cac1def3d86dbe26600fa8 (patch)
tree50329c42ab96d3b91a1661ad4b62549d06708ab0
parentafafa4ca344de75f27771d8191e79c6280b68694 (diff)
Clarify lattice type information
-rw-r--r--doc/man/indexamajig.15
-rw-r--r--libcrystfel/src/index.c13
-rw-r--r--libcrystfel/src/index.h1
-rw-r--r--libcrystfel/src/mosflm.c23
-rw-r--r--src/indexamajig.c22
5 files changed, 35 insertions, 29 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 7f44605f..b17602e6 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -83,8 +83,13 @@ Do not check the resulting unit cell. This option is useful when you need to de
Check permutations of the axes for correspondence with your cell, but do not check linear combinations. This is useful to avoid a potential problem when one of the unit cell axis lengths is close to a multiple of one of the others. Use with \fBdirax\fR and \fBmosflm\fR.
.IP \fB-bad\fR
+.PD
Do not check that the cell accounts for any of the peaks as described in \fBdirax\fR above. Might be useful to debug initial indexing problems, or if there are many multi-crystal patterns and the indexing method has no concept of multiple crystals per pattern (which, at the moment, means all of them). Can be used with any indexing method.
+.IP \fB-nolatt\fR
+.PD
+Do not use the lattice type information from the PDB file to help guide the indexing. Use with \fBmosflm\fR, which is the only indexing method which can take advantage of this information.
+
.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/index.c b/libcrystfel/src/index.c
index 1c3441a6..949be146 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -206,7 +206,8 @@ void index_pattern(struct image *image,
/* Set the default indexer flags. May need tweaking depending on the method */
static IndexingMethod defaults(IndexingMethod a)
{
- return a | INDEXING_CHECK_CELL_COMBINATIONS | INDEXING_CHECK_PEAKS;
+ return a | INDEXING_CHECK_CELL_COMBINATIONS | INDEXING_CHECK_PEAKS
+ | INDEXING_USE_LATTICE_TYPE;
}
@@ -235,6 +236,13 @@ static IndexingMethod set_axes(IndexingMethod a)
}
+/* Set the indexer flags for "use no lattice type information" */
+static IndexingMethod set_nolattice(IndexingMethod a)
+{
+ return a & ~INDEXING_USE_LATTICE_TYPE;
+}
+
+
IndexingMethod *build_indexer_list(const char *str)
{
int n, i;
@@ -271,6 +279,9 @@ IndexingMethod *build_indexer_list(const char *str)
} else if ( strcmp(methods[i], "axes") == 0) {
list[nmeth] = set_axes(list[nmeth]);
+ } else if ( strcmp(methods[i], "nolatt") == 0) {
+ list[nmeth] = set_nolattice(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 093e4ad6..a54691b4 100644
--- a/libcrystfel/src/index.h
+++ b/libcrystfel/src/index.h
@@ -66,6 +66,7 @@ typedef enum {
INDEXING_CHECK_CELL_COMBINATIONS = 256,
INDEXING_CHECK_CELL_AXES = 512,
INDEXING_CHECK_PEAKS = 1024,
+ INDEXING_USE_LATTICE_TYPE = 2048,
} IndexingMethod;
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 4f7b0c3c..43bfdea6 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -3,13 +3,13 @@
*
* Invoke the DPS auto-indexing algorithm through MOSFLM
*
- * Copyright © 2012 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2012-2013 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
* Copyright © 2012 Richard Kirian
*
* Authors:
* 2010 Richard Kirian <rkirian@asu.edu>
- * 2010-2012 Thomas White <taw@physics.org>
+ * 2010-2013 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -149,6 +149,12 @@ static int check_cell(struct mosflm_private *mp, struct image *image,
return 0;
}
+ if ( mp->indm & INDEXING_USE_LATTICE_TYPE ) {
+ LatticeType latt;
+ latt = cell_get_lattice_type(mp->template);
+ cell_set_lattice_type(out, latt);
+ }
+
crystal_set_cell(cr, out);
if ( mp->indm & INDEXING_CHECK_PEAKS ) {
@@ -409,7 +415,9 @@ static void mosflm_send_next(struct image *image, struct mosflm_data *mosflm)
break;
case 2 :
- if ( mosflm->mp->template != NULL ) {
+ if ( (mosflm->mp->indm & INDEXING_USE_LATTICE_TYPE)
+ && (mosflm->mp->template != NULL) )
+ {
const char *symm;
symm = spacegroup_for_lattice(mosflm->mp->template);
snprintf(tmp, 255, "SYMM %s\n", symm);
@@ -517,8 +525,7 @@ static int mosflm_readable(struct image *image, struct mosflm_data *mosflm)
switch ( type ) {
- case MOSFLM_INPUT_LINE :
-
+ case MOSFLM_INPUT_LINE :
block_buffer = malloc(i+1);
memcpy(block_buffer, mosflm->rbuffer, i);
block_buffer[i] = '\0';
@@ -532,12 +539,12 @@ static int mosflm_readable(struct image *image, struct mosflm_data *mosflm)
endbit_length = i+2;
break;
- case MOSFLM_INPUT_PROMPT :
+ case MOSFLM_INPUT_PROMPT :
mosflm_send_next(image, mosflm);
endbit_length = i+7;
break;
- default :
+ default :
/* Obviously, this never happens :) */
ERROR("Unrecognised MOSFLM input mode! "
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 97fb1743..a89ecc5e 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -81,7 +81,8 @@ static void show_help(const char *s)
" Default: indexamajig.stream\n"
"\n"
" --indexing=<methods> Use 'methods' for indexing. Provide one or more\n"
-" methods separated by commas. See below.\n"
+" methods separated by commas.\n"
+" See 'man indexamajig' for details.\n"
" -g. --geometry=<file> Get detector geometry from file.\n"
" -b, --beam=<file> Get beam parameters from file (provides nominal\n"
" wavelength value if no per-shot value is found in\n"
@@ -144,25 +145,6 @@ static void show_help(const char *s)
" --integrate-found Skip the spot prediction step, and just integrate\n"
" the intensities of the spots found by the initial\n"
" peak search.\n"
-"\n"
-"Indexing methods:\n\n"
-" dirax Invoke DirAx, check linear combinations of the resulting cell\n"
-" axes for agreement with your cell, and then check that the cell\n"
-" accounts for at least half of the peaks from the peak search.\n"
-" mosflm As 'dirax', but invoke MOSFLM instead.\n"
-" reax Run the DPS algorithm, looking for the axes of your cell.\n"
-"\n"
-"You can add the following to the above indexing methods:\n"
-" -raw Do not check the resulting unit cell\n"
-" (Only for 'dirax' and 'mosflm').\n"
-" -axes Check permutations of the axes for correspondence with your cell,\n"
-" but do not check linear combinations.\n"
-" (Only for 'dirax' and 'mosflm').\n"
-" -bad Do not check that the cell accounts for any of the peaks.\n"
-"\n"
-"The default indexing method is 'none', which means no indexing will be done.\n"
-"\n"
-"Examples: 'dirax,mosflm,reax', 'dirax-raw,mosflm-raw', 'dirax-raw-bad'\n"
);
}