## Wednesday, October 03, 2007

### Gratis

There are two ways to simulate an NMR spectrum. I call them the direct method and the indirect method. With the latter, you build the Hamiltonian of the system, in the absence of pulses and relaxation. After diagonalization you have the eigenvalues and the eigenvectors. From them you can easily calculate the frequencies and the probabilities, respectively, of all transitions. (For the probabilities you also need the operator F-, which is easy to build). Now you can create a 1D ideal spectrum, approximating the effect of relaxation with a more or less arbitrary line width. This method is quite popular in liquid NMR. Systems with up to 10 spins are commonly handled. Each additional nucleus slows down the calculation by, roughly, an order of magnitude. Approximate methods have been developed to decompose larger systems.
To simulate multi-pulse experiments you need what I call the direct method. The role of the eigenfunctions is now taken by the density operator, the role of the Hamiltonian is taken by a propagator (which is an exponential form of the Hamiltonian) and F- is still used, in the end, to compute the FID. The difference is that each pulse, each delay, each decoupling, etc... requires a different propagator. The density operator contains the information about the system at each moment. Up to this point, the calculations are performed into the Hilbert space. It's a space where each dimension corresponds to an energetic level. If you want to put relaxation and chemical exchange into the picture the Hilbert space is not enough. You need the Liouville space, where each dimension corresponds to a transition (line). Consider, for example, a system of 3 protons. It has 8 different levels (2x2x2=8). The Hamiltonian is a 8x8 matrix (whose largest block is only 3x3, however). The number of transitions is 15 (1x3+3x3+3x1=15). The density operator is a vector of 15 elements in the Liouville space. A superoperator acting on it is a 15x15 matrix.
I have tried to simplify things as much as possible. The bottom line is that the simulation of complex experiments is computationally demanding. It is popular in the NMR of solids and almost ignored in liquid NMR. This becomes a practical problem if you simply want to simulate a COSY. I am giving some URLs for this case at the bottom. There are many more alternatives for the simulation of solid-state NMR. In theory you can use the same programs to simulate any kind of NMR experiment. In practice I don't know anybody who is using them to simulate the spectra of solutions. There are a lot of programs to choose among. As it always happens when there is academic competition, everything is free, well documented and well supported. When only one program survives, you can bet it goes commercial. The list of good news goes on. The main programs are amply described in the scientific literature and, in some cases, you can read the articles on the web without paying. There is so much information that I am useless. You can continue your exploration from the article on SPINEVOLUTION. Being it the latest arrival, its introduction covers the state of the art.

SPINEVOLUTION (Veshtort & Griffin)
Available for Windows, Linux, Mac OS X (PPC or Intel). Receives all the input from a text file and exports the output into another text file. There is no graphic interface. The current version (3.2) "expires on September 1, 2008 (by that date, another version with a later or no expiration date will be available)".
article (also manual)

