JOURNAL
OF MAGNETIC
RESONANCE
83,400-403
(1989)
COMMUNICATIONS TRAWIATA-An Efficient Algorithm to Decreasethe Transformation Time of Multidimensional NMR Arrays SANDORSZALMA Institute of Pharmaceutical Chemistry, A. Szent-Gy6rgyi Medical University, P. 0. Box 121, Szeged H-6 720, Hungary Received January 10, 1989
An important and time-consuming step in one- and multidimensional NMR spectroscopy is the transformation of FIDs to spectra. Beyond the use of a fast Fourier transformation (I) (FFT) algorithm as a software tool in commercially available NMR spectrometers, it is possible to increase the computation performance by means of FT processors, which implement the algorithm as hardware. The FFT is very useful for the transformation of one-dimensional FIDs: even the built-in NMR spectrometer computers perform this step in imperceptible time. In two-dimensional maps, even if there are relatively few points in one dimension, the amount of data to be manipulated is huge, and thus the transformation requires the use of an array processor; for relatively good resolution, typical processing then takes from several minutes to several hours. This fact is discouraging for an NMR specialist if processing parameters need to be adjusted, and thus the same map must be transformed several times. For the transformation of multidimensional FIDs, the situation becomes dramatic. The computer transforms a huge amount of redundant data, even if the operator picks out some interesting regions before the third FT (2). The processing time increases to several hours and the value of the automated transformation is lost. There are some possibilities for overcoming problems arising from long computations and large data arrays if zero-filling is applied to increase the resolution. The first possibility is a technical one: through the use of soft pulses (3), for example, the data arrays can be reduced. This method involves some serious difficulties; e.g., it requires a pulse-shaping unit and the spectrum must contain well-separated groups of peaks. The second possibility is to use parallel computing and computers for the FFT (4), but this is also still not a common possibility. Instead of these methods, we propose a very practical and useful procedure, TRAWIATA (time reducing algorithm with irrelevant arrays thrown away), which connects the FFT algorithm with a peak-recognition algorithm; by means of this, the redundant information in a multidimensional FT can be eliminated automatically, even after the first transformation. Therefore, depending on the information content of the spectrum, the transformation time can be decreased several-fold, and the reduction of data arrays is also possible. The essence of the method is that a peak-search algorithm is used before every consecutive step after the first transformation in a multidimensional FT (Fig. 1). 0022-2364189 $3.00 Copyright Q 1989 by Academic Press, Inc. AU rights of reproduction in any form reserved.
400
COMMUNICATIONS
401
The peak-search procedure is a simple logical procedure, i.e., at each point in the columns, consideration must be given to whether the intensity exceeds the earlier determined threshold or not. This threshold can be determined either automatically (by means of statistical methods) or mechanically (by hand). If there is at least one point for which the statement is true, the FT is completed for this column. If the statement is false for each point in the given column, the FI is not completed and this column is filled with zeros. The reason for this peak search can be understood if the information content is defined. The information content means mathematically the portion of the spectrum from which information about the measured object can be derived. First let us assume that the information content of a ID spectrum of a medium
dim;m
,...) ritdim);irpv(l,l)
,..., ir&2,n(l)x...m&im))
FIG. 1. The flowchart of the method.
402
COMMUNICATIONS
FIG. 2. The spectra of a three-dimensional theoretical FID. The 2D cross sections were plotted at the same o from the 3D spectra. The program was written in Pascal and run on a Tandon (IBM PC/AT compatible) computer with an Intel 80287 arithmetic coprocessor. (a) Only triple real (cosine) Fourier transformations were carried out. The processing time for the I6 X 16 X 16 data matrix was 178 s. (b) The same data matrix was processed with peak search before the second and third Fourier transformation. The processing time was 108 sand no information was lost.
size molecule, i.e., the information density, is 0.4. This means that the intensities of 40% of the data points in the total frequency range exceed the noise level. It is clear that this information density decreases with increasing dimension; e.g., the information density decreases to 0.16 and 0.064 for 2D and 3D spectra, respectively. In multidimensional NMR, therefore, the mixed domain spectrum after the first FI contains a huge amount of redundant data, and our method efficiently removes these irrelevant parts. Since the peak-search operation is fast, and the larger part of the second, third, etc., FT can be omitted because of the earlier assumption about information density, this method shortens the computation time required (e.g., if the three dimensions in 3D NMR have the same number of data points and no zero-filling is applied, the maximum reduction factor is about 2 (Fig. 2)). For multidimensional data arrays with unequal numbers of points in each dimension, an important question is the direction of the first FT. This can be seen by examining the following example. In an m X y1two-dimensional data array, the numbers of multiplications for the two possibilities are A:
n X m Xlog,m
+(m X k)X n X log2n
B:
m X n X log,n + (n X k) X m X log*m,
where k is the information density, and for an m-point FFT the number of multiplications is m X log*m. If m > n, then A > B. Therefore, it is better to start the FT along the direction with fewer data points, and thus the number of multiplications and the processing time are decreased in comparison with the inverse case. This statement is true for higher dimension FIT, of course, and makes the method very efficient and useful. The program is running on a Tandon TM 7 104 computer under the MS-DOS operating system and it is available on request. ACKNOWLEDGMENTS The author is very indebted to Istvan Pelczer (Institute for Drug Research, Budapest) for many helpful discussions, and to Dr. Jozsef Dombi (Automata Research Group of Hungarian Academy of Sciences, Szeged) for providing the Tandon computer.
COMMUNICATIONS
403
REFERENCES
1. (a) J. W. COOLEY
AND J. W. TUKEY, Math. Camp. 19,297 (1965); (b) R. R. ERNST, in “Advances in Magnetic Resonance” (J. S. Waugh, Ed.), Vol. 2, p. 1, Academic Press, New York, 1966; (c) R. R. ERNST, G. BODENHAUSEN, AND A. WOKAUN, “Principles of Nuclear Magnetic Resonance in One and Two Dimensions,” Clarendon, Oxford, 1987. 2. (a) C. GRIESINGER, 0. W. ~RENSEN, AND R. R. ERNST, .L Mugs. Reson. 73, 574 (1987); (b) C. GRIESINGER, 0. W. SORENSEN, AND R. R. ERNST, J. Am. Chem. SOS. 109,7227 (1987); (c) G. W. VUISTER AND R. BOELENS, J. Magn. Reson. 73,328 (1987). 3. R. BR~~SCHWEILER, J. C. MADSEN, C. GRIESINGER, 0. W. SQIRENSEN, AND R. R. ERNST, J. Magn. Reson. 73,380 (1987). 4. D. J. EVANS AND S. MAI, in “Parallel Algorithms and Architectures” (M. Cosnard, Y. Robert, P. Quinton, and M. Tchuente, Eds.), p. 47, North-Holland, Amsterdam, 1986.