electronic reprint ReX.Cell: a user-friendly program for

0 downloads 0 Views 520KB Size Report
Journal of Applied Crystallography covers a wide range of crystallographic topics from ... journal is the primary place where crystallographic computer program ...
electronic reprint Journal of

Applied Crystallography ISSN 0021-8898

Editor: Anke R. Kaysser-Pyzalla

ReX.Cell : a user-friendly program for powder diffraction indexing Mauro Bortolotti and Ivan Lonardelli

J. Appl. Cryst. (2013). 46, 259–261

c International Union of Crystallography Copyright  Author(s) of this paper may load this reprint on their own web site or institutional repository provided that this cover page is retained. Republication of this article or its storage in electronic databases other than as specified above is not permitted without prior permission in writing from the IUCr. For further information see http://journals.iucr.org/services/authorrights.html

Journal of Applied Crystallography covers a wide range of crystallographic topics from the viewpoints of both techniques and theory. The journal presents papers on the application of crystallographic techniques and on the related apparatus and computer software. For many years, the Journal of Applied Crystallography has been the main vehicle for the publication of small-angle scattering papers and powder diffraction techniques. The journal is the primary place where crystallographic computer program information is published.

Crystallography Journals Online is available from journals.iucr.org J. Appl. Cryst. (2013). 46, 259–261

Mauro Bortolotti et al. · ReX.Cell

computer programs Journal of

Applied Crystallography

ReX.Cell: a user-friendly program for powder diffraction indexing

ISSN 0021-8898

Mauro Bortolottia* and Ivan Lonardellib Received 24 August 2012 Accepted 30 October 2012

a

# 2013 International Union of Crystallography Printed in Singapore – all rights reserved

ReX.Cell is a novel software package dedicated to the automation of crystal cell indexing starting from powder diffraction data. The program aims to help both novice and experienced powder diffractionists overcome the practical difficulties encountered during powder data indexing, by offering a userfriendly highly interactive interface to classical indexing engines. The software provides a wizard-style approach, accompanying the user through all the typical steps of the indexing procedure: preliminary data processing, background subtraction, data smoothing, peak finding and finally autoindexing. Each step can be carried out automatically or fine-tuned through custom options; in either mode, algorithms and filters are applied in real time to the diffraction data, giving an immediate visual feedback. The program is written in the Java programming language and runs on several different operating systems; source code is provided to allow developers to add support for additional indexing programs and/or powder diffraction data formats.

Minalab, Fondazione Bruno Kessler, via Sommarive 18, Trento, TN 38121, Italy, and bMaterials Science and Metallurgy Department, University of Cambridge, Pembroke Street, Cambridge CB2 3QZ, UK. Correspondence e-mail: [email protected]

1. Introduction In recent years, the effectiveness of powder diffraction as a tool for ab initio structure determination has steadily increased, as shown by the constantly rising number of crystal structures successfully solved thanks to the adoption of this technique (David et al., 2002). However, structure determination from powder data is still a challenging multi-step problem, in which the success of each step strongly depends on the correct application of the preceding one. As such, powder data indexing can represent by itself the very first bottleneck in the effective determination of a novel crystal structure. Since it is such a fundamental problem in powder diffraction, crystal cell indexing has been extensively investigated during the past few decades, resulting in various algorithmic approaches being proposed (exhaustive or semi-exhaustive methods, direct or reciprocal space searches, different merit criteria etc.) and a wide selection of indexing programs being made available (Bergmann et al., 2004). To cite just a few, we should start from the classical packages ITO (Visser, 1969), TREOR90 (Werner et al., 1985) and DICVOL (Boultif & Loue¨r, 2004), which continue to be upgraded and improved (see e.g. Altomare et al., 2000, 2009; Loue¨r & Boultif, 2007); among the recent projects, we can cite McMaille (Le Bail, 2012), SVD-Index (Coelho, 2003) and X-Cell (Neumann, 2003). Despite the availability of this wide selection of algorithms and corresponding software implementations, indexing is still a quite complex challenge, especially for novice users. The indexing procedure basically consists of two steps: first, diffraction peaks are searched for and located in the powder pattern so that the original experimental data are reduced to a list of d spacings, corresponding to the experimental reflections; this list is then run through the actual indexing process, which, depending on the particular search algorithm and figure of merit adopted, usually terminates with an ordered list of proposed crystal cell solutions. J. Appl. Cryst. (2013). 46, 259–261