SIMPSON (Bak, Rasmussen & Nielsen)
Available for Windows and Linux (it's unclear which versions of Mac OS X are supported). Open source, GNU public license. Written in C, receives input through a Tcl input file. "In order to form a self-standing simulation environment, the SIMPSON simulation package contains a collection of productivity tools SIMPLOT, SIMFID, and SIMDPS".
web site
article (also manual)
forum

DMFIT (Dominique Massiot)
A Windows program that "enables fitting of solid state (and liquid) NMR spectra, including 1D and 2D datasets"."This program is an evolution of the Winfit program developed with Bruker".
web site
article

BLOCHLIB (Bo Blanton)
Open Source (GNU). The web site says nothing, but once you download and open the tar, you find everything: the documentation, the examples, the source code and the instructions to compile it (requires gcc, already present into Linux and Mac OS X; use cygwin to compile on Windows).
"BlochLib is an expression template library of generic data structures and algorithms to perform large scale nuclear magnetic resonance classical and quantum mechanical spin simulations, with many I/O capabilities, and integrated numerical routines".
sourceforge
abstract
web site of the author

QSIM (Helgstrand & Allard)
Windows program, but part of it (called HME) is distributed as source code and can be recompiled. "QSim has a graphically user interface for design of pulse sequences, simulation and processing. QSim is easy to use but still flexible enough for more advanced users...QSim is typically used for pulse sequence design and testing. QSim is also an ideal tool when teaching NMR."
web site
abstract
1st poster
2nd poster

GAMMA (Smith & Levante)
This was the best package, but unfortunately it has been superseded by the new alternatives and has (almost) disappeared. My preference went to it because (1) is general in scope, with no particular stress on solids; (2) is accompanied by very easy tutorials. It's not a program, but a library of C++ objects to build your programs with. It has been criticized because requires programming skills. This is a silly observation. If you already know NMR and have no experience in programming you can learn GAMMA in one day. Can you read (let alone learn) the manual of a popular program (e.g.: PhotoShop; e.g.: OpenOffice) in the same amount of time? I doubt it!
mirror at ETH
abstract

WSOLIDS1 (Klaus Eichele)
Simulates a limited number of solid experiments. Requires Windows (that's what the initial W means). Provides graphical output and can save the results in Win-NMR format.
web site

NMR Spectrometer Simulator (Pascal Pirotte)
This one simulates the spectrometer, a specific model, not the spectra. Written in LabView and in French, it's the equivalent of a Flight Simulator.

[Didactical Software] (Harold Bell)
A collection of easy-to-use programs that simulate NMR of liquids. Each program is devoted to a single experiment (single pulse, APT, DEPT, J-spectroscopy, etc... Require Windows, but you can taste them with your web browser. Written in Visual Basic.
web site

Virtual NMR Spectrometer (David Fushman)
"A computer program for efficient simulation of modern NMR experiments", is devoted to NMR of solutions. Requires Matlab 5 or higher. It's only available for beta-testing. "The Virtual NMR Spectrometer is designed as a useful tool for developing new NMR experiments and for tuning and adjusting the experimental setup for existing ones prior to running costly NMR experiments, in order to reduce the setup time on a real spectrometer. It will also be a useful aid for learning the general principles of magnetic resonance and contemporary innovations in NMR pulse sequence design."
web site
abstract

ODIN (Jochimsen & von Mengershausen)
"The software focuses mainly on NMR imaging, but can also be used with limitations for spectroscopic experiments." Open-source, platform-independent. "All common steps, from compiling your sequence to plotting or simulating it, can be performed within a graphical user interface".
web site
article

At 2:02 PM,  DNRN said...

It's some really nice links you have collected. Myself, I use the SIMPSON packages to simulate solid state NMR, and to visualize tensor orientation. Even more, the SIMPSON package can be used to optimal control, to get even better NMR experiments.

But I'm also a student from the inSPIN group in Denmark, which have developed the SIMPSON packages.

At 7:46 AM,  Prateek Goel said...

I am an undergraduate chemistry student at IIT Kanpur, India. This is really a very nice article. But I was wondering that the link for "Qsim" does not seem to work. I tried to find a lot out Qsim but in vain. I would be more than happy if you can give me any working link or send me the files via e-mail. I am working on spin relaxation and chemical exchange and I believe that Qsim is something I should try out and read about. My e-mail id is prateil.goel@gmail.com

Thanks and Regards,
Prateek

At 8:24 AM,  old swan said...

I have never worked with Qsim.
I wrote this article on my blog more than 2 years ago, to fix into a single place the results of my searches on the internet.
Unfortunately this is the rule in solid state NMR: every group makes their own software and let it disappear after a few years.

At 12:27 PM,  SpinChoreographer said...

Cool... Comprehensive list of NMR Simulation programs... May I update the list by adding a recently developed one, "Spinach" a software library that efficiently circumvents the "exponential scaling wall" problem. Guys have demonstrated that it is possible to simulate a system of upto 32 spins in a desktop computer.

Out of curiosity, what is the first written NMR experiment simulation program? As far as I know, I could trace back to Widmer and Wuthrich JMR 1986 Vol:70, 270-279. Anything before that?