Saturday, July 23, 2011

cute NMR

Among the many unfinished open source projects, cuteNMR is worth of some attention. It is not usable, but at least it works. One of the high points is the dialog for manual phase correction. Though nothing spectacular or innovative, it is much better than the one you can find inside NPNMR.

Thursday, July 21, 2011

The Pleasure of Writing the Truth

We chemists can publish hundreds of figures. Just think at the experimental section of an average article and the part of that section that describes NMR data.
How many times you find the symbol "m" for multiplet? It's a lot of times. Sometimes really there was no viable alternative, other times, however, it was possible to describe that multiplet (or rationalize it) as "ddd" or something similar. It does not happen because of laziness. The values of the coupling constants are not reported in such a case.
Other times the J values are reported, but under the first order approximation. We know that this approximation is often valid. We also know, however, that many times it is not accurate. Modern NMR programs includes analyzers of first-order multiplet. It's unfortunate that their marketing always forgets that second order spectra exist in abundance! Obviously people begin to believe that this ignorance is forgivable ("Everybody is using that pretty multiplet analyzer…").
Methods to simulate a spin system and fit it against a complex experimental spectrum have been available for decades. They aren't completely automatic and require a little of attention and time by the part of the user. This small investment is balanced by the fun of fitting (because normally it's funny).
Last, but not least, when it's time to write your articles you know your figures are as true and accurate as they can be!
Strangely I don't remember any cross-platform program that performs both simulation and fitting. I remember SpinWorks, WinDNMR and Perch for Windows and iNMR for the Mac. Three general methods (algorithms) are known: LAOCOON, Total Line Shape Fitting and manual fitting. The latter is not an algorithm and has no mathematical basis, yet it's often the most practical one. It is very useful to have all the three methods inside the same program, and it should be an all-purpose processing program (you save the effort of moving data between applications).
I have gathered a few links in case you want to practice the art of simulation on your Mac:

Tuesday, July 19, 2011

Glassy Contours

This is a new concept in the art of plotting. Only one color is used for positive peaks and another color for negative peaks. The difference among the levels is a different value of the alpha channel. Click the picture to enlarge.
This option is featured in iNMR reader 4.1.5 and iNMR 4.1.6.

Saturday, July 02, 2011


There are too many reasons why any wise guy will never write a program to process or visualize NMR spectra on the iPad. What's the iPad? A small, light-weight device that you can use to read books and newspapers, watch pictures and movies, hear music, play games. It's a machine to enjoy contents created by some other means. If you realize this, you conclude that the iPad comes ready to watch NMR spectra as well, provided that those spectra are saved as PDF.
I think that one day tablets will substitute the PC as we know it today. That day tablets will have evolved from the iPad to something bigger, less closed, backward compatible with the PC. Then you will see NMR applications for the iPad, but the iPad will be a complete different thing from what it is today.
The iPad is closed system. The programs are sold through a single store. Only the owner of the store decides what will be sold (or freely distributed) and when it will be released. If your program is accepted, your problem aren't finished yet. Soon or later a user will discover a bug, and you will want to release a new version. You and the users will continue suffering for another week or two, until Apple decides to release the new version.
The NMR market is composed by two sectors: the industry and the academy. The App store is composed by one sector: the consumer market. Do you see any intersection? I see none. Actually, many industries refuse the idea of buying software on the App store.
The main problem is that writing a program requires time and time has a cost. Many people would say: "We don't need anything sophisticated. Give us the simplest thing", forgetting that the simple software has never been successfully, especially in the NMR field. Do you think that SpinWorks has been more successful than XWin-NMR? The former was simple, free and relatively unknown. The latter was big, complicated, expensive… and famous! Even if we try to forget this history lesson, writing a small program is still very very costly. For most programmers, and for all NMR programmers, the OS of the iPad is a foreign language. You can learn it, but it takes 1 or 2 years of study and practice before you become productive. You need a sound reason before spending 2 years of your life. This sound reason can be the project of writing 100 small programs or 1 big program. No wise man will spend 2 years of his life to write a single stupid program.
With a few exceptions, today's NMR programs are cross-platform. From the point of view of the customer, a cross-platform product is a safer investment. The same is true for the makers. Actually it will be hard to survive for single-platform software. Putting our issue into this context, the question becomes: "Which of the existing NMR software is easier to port to the iPad?". MestreNova is based on QT, which permits "the creation of applications for Symbian and Maemo, MeeGo (Nokia N9) in addition to desktop platforms, such as Microsoft Windows, Mac OS X, and Linux". No mention of iOs. No chances to see MNova on the iPad. Other NMR programs are based on Java, an established standard. Do you know that the iPad does NOT support Java? In other words, the iPad was designed to be incompatible. If you buy it, you should know it. After examining all the existent NMR software, the best candidate for a port is iNMR, because it is written for Mac OS X, therefore many pieces of code can be recycled unchanged or with minimal change. A lot of work is still required, though. Will it be remunerated?
That's the sad part of the App store, and of the software market in general. People don't understand the difference between a game and NMR software. The former can sell 1000 copies in a single day. If the cost of making the game was 50 thousands dollars, you can sell it at 3 dollars. You have covered the cost in 1 month. The public feels that 3 dollar is the fair price for any kind of software. Making an NMR software can cost the double: 100 thousands dollars. Just because we are optimistic, let's assume it will sell a copy per day, for a period of 2 years. Calculating the percentage that Apple takes for itself, the correct price would be 200 dollars. At this price, alas, it can no more sell a copy per day, maybe 2 copies per week (we are over-optimistic). The price for sustainability would then become 700 dollars, more than the iPad itself! At this price nobody would buy it. And we haven't counted the cost for after-sale support, an essential ingredient of a respectable NMR software.
My impression, however, is that NMR software and the App Store are two distant worlds. Before becoming reliable, usable, comfortable, NMR software requires several years of growth. The App Store, instead, favors games of fast success and fast decline.
The last chance is to find an hobbyist who will write this program for pure pleasure. The chemists I know barely have the time to read the manual of a program. Will they find the time to read the documentation of Apple's iOS and to write a program?