Monday, 18 January 2010

Listening to NMR FIDs

About ten years ago I implemented a command in MestReC for the acoustic reproduction of an NMR FID. This was motivated by the suggestion of Javier Sardina and also after I found the Web page by Walter Bauer (an excellent musician by the way).
This feature was missing in Mnova which I think is a shame as in my opinion it is a very valuable educational tool. For example, it’s a beautiful way to show that measured NMR frequencies lie in the audio frequency region.
So I have decided to write a script to fill this gap in Mnova. If I remember well, MestReC command played just the real part of the FID. As a minor improvement, I have added stereo capabilities now, basically by using the real and imaginary components of the FID as the two stereo sound channels. Another enhancement is that the sampling rate used to reproduce the FID corresponds to the actual acquired spectral width.

Download the script

Anyone interested in this feature can download the script from this link
As always, your feedback will be very welcome

Thursday, 14 January 2010

On integrating overlapped peaks

Following up from the integration problem raised in my previous post and before I delve into Line Fitting, I would like to give you a quick update on some progress we have recently done in Mnova to facilitate the accurate integration of peaks in those cases in which a multiplet is contaminated by one or several extraneous peaks (e.g. a solvent peak).
Consider the following spectrum predicted using NMRPredict Desktop

As expected (this is a perfect synthetic spectrum and therefore noise-free with no phase or baseline distortions and enough separation between the 3 multiplets) the relative integrals are in agreement with the structure, 1:2:1.
I will now modify this spectrum by adding an extra peak in the H-5multiplet

As a result, the multiplet corresponding to H-5 will show a relative integral of 2 instead of 1. This problem can be tackled by using, for example, some signal suppression algorithm to get rid of this extra peak or by deconvolving the multiplet and then summing up the individual deconvolved peaks without the extra peak.
The aim of this post is to let you know that we have just automated all this process via the powerful GSD algorithm (more about this in a later post) so that dealing with this kind of problems has become much easier than before. As I will describe in depth once the new version with this functionality is released, the user just has to select which peak or group of peaks needs to be excluded for the integration and the program will do the rest. This is illustrated in the figure below where the extra peak (in red) is not used for the integral calculation

Even though this new functionality is not available in the current official release of Mnova, it’s already fully operative in our internal version (alpha). Anyone interested in trying this new feature out is more than welcome. Just drop me a line (support at ) and I will give more detail.

Monday, 11 January 2010

Basis on qNMR: Integration Rudiments (Part II)

My last post was a basic survey on different measurement strategies for peak areas. Manual methods such as counting squares or cutting and weighing, known as ‘boundary methods’ were introduced for historical reasons. These methods were first used by engineers, cartographers, etc, end then quickly adopted by spectroscopists and chromatographers.

In the digital era, most common peak area measurement involves the calculation of the running sum of all points within the peak(s) boundaries or by other quadrature method (e.g. Trapezoid, Simpson, etc [1]). Obviously, the digital resolution, i.e. the number of discrete points that defines a peak is a very important factor in minimizing the integration error. Intuitively, it’s easy to understand that the higher the number of acquired data points, the lower the integration error. It’s therefore very important to avoid any under-digitalization when an FID is acquired, a problem which is unfortunately more common than many chemists realize.

As described by F. Malz and H. Jancke [2], at least five data points must appear above the half width for each resonance for a precise and reliable subsequent integration. What does this mean in practical terms? Typically, acquisition parameters are defined according to the Nyquist condition: the spectral width (SW) and the number of data points (N, total number of complex points) determine the total acquisition time AQ:


And the digital resolution (DR) is proportional to the inverse of the acquisition time, the latter being the product of the dwell time (DW) and the number of increments:

DR = SW/N = DW x TD = 1 / AQ

If we consider a typical 500 MHz 1H-NMR spectrum with a line width at half height of 0.4 Hz (this is a common manufacturer specification) and a spectral width of 10 ppm (5000 Hz), the minimum number of acquired data points required to satisfy the five points rule should be:
5 pt x 5000 Hz / 0.4 Hz = 62500 complex points.

This number is not suitable for the FFT algorithm which requires, generally, a length equal to a power of two. This is done by zero padding the FID with zeroes until the closest upper power of two, in this case 65536 (64 Kb).

Furthermore, in order to get the most out of the acquired data points, zero filling once (adding as many zeros as acquired data points) has been found (see [3]) to incorporate information from the dispersive component into the absorptive component, and hence it is useful to zero fill at least once (which is exactly what Mnova does).. For example, as S. Bourg and J. M. Nuzillard have shown [4], even though zero-filling does not participate in the improvement of the spectral signal to-noise ratio, it may increase the integral precision by a factor up to 2^(1/2) when the time-domain noise is not correlated.

Regardless of the quadrature method, they all share the same systematic problem: in order to integrate one or several peaks it’s necessary to specify the integration limits. In qNMR assays, this is an evaluation parameter whose effect can be estimated using the theoretical line shape of an NMR signal. To a good approximation (assuming proper shimming), the shape of an NMR line can be expressed as a Lorentzian function:

Where w is the peak width at half height and H is its height value. When L(x) is integrated between +/- infinite, the total integrated area becomes:

Obviously, it’s it is unreasonable to integrate digitally from –infinite to +infinite so an approximation must be made by choosing limits. This has been studied by Griffiths and Irving [5] who have showed that for a maximum error of 1%, integration limits of 25 times the line width in both directions must be employed. If errors less than 0.1 % are desired, the integral width has to be +/-76 times the peak width. For example, in a 500 MHz NMR spectrum with a peak width of 1 Hz, the integrated region should be 152 Hz (~0.30 ppm), as illustrated in the image below

But in general, peaks are not so well separated and for example, when studying complex mixtures or impurities related to the main compound, wide integrals cannot be used. In general, integration by direct summation is not adapted to partially overlapping peaks.

For example, just consider the simple case of peak overlapping where, for instance, one peak of the double doublet overlaps within a triplet:

The theoretical relative integrals for the two multiplets should be 1:1. However, the area of the triplet calculated via the standard running sum method will be overvalued because of the contamination caused by one of the peaks of the double doublet which in turn will be underestimated. This is illustrated in the figure below where the green lines corresponds to the triplet, the blue lines to the double doublet and the red line is the actual spectrum (sum of all individual peaks)

The question is: how to overcome this problem? The answer is, of course, Line Fitting (Deconvolution) which will be the subject of my next post.


[1] Jeffrey C. Hoch and Alan S. Stern, NMR Data Processing, Wiley-Liss, New York (1996)

[2] F. Malz, H. Jancke, J. Pharmaceut. Biomed. 38, 813-823 (2005)

[3] E. Bartholdi and R. R. Ernst, "Fourier spectroscopy and the causality principle", J. Magn. Reson. 11, 9-19 (1973)

[4] S. Bourg, J. M. Nuzillard, "Influence of Noise on Peak Integrals Obatined by irect Summation", J. Magn. Reson. 134, 184-188 (1988)

[4] Lee Griffiths and Alan M. Irving, "Assay by nuclear magnetic resonance spectroscopy: quantification limits", Analyst 123 (5), 1061–1068 (1998)