Sunday, 8 October 2017

Free naming of organic structures

Mnova 12 contains some nice little gems that may be specially appreciated by organic chemists. For example, this new version features an improved molecular editor which includes a new tool for the generation of IUPAC names from a molecular structure.




At the moment, it only generates systematic names but next release of Mnova will also support trivial names

Is it really free?

When you download and install Mnova 12, you can get a license for the IUPAC Naming component, with no restrictions. We are still deciding the final licensing model for this feature, but for the moment, this license will be valid for 6 months.  

Saturday, 30 September 2017

Improved User Experience with Mnova 12

In my last post I outlined the major User Interface change in Mnova 12. There are also another bunch of new little features aimed at making user experience even more agile and intuitive. In this post, I’m going to show a couple of them.

New spectral navigation tool

Whilst there were many tools in Mnova for the automatic analysis of NMR spectra, very often it is necessary to zoon in and out to get a closer look at different spectral regions in an interactive way. Mnova already had different commands for those operations but it lacked the ability to go back and forth between the different zooming operations. It was possible to use the undo/redo commands for that purpose, but this would not work if other commands were applied in-between two zooming comands.
Mnova 12 introduces two new commands that can be used to go to the previous or next zoom applied to the spectrum (1D or 2D). Those new command are available either in the View Ribbond tab or in the spectrum toolbar as shown in the picture below



.
It is also possible to use keyboard shortcuts: Shift + left/right arrow keys

Magnifying fonts

 Sometimes I get Mnova documents generated by someone else in which the font size of different elements is just too tiny. Changing the font size for the multiplet labels, scales, integrals, assignments, etc is a tedious and cumbersome task. 
Now by simply pressing Ctrl + or Ctrl -, all fonts in an Mnova document will be magnified up and down. It can also be done from the View tab as shown below:


Wednesday, 27 September 2017

Mnova 12 Introduces a New Look and Feel

Yes, it is official, Mnova 12 has finally been released! There's quite a lot to tell about it: better interface (optional), new processing and analysis features, improved tools, 64 bits and so on.
Rather than making a comprehensive review on the new features of this version, I’m going to try to show the essentials changes in digestible chunks, starting with changes in the User Interface.

Embracing the Ribbon interface

Mnova started as an NMR only application with limited functionality. Over the years, the application has been growing steadily, both in terms of NMR functionality and the addition of new plug-ins such as LC/GC/MS, molecular editing, DB, just to cite a few. 
As a result, what initially fit seamlessly within a traditional user interface (with menu bars and toolbars), has become an increasingly complex application to navigate, particularly when more than one plug-in is installed. 
For a few years we have been analyzing carefully alternatives to de-clutter the user interface. After much discussion, we finally came to the conclusion that the Ribbon interface was really the one that best suited our needs (or, more importantly, yours).


One of the most interesting features of this interface is that it allows you to focus on a particular plugin (e.g. NMR) without the functionality of another plugin getting in the way.

Hate the Change? No problem

We understand that this change is drastic and not everyone will be happy with it. So, what if you absolutely hate this new interface? No problem, you won’t be forced to use it! You will just be able to switch it off in the Preferences (Modern == Ribbon).



Nevertheless, from my point of view, the Ribbon interface improves usability and User Experience and therefore I strongly recommend it ahead of the traditional User Interface. This is our first ribbon implementation and, therefore, I am sure it still has a lot of room for improvement. If you use it, any suggestions will be very welcome!

Friday, 22 September 2017

ELNs and the importance of live analytical data

Setting the scene

Over the last 25 years, during my bachelor's degree, PhD, Post Doc, and now as director of R&D at Mestrelab, I have had the opportunity to interact with many organic chemists. Most of them, although with their own singularities, share relatively similar procedures and workflows, with their strengths and weaknesses. I have witnessed many advances in the way they conduct their research, but I also must say that there are some areas of it that remain firmly rooted in the past.

