Research Article: XGANDALF – extended gradient descent algorithm for lattice finding

Date Published: September 01, 2019

Publisher: International Union of Crystallography

Author(s): Yaroslav Gevorkov, Oleksandr Yefanov, Anton Barty, Thomas A. White, Valerio Mariani, Wolfgang Brehm, Aleksandra Tolstikova, Rolf-Rainer Grigat, Henry N. Chapman.


A description and evaluation are given of XGANDALF, extended gradient descent algorithm for lattice finding, an algorithm developed for fast and accurate indexing of snapshot diffraction patterns.

Partial Text

Serial crystallography (SX) experiments (Chapman et al., 2011 ▸; Schlichting, 2015 ▸) record a sequence of diffraction patterns, each from a different crystal in a random and unknown orientation. Measurements from hundreds or many thousands of crystals are used to build up a complete data set. Experiments usually aim to measure not more than one crystal per diffraction pattern, although the contribution of multiple crystals in a single diffraction measurement is not uncommon. The difference in the measurement approach compared with conventional rotation crystallography has necessitated the development of new software for processing SX data, with several software packages now available including CrystFEL (White et al., 2012 ▸), DIALS (Winter et al., 2018 ▸) and nXDS (Kabsch, 2014 ▸). The main steps in analysis involve Bragg spot detection, indexing diffraction patterns, integration of detector counts in Bragg reflections, and merging of data from all individual crystals into a common data set. A key step is indexing the Bragg spots observed in a pattern, which is required to integrate and scale Bragg intensities into a common lattice and to predict the locations of other Bragg spots to be included in this merging process. Several automatic indexing algorithms have been developed and implemented in widely used software like MOSFLM (Powell, 1999 ▸), XDS (Kabsch, 1993 ▸, 2010 ▸), DirAx (Duisenberg, 1992 ▸) and LABELIT (Sauter & Zwart, 2009 ▸). Although originally devised for rotation-series data, these algorithms are also capable of indexing snapshot diffraction patterns. Other algorithms have been devised specifically for snapshot data (Ginn et al., 2016 ▸; Gildea et al., 2014 ▸).

XGANDALF is implemented as an open-source C++ library, which can be used directly from applications written in C or C++, or from a Python program using a Cython interface. XGANDALF has been implemented in CrystFEL (White et al., 2012 ▸) and is available from version 0.8.0 onwards. The XGANDALF implementation provides the tools for programmers to adjust the heuristic by defining their own high-level heuristic stages based upon optimized low-level implementations. The library is distributed under the LGPLv3 licence, and the source code can be downloaded from

A new indexing algorithm, XGANDALF, has been presented which was designed specifically for indexing still diffraction patterns for snapshot serial crystallography experiments. As such, it outperforms the current state-of-the-art indexers that, although commonly used in serial crystallography, were mostly created for the indexing and analysis of rotation crystal data. Compared with those programs, XGANDALF gives higher indexing rates and higher indexing precision, and can be used both with and without prior unit-cell parameters. The execution time of the implementation is of the same order of magnitude as currently used indexing algorithms and, with mean indexing times of about 20 ms, is fast enough to allow real-time feedback in experiments. Compared with the available indexers, the algorithm successfully indexes more patterns in test serial crystallography data sets and is more robust to multiple lattices in a single image. The program has already been used in serial crystallography experiments by several other groups with very positive results. We therefore anticipate that XGANDALF will be a valuable addition to the collection of software tools for serial crystallography.




Leave a Reply

Your email address will not be published.