From a user perspective, the first step is often the most troublesome, as an incorrect selection of experimental reflections can irremediably lead to the wrong results, no matter how sophisticated the indexing algorithm and how long the machine time dedicated to the search. Great attention needs to be dedicated to the collection of high-quality diffraction data and the subsequent location of the principal reflections (as well as the detection of impurity peaks, if they are present); sometimes, it may be necessary to repeat the whole procedure several times, with different sets of diffraction peaks, and see how the indexing results are affected. This can of course take a large amount of time, especially considering that most indexing packages require the user to manually write a text file containing the peak positions and the program options in a custom format, and then parse the corresponding output line by line. Program output interpretation is also not straightforward and is prone to error, as one usually needs to have at least a basic understanding of the algorithm inner workings to interpret the quality and likelihood of the proposed solutions. Both commercial and free software is available which allows the automation of both the peak search procedure and the actual indexing; among the free options, a notable mention should go to the excellent Crysfire (Shirley, 2006) and Checkcell (Laugier & Bochu, 2000) packages, which act as a combined expert system to allow indexing to be carried out in a fairly straightforward way, even by inexperienced users. An open-source multi-platform alternative to Crysfire is the CMPR package (Toby, 2005), which provides, among various data visualization and manipulation features, a graphical frontend for the DICVOL, ITO and TREOR indexing programs. The software developed in this work, ReX.Cell, aims to add a further contribution to the field by offering a dedicated graphical environment, which first works as an interactive wizard for the location of experimental reflections in diffraction patterns and then provides a visual input/output interface to three common indexing doi:10.1107/S0021889812045025

electronic reprint

259

computer programs engines. Multi-platform source code is also available, allowing both the extension of software functionalities and the implementation of additional indexing programs and data formats.

2. Program features The program is written in the Java programming language, and thus can potentially run on a wide variety of different platforms and computing environments; at the moment, preconfigured packages for three common platforms are provided (Windows, MacOSX and Linux), as well as source code for the data manipulation routines and the supported indexing engine interfaces. In addition to the standalone version, ReX.Cell is also provided as a plug-in component for the general Rietveld program ReX (Bortolotti et al., 2009). In either case, no complex installation procedures are required, as the software package can simply be extracted in a directory and executed from there; this also avoids complications in multi-user environments (e.g. academic laboratories) where final users often lack administrator privileges. The program graphical interface is organized into three panels (‘views’): the main powder data plot, in which diffraction patterns and experimental reflections are displayed, the peaks list view and the indexing solutions view (see Fig. 1). The powder data display can be fully configured to change intensity and x scales, colours and graphic styles etc.; pan and zoom capabilities are provided to allow a user to quickly focus on particular pattern regions, as well as graphic export support in various formats. All the graphical views are dynamically linked and are automatically updated after applying the data reduction algorithms or changing the software options. The typical program workflow can be subdivided into four steps: loading of the diffraction pattern, preliminary data processing, peak location and finally the actual indexing. In the following sections, each step is briefly described to provide a basic understanding of the software environment; a more detailed tutorial is provided on the program web site.

performed by using standard or Chebyschev polynomials with a userdefined coefficient number. Secondary radiation stripping is based on the Ladell algorithm (Ladell et al., 1975) and can be applied to an arbitrary number of radiation components (see, for example, Berger, 1986; Cheary & Coelho, 1992). Both preprocessing steps are performed in real time based on the selected options; this provides immediate feedback on the correctness and the opportunity to apply filtering. 2.2. Peak position determination

Peak finding is preliminarily carried out by means of an automated filtering/second-derivative approach based on the Savitzky–Golay method (Savitzky & Golay, 1964). First, the original diffraction pattern is filtered to eliminate or reduce the pattern noise, which can severely affect the location of peak maxima. The filtering window is calculated approximately as the mean FWHM of the diffraction pattern; this provides a sensible default for most data but can be modified as needed. The second derivative of the pattern is then calculated and filtered; diffraction peaks are located by looking for negative regions of a desired minimum extension in the secondderivative pattern.

2.1. Data loading and preliminary data processing

At the time of writing, several common constant-wavelength powder data formats are supported, including XY, XYE, DAT, CIF and XML. After loading the diffraction data to work on, the peak search wizard can be started. The first wizard step deals with preliminary data processing; this consists of background subtraction and K 2 stripping, if needed (see Fig. 2). Background subtraction can be

Figure 2 The data preprocessing wizard panel, showing the background subtraction and K 2 stripping functionalities.

Figure 3 Figure 1 ReX.Cell main program window, showing the data plot view as well as the peaks list and indexing solutions panels.

260

Mauro Bortolotti et al.



ReX.Cell

The peak location wizard panel. Selected options are applied in real time to the diffraction pattern, offering an immediate feedback of their effects on the automated peak location results.

electronic reprint

J. Appl. Cryst. (2013). 46, 259–261

computer programs 3. Conclusions

Figure 4 The final solution selection. After clicking on a particular solution, the corresponding calculated reflections are displayed below the experimental reflections, providing a way to evaluate the correctness of the proposed crystal cell.