An example of the latter which I’m still seeing in many labs is the issue of data loss: In the particular case of academia, research teams are typically made up of (pre)doctoral or postdoctoral students whose residence time is usually between 3 and 8 years, roughly speaking.

During that period, they produce an enormous amount of spectroscopic data (NMR, GC/LC/MS, UV/IR, etc.) to characterize their molecules. Whilst some groups have some sophisticated IT infrastructures equipped with either in-house or third party DBs (including Mnova DB for analytical data), I think it is not unreasonable to say that most of them save their spectroscopy data on their personal computers (e. g. laptops) or in shared folders of their research group (e. g. Dropbox). Data leakage is the result as students leave.



If you're a principal investigator, I'm sure you've found yourself in the following situation: one of your students synthesized a compound some time ago. However, for some reason, you are now considering the possibility that the proposed structure may not be the right one. Obviously, to review this structure, you need to have access to the original spectroscopic data, but unfortunately, the student is no longer part of your research group and you have no way of locating the NMR spectra.

In the same plot line, some students only keep the spectroscopic data of the products that they have successfully synthesized but discard the data of those reactions that did not work in the way they had planned.

These are just two examples of what I consider to be a more general problem associated with the difficulty of efficiently managing analytical information in an organic chemistry laboratory.

Nowadays, many labs are moving from paper-based to electronic laboratory notebooks (ELNs) that offer significant benefits for long-term storage. However, most of them lack the capability to understand and handle spectroscopy data in an integrated manner. Some of them are just repository of PDFs of analytical data generated by some specialized software. This is, in my opinion, a very limited, unproductive and inefficient solution to the extent that data generated in this form has been dubbed as “dead data” where all the valuable spectroscopy information has been removed, reducing it to a series of unstructured set of images and text strings. As it is stored today, analytical data is virtually unusable and tasks like the ones listed below are simply impossible to perform:


  1. NMR data could have been processed incorrectly making a comprehensive analysis of the data unfeasible.
  2. Only some parts of the spectrum could have been reported or the resolution is too low to characterize a compound unambiguously. For instance, accurate determination of coupling constants, inspection of possible impurities or side products in a reaction would not be possible.
  3. Spectroscopic data search: Do I have any spectrum that contains a triplet at 3.5 ppm? This is a question that could not be answered with dead data.
  4. Do I have any spectrum similar to this one?

Some ELNs, in addition to PDF or plain images, also store raw data but do not offer a solution with real spectroscopy intelligence capabilities within a searchable and homogeneous environment.

Mbook 2.0: A spectroscopy-aware ELN



Our ELN, MBook 2.0 is our answer to those issues. It has been designed to take advantage of all the power of Mnova which is tightly integrated with Mbook and is responsible for processing the analytical data acquired by the chemist. The scientist only needs to send the data in a zip file and Mnova will automatically recognize the file format (NMR data such as those from Bruker, JEOL, Varian / Agilent, Magritek, Thermo picoSpin, Nanalysis as well as many LC/GC/MS and UVIR files) and process in a fully unattended way. As a result, a new Mnova document is generated on the fly and saved into the ELN.


This file can be accessed and viewed directly from within Mbook with a new spectral viewer which provides basic navigation tools such as zoom-in and out.  

At this present time Mbook 2.0 does not include spectral search capabilities, but we expect to offer this feature shortly once the integration of Mbook with Mnova DB is completed

Saturday, 5 December 2015

Stanning: A new NMR apodization function


Apodization refers to the mathematical processing technique by which the FID is multiplied pointwise by some appropriate function in order to improve the instrumental line shape. The term apodize actually derives from its Greek meaning “removing the feet”. The feet being referred to are actually the side-lobes found in the FT spectrum resulting from zero-filling a truncated FID (this phenomenon is also known as leakage).  
Probably the most widely used apodization function in NMR, especially in 13C spectroscopy, is the Exponential function although other functions such as Hanning are also very popular.
In this short post, I want to introduce a new apodization function, the so-called Stanning function which gives superior results compared to Exponential and Hanning apodization functions.
The name Stanning is a play on words which combines Hanning (which forms the basis of this function) with Stan, the inventor of this apodization function to whom all credit should be given.
The performance of this apodization function is illustrated with a 19F NMR spectrum whose FID is shown in Figure 1.

Figure 1

This FID consisted of ca 59K acquired data points which are then extended by zero filling to a final size of 128K. As the FID has not fully decayed to zero during acquisition, resulting FT spectrum will show the expected truncation artefacts, as shown in Figure 2.

Figure 2
Multiplication of the FID by an exponential function, in this case with a line broadening value of 1.0 Hz results in the following spectrum where the wiggles have been significantly reduced but not in a totally satisfactory way (see Figure 3).

Figure 3

Application of the new Stanning function yields the result depicted in Figure 4. As it can be seen, the truncation artifacts have been further reduced whilst the resolution of the spectrum is slightly better compared to the exponential function.

Figure 4

The mathematical formulation of Stanning as well as some additional illustrative examples will be covered in a future blog post. 

Saturday, 2 May 2015

NMR for iPad and Android: Beta testing




We at Mestrelab are delighted to announce our first iPad / Android app ever, Mnova Tablet. You won’t find it in the google or iPad stores though as it is still in the final Beta testing stage, but from these lines I’d like to welcome anyone willing to test it out. 
Just send me an email at carlos-at-mestrelab.com and I’ll be more than happy to give you the details on how to Beta test it for the platform of your choice


There is also an article in Magnetic Resonance in Chemistry which describes the main features of the app and how it was developed from a more technical point of view.



Free

The beauty of this app is that it provides a very simple and enjoyable mobile experience for NMR data processing and viewing, not to mention the fact that it’s free, at least for the basic functionality. This is how it works:

The free version reads all NMR data (including molecules) supported by Mnova (meaning that virtually all NMR data files will be supported) and transform the raw NMR data automatically, if need be. It also allows basic graphical manipulations, including zoom-in, panning, and spectral intensities expansions.
On the other hand, in order to edit or change any processing operations (apodization, phase, baseline, etc) or apply any analysis (peak picking, integration, multiplet analysis), it will be necessary to pay a small fee via in-app purchases in the Google or Apple stores. More details about this as soon as the official release becomes available.

Key features

  • Automatic processing of 1D and 2D NMR data sets in multiplet formats (Bruker, Varian/Agilent, Jeol, Magritek, Oxford Instruments, Nanalysis, Thermo picoSpin, amongst others)
  • Support of 1D arrayed experiments
  • Processing of 2D-NUS spectra
  • Dropbox support
  • Ability to import spectra directly from the email client and share the spectra or images to social media


Screen shots




Friday, 10 April 2015

Mbook: A new Electronic Laboratory Notebook that speaks NMR




When we founded Mestrelab back in 2005, our only commercial product was 100% about NMR data processing / analysis. Over these years, our NMR products have matured with an increasing number of features and robustness. At the same time, we have released other products such as LC/GC/MS and analytical DB software.
This week, we have released a new brand product, Mbook: This is an electronic Lab Notebook which we have been developing in collaboration with the Universities of Santiago de Compostela and Vigo, both in Spain.  
There are many ELNs out there already so why have we ventured into developing a new one? The short answer is that we believed that most of the existing solutions lacked a real integration between chemistry (i.e. reactions) and analytical data (e.g. NMR): One of the unique features of Mbook is that it is tightly integrated with Mnova so that any analytical data supported by the latter (1D & 2D NMR, LC/GC/MS) will be automatically handled by Mbook. Technically speaking, Mbook comes with a special version of Mnova which runs in the background. This means that when you upload, for example, and NMR experiment (i.e. raw FID), Mbook will process it automatically for you (via Mnova) so that you will see the processed spectrum automatically in your reaction. Of course, the raw data will always be available should you want to process it differently, either with your Mnova client or with any other NMR processing software.