As with the data processing panel, options are applied in real time to provide immediate feedback in both the plot window and the peaks list (see Fig. 3). Since no automatic procedure can be successfully applied to every kind of diffraction data, manual peak editing is also supported as an option; automatically located peaks can be removed if wrongly placed, and new peaks can be added by simply double-clicking in the data plot window. Indeed, it is strongly advisable to carefully examine the results of the automated peak location, looking especially for incorrectly added peaks, since these can severely harm the successive indexing run.

2.3. Cell indexing and solution evaluation

Once the final peaks list has been defined, the actual indexing can take place. Depending on the indexing engine chosen, the software writes out a text file containing the peaks list and the program options and then launches the command line executable. At the time of writing, three classical indexing engines are supported: DICVOL (version 06), N-TREOR (2009 version) and ITO (version 15). Indexing can take a long time, especially when dealing with lowsymmetry and large-volume cells; after completion, the various output files are parsed and the proposed solutions are automatically displayed in the corresponding panel. Indexing solutions can be examined by simply clicking on the corresponding entry in the solution list: the reflection marks of the trial solution are displayed in blue below the original ‘experimental’ reflections, displayed in green (Fig. 4); after choosing a candidate solution, the user has the opportunity to export the crystal cell in the CIF or Protein Data Bank format.

J. Appl. Cryst. (2013). 46, 259–261

It can be argued that the first and most important requisite for a successful indexing is the quality of the diffraction data (Shirley, 1980); no matter how sophisticated the algorithm and how great the user effort, a poor quality pattern (affected by impurity peaks, low resolution, high background etc.) is often guaranteed to produce the wrong solution. Equally important is probably user experience, as well as a deep knowledge of the crystallographic problem being faced and the inner workings of the indexing algorithms adopted. Nevertheless, the use of automated user-friendly software can often save hours of trial and error efforts, which could be dedicated to more productive and gratifying activities. The software developed in this work aims to offer an easy to use, highly interactive environment for the automation of powder data indexing; while the main focus is new users facing the indexing problem for the first time, the program has also been designed to perform routine work and is thus suitable for experienced and inexperienced diffractionists alike. ReX.Cell binary packages and source code, as well as a quick-start tutorial, are available at http://www.rexpd.org/rex.cell/.

References Altomare, A., Campi, G., Cuocci, C., Eriksson, L., Giacovazzo, C., Moliterni, A., Rizzi, R. & Werner, P.-E. (2009). J. Appl. Cryst. 42, 768–775. Altomare, A., Giacovazzo, C., Guagliardi, A., Moliterni, A. G. G., Rizzi, R. & Werner, P.-E. (2000). J. Appl. Cryst. 33, 1180–1186. Berger, H. (1986). X-ray Spectrom. 15, 241–243. Bergmann, J., Le Bail, A., Shirley, R. & Zlokazov, V. (2004). Z. Kristallogr. 219, 783–790. Bortolotti, M., Lutterotti, L. & Lonardelli, I. (2009). J. Appl. Cryst. 42, 538– 539. Boultif, A. & Loue¨r, D. (2004). J. Appl. Cryst. 37, 724–731. Cheary, R. W. & Coelho, A. (1992). J. Appl. Cryst. 25, 109–121. Coelho, A. A. (2003). J. Appl. Cryst. 36, 86–95. David, W. I. F., Shankland, K., McCusker, L. M. & Baerlocher, C. (2002). Structure Determination from Powder Diffraction Data. IUCr, Oxford University Press. Ladell, J., Zagofsky, A. & Pearlman, S. (1975). J. Appl. Cryst. 8, 499–506. Laugier, J. & Bochu, B. (2000). CHECKCELL, http://www.CCP14.ac.uk/ tutorial/lmgp/. Le Bail, A. (2012). Powder Diffr. 19, 249–254. Loue¨r, D. & Boultif, A. (2007). Z. Kristallogr. Suppl. 2007, 191–196. Neumann, M. A. (2003). J. Appl. Cryst. 36, 356–365. Savitzky, A. & Golay, M. J. E. (1964). Anal. Chem. 36, 1627–1639. Shirley, R. (1980). Accuracy in Powder Diffraction. Washington, DC: US Government Printing Office. Shirley, R. (2006). The CRYSFIRE System for Automatic Powder Indexing. University of Surrey, Guildford, UK. Toby, B. H. (2005). J. Appl. Cryst. 38, 1040–1041. Visser, J. W. (1969). J. Appl. Cryst. 2, 89–95. Werner, P.-E., Eriksson, L. & Westdahl, M. (1985). J. Appl. Cryst. 18, 367–370.

electronic reprint

Mauro Bortolotti et al.



ReX.Cell

261