Another feature worth mentioning is that Mbook has been designed solely and exclusively for synthetic organic chemists. If you do any other type of chemistry, Mbook will not be for you. If you are an organic chemist and you are looking for a new ELN, please give Mbook a try, we will be very happy to hear your feedback!
Oh! And it will soon be available as a native Android and iOS application, and, on that, we think it might be the first of its kind!

Sunday, 14 December 2014

Quadruplet, triplet … so simple?

In the picture below I’m showing the ‘synthetic’ NMR spectrum of Ethanol. It has been synthesized using Mnova Spin Simulation capabilities and the experimental values (chemical shifts and couplings) taken from the NMR spectrum of ethanol recorded at 600 MHz in water, so the OH signal will not show up.






Nothing new under the sun. This is a very simple spectrum where the two observed multiplets seem to follow very nicely the well-known first order multiplet rules that most chemists use on daily basis. In this case, a very simple A3X2 spin system.
But does this mean that this spectrum is actually composed by only 7 peaks? The answer is, of course not, there are many more peaks! But because of the very limited resolution, most of them are not observed and merge in such a way that only 7 peaks are ultimately observed.
In other words, the number of NMR transitions is usually much larger than the number of peaks we actually observe in the spectrum. Just to give an example: A molecule containing 30 coupled protons will result in a spectrum having 16106127360 (=1.61E+10) transitions. As its corresponding NMR spectrum will show only about 100-200 peaks, that makes it well over eighty million quantum transitions per resolved peak!

For example, let’s magnify the quadruplet and use Mnova unique capabilities to display the individual transitions by simply hovering with the mouse cursor over the atoms in the molecule (CH2 in this case). We can see that there are some ‘hidden peaks’, these are the NMR transitions calculated by diagonalizing the NMR Hamiltonian.

These transitions are so close that they cannot be resolved under the usual NMR resolution conditions. In fact, to separate all these signals, it would be necessary to have a spectral resolution of < 0.01 Hz

Whilst this is far from being feasible experimentally nowadays, it is easy to do numerically. In the figure below I’m displaying the same synthetic spectrum of Ethanol but this time synthesized using a line width of just 0.01 Hz and 1 MB of digital data points. Now the individual transitions can be seen as resolved peaks so in this example a transition will be virtually equivalent to an NMR peak.   



Simply put, an NMR spectrum is just a superposition of all spectral transitions (which can be in the order of millions), transitions compose peaks, peaks group into multiplets, and multiplets compose the spectrum.

The ability of Mnova to show the individual NMR transitions in a synthetic spectrum can be a good teaching tool

For a more theoretical and rigorous discussion on NMR transitions, see A.D. Bain, D.A. Fletcher and P. Hazendonk. "What is a transition?" Concepts in Magnetic Resonance 10 85- 98 (1998) (link)


Saturday, 20 September 2014

From NMR multiplets reports to synthetic spectra

I admit that I was never a fan of the traditional way in which NMR spectra are usually reported in organic chemistry journals, something like:

1H NMR (300 MHz, CDCl3) 7.91 (d, J=8.2 Hz, 2H), 7.31 (d, J=8.2 Hz, 2H), 3.65 (t, J=6.3 Hz, 2H), 3.13 (t, J=6.9 Hz, 2H), 2.95 (p, J=6.9 Hz, 1H), 2.20 (p, J=6.6 Hz, 2H), 1.26 (d, J=6.9 Hz, 6H)

It is not only that there is not a standard format that is strictly followed by all journals. It is also that it does not convey all the NMR information contained in the actual spectrum (reducing a spectrum into a multiplet report results in an irreversible loss of important information) and facilitates the job to those willing to cheat ( see this and this).

Today, in the 21st century, I don’t see any reason why the experimental raw data (i.e. FID+metadata) should not be an integral part of any article where NMR spectra have been used to characterize a chemical structure. In any event, there are millions of articles with NMR spectra in the form of those old fashioned multiplet reports and we thought that it would be a good idea to implement some tools to facilitate the analysis of those reduced spectra.

That is why we developed the Mnova script “Multiplet Report to Spectrum”, a tool which is available in Mnova from the scripts menu:



It is very easy to use: Once this command is issued, you only need to copy to the clipboard your multiplet report from the article (PDF, Word document, etc) and paste it into the Multiplet report edit box at the top of the dialog:


As soon as it is pasted, this application will parse the multiplets and the different fields (chemical shifts, number of protons, multiplicity, solvent, nucleus, etc) will be automatically populated. If for any reason some of those values are not correctly parse, you can manually amend them.
Once you are happy with those values, you can press OK so that Mnova will synthesize a spectrum with those values.



We believe that this is a very useful tool, in particular for organic chemists. It can be used to easily compare an experimental spectrum with a multiplet report from a journal, for example.


Thursday, 31 July 2014

PCA and NMR: Practical aspects

As of version 9.0, it is possible to perform PCA of NMR data sets directly from within the Mnova User Interface without having to resort to third party applications. The basic PCA functionality has been previously covered in this blog (see Chemometrics under Mnova 9 – PCA) and in this entry we are going to discuss in more detail some more practical aspects, particularly on the different binning, filtering and scaling options. 

What follows has been kindly written by Silvia Mari (project leader of the PCA module) and Isaac Iglesias, who programmed this module in Mnova.

Introduction

Matrix generation from an array of NMR spectra is the core step in chemometric analysis. This procedure involves several options that the user should chose. In this entry we want to focus on the practical aspects concerning matrix preparation from NMR data. Broadly speaking, we can consider three main issues:
  1. Choice of binning method: Sum vs Peak
  2. Filtering or not filtering?
  3. Choice of Scaling strategy

Choice of binning method: Sum vs Peak


When dealing with high resolution NMR spectra it is in general impracticable to work with the entire data points of the spectra which are usually in the order of 32Kb and bigger. The most common strategy used to reduce the number of variables consists in dividing each spectrum in a defined number of regions, the so called bins.  Several binning strategies are available today, from regular binning, where bins have fixed width, to more sophisticated strategies such as gaussian or dynamic adaptive binning [1]. But even for these cases, when dealing with particularly crowded spectra, it usually happens that shifts in peaks close to bin boundaries can cause dramatic quantitative changes in adjacent bins. A good help in solving this problem could come from peak deconvolution strategies.  Generally speaking, a deconvolved peak is a mathematical entity characterized by a chemical shift (frequency), intensity and half-height line width. The integral of a peak can be automatically derived assuming a peak shape (i.e. Lorentzian) and the intensity and line width. For this reason, binning a spectrum of deconvolved peaks reads out virtually completely the problem of bin boundaries as illustrated in figure 1.



 Figure 1 – Binning real peaks versus binning deconvolved peaks

When dealing with an array of NMR spectra, whilst regular binning of a number b of bins over  stacked spectra containing  s spectra will generate a matrix bxs (see figure 2), it is not possible to generate a similar matrix using directly deconvolved peaks (peak list) since the number and position of peaks varies from spectrum to spectrum



Figure 2 – Matrix generation from regular binning or peak list.

To encompass this problem there are two main strategies: (1) provide algorithms for peak alignment over the spectra series, as well as strategies for dealing with missing peaks in order to end up with the same number of peaks and the same peak positions for all the spectra; (2) perform binning over the peak table.

In the PCA module available in Mnova, we adopt the second solution. User can decide whether to use regular binning (Sum) or binning over deconvolved peaks (Peak) from the binning options. An example of better classification is qualitatively represented in figure 3, where score plots are represented for binning using Sum method (panel A) and binning using Peak method (panel B).



Figure 3 – Score plots obtained using same bin width of 0.03ppm; in both cases data were normalized by the sum and pareto scaled. In panel A bins were obtained directly as integration of real spectra; in panel B bins were obtained by binning of the corresponding peak list obtained after global spectral deconvolution.

Filtering or not filtering?

When reducing bin width to approximate spectral resolution, and hence increasing the number of variables, it is generally required to introduce filtering strategies in order to filter out those variables that do not show significantly changes. There are established filtering strategies that are commonly applied to genomics type of data and that could also be successfully used for NMR-based type of data[1].  In the PCA module we have implemented five filtering options, namely: 
  1. Standard Deviation
  2. Median Absolute Deviation
  3. Interquartile Range
  4. Mean Value
  5. Median Value 


In the first three cases a fixed fraction (default 10%) of the bins is discarded (e.g. if the matrix is composed by 100 bins it means that 10 bins are discarded) and the selection is based on the Filter method chosen. In the case of Mean Value or Median Value, user is asked to input a value for the Mean or the Median. By doing so, only bins that display a lower value of the inputted one are discarded. In the following figure, the difference in clustering capability when the filtering is applied or not is illustrated. Finally, it worth noting that very often, NMR data can contain regions which should discarded and included into the so called blind regions; these regions will not be taken into account in the principal component calculation.




Figure 4 - Score plots obtained using same bin width of 0.01ppm; in both cases data were normalized by the sum and pareto scaled. In panel A no filter was applied; in panel B filtering strategy based on Mean Value was applied. A cut-off value of 100 was used.

Choice of Scaling strategy

Scaling is an operation that is performed on the variables (columns) of the matrix. Scaling strategy depends from one hand from the biological information we wish to extract, but on the other hand also on the data analysis method chosen (in our case PCA). As a first approach the so-called Centering is generally applied to every analysis. With Centering all bin values fluctuate around zero instead of around the mean of each bin; therefore Centering is a method that adjusts for differences in the offset between high and low abundant compounds. There are several methods available in literature for scaling [3], and generally centering is applied in combination with these methods. Scaling strategies could be divided in two subclasses:  methods that use data dispersion (such as standard deviation) as scaling factor; and methods that use size measure (such as the mean). For the first group Mnova includes Auto, Pareto and  Vast scaling strategies. For the second group Range and Level scaling are available. Generally speaking, when dealing with PCA analysis, the first group is normally preferred. Figure 5 shows score plot differences between PCA that used Pareto scaling (A panel) in comparison with PCA that used Level scaling

Figure 5 - Score plots obtained using same bin width of 0.05 ppm and normalization by the sum. In panel A Pareto scaling was applied; in panel B Level scaling was applied.

Conclusions

We have focused on some very practical aspects when dealing with PCA analysis. But it is always necessary to think about how good was our experimental design. Quoting Stanley Deming [4] in his overview of Chemometrics of 1986: ”Chemometrics is primarily concerned with the acquisition of data and the extraction of useful information from that data” and again:” In a given situation, it is far better to err on the side of too many pieces of experimental data. If too few data are available, one might not be able to make any conclusion, and the whole set of experiments will have been wasted”.

Acknowledgments

We are grateful to Dr. Giovanna Musco and Dr. Jose Garcia-Manteiga for providing dataset for testing purposes.


References

[1] Amber J Hackstadt, Filtering for increased power for microarray data analysis. BMC Bioinformatics 2009, 10:11

[2] Paul E. Anderson, Metabolomics, Volume 7, Issue 2, pp 179-190 (2010)

[3] Robert A van den Berg, Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics 2006, 7:142

[4] Stanley N. Deming, Chemometrics:an Overview. CLIN. CHEM. 32/9, 1702-1706 (1986)