|
I don't like following long trails of product operators, with all their sine and cosine terms. A computer can do it and with fewer mistakes, provided the program is bug-free.
So ... here's a program to do all your product operator calculations for you. As the TV commercial says 'it slices .. it dices'. There are lots of capabilities built in to the program. You can select your spin system, one, two, three or even four spins. You can turn on and off a decoupler. You can ignore chemical shift evolution and more.
Here are some screen shots:
The default starting point is two spins, equilibrium magnetisation, Iz
Next is a sequence of pulses and delays on the two-spin system:
Note how each operation is printed in the middle of the arrow so that you can tell exactly what operations have been performed. This particular pulse sequence is a heteronuclear spin echo. The final state expression is quite complex and illustrates the reason for my writing this program. See the next screen shot.
The application of some trigonometric identities and evaluation of trigonometric terms simplifies the final result considerably!
The raison d'etre for wxProdOp is simplification! Long trails of product operator analyses of pulse sequences can produce spin states with many, many terms in them. It is frequently the case that the application of simple trigonometry identities or evaluation of trigonometric terms in the state expression can lead to major simplifications. Other techniques, as well, can greatly simplify the state expression.
wxProdOp is a major change from its predecesor, ProdOp. wxProdOp is a multiplatform program that currently runs under either Linux or Windows. There are plans afoot to port to Mac as well in the future.
|
|
Note: wxProdop 0.94 is now out of date. Version 0.95 is now available. Changes from v0.94 to 0.95:
- bug fixes (of course!)
- program now automatically determines screen height it finds itself on
- added 3/4 size pulse and evolution buttons for use on smaller screens
The Perl source for wxProdOp version 0.94 is here in gzipped form.
The documentation is available separately here as well as being bundled with the program
wxProdOp includes the SPIONIC font by very kind permission of the author, Jimmy Adair. Anyone who wants to use the SP fonts in a commercial electronic product (online, CD-ROM, etc.) must get permission from Jimmy Adair, the copyright holder, prior to use. Mr. Adair can be contacted via his web page here.
What's next?
- addition of the option to display a graphical tree diagram of operators without all of the trig functions
Linux installation:
You will need:
- wxWidgets which can be had here
- Alien-wxWidgets which can be had here.
- wxPerl which can be had here.
- A copy of the SPIONIC.TTF font (included in all downloads). The author, Jimmy Adair, has very kindly given permission for distribution of this font from this website.
- First, build and install wxWidgets following the instructions in the download. Don't forget to compile and install 'gizmos' and 'stc' which are in the contrib/src folder.
- Next install Alien-wxWidgets following the included instructions.
- Next install wxPerl, again following the installation instructions. Depending on your installation there may be some dependent modules missing. If so, go to CPAN and download them. This will very likely happen but you're a Linux user right? You know what to do!
- You will have to edit the wxProdOp.pl source code a bit. At top of the file there is a line with ProgramPath in it. The default is "/" which is probably not where you installed wxProdOp. Edit this to point to wherever wxProdOp lives (ie. $ProgramPath = /home/myname/wxProdOp/").
- Finally, you will have to install the SPIONIC font. It's a TTF font and under my version of Linux, it is in /usr/share/fonts/TTF. Find where your system likes to have its TTF fonts and put it there.
- Now you should be able to run the program from a shell or make a desktop icon to click on to run it. Again, you're a Linux user and should probably know how to do this.
- Please let me know about any problems that you have. I'll be very glad to help.
Windows installation:
Two ways:
First way (for the programmers among you):
You will need:
- Activestate perl which is freely downloadable here. Get the MSI installation, version 5.10. Alternatively, you could try downloading the source for Perl and the minGW or Gygwin gcc compiler and building it yourself. I didn't try this but others have apparently done so successfully.
- Wx perl module, available from the perl repository at http://www.wxperl.co.uk/wxppm/. The ppm program that comes with ActiveState Perl is capable of downloading and installing everything needed (see below).
- A copy of the SPIONIC.TTF font. The author, Jimmy Adair, has very kindly given permission for distribution of this font from this website.
- I guess you'll need a copy of the perl stuff too! For Windows, get it here
- First, install ActivePerl. It's pretty straightforward. Just click on the install icon and follow the prompts.
- Next, you need to install wxPerl and Alien-wxWidgets. Open a command window. If you don't know how to do this, just click 'start', 'run' and in the little window that pops up type 'run' followed by enter. This brings up a small command line interface window. Type 'ppm'. This will bring up ActivePerl's package manager. In the edit pulldown menu click on preferences and then the repositories tab in the dialog. This will show a window with the current perl module repositories (probably only ActiveState's if you just installed it) and an area where you can specify perl repositories other than ActivePerl's. Click on the pulldown tab in the 'Suggested' line and you will be presented with a selection of other repositories. Choose wxperl and click on 'add'. This will cause ppm to look for wxperl at www.wxperl.uk.co. Click 'ok' to close the dialog. Type "wx" in the line at the top of the main ppm window. This will show only wx modules. Highlight "Alien-wxWidgets" (at the time of this writing module version 0.39 works but 0.44 does not!!) and then click "Action/Install Alien-wxWidgets". Do the same for wx (version 0.89 at the time of this writing). Now click "File/Run Marked Actions" and these two modules will be downloaded and installed.
- If you want you can edit the wxProdOp.pl source code a bit. At top of the file there is a line with ProgramPath in it. The default is "c:/wxProdOp/". Edit this so that it points to wherever wxProdOp is installed on your computer, including the drive name (ie. $ProgramPath = "c:/wxprodop/") . Be sure to use the forward slashes and not reverse slashes. It is probably best to leave it at the default unless you know your way around the Windows OS.
- Finally, you will have to install the SPIONIC font. Installation is simply a matter of opening the control panel and then the fonts window and dragging and dropping SPIONIC.TTF from "c:/wxProdOp" (or where ever you installed it) into the fonts window.
- Now you should be able to run wxProdop by clicking on "wxProdOp.pl" in the installation folder (see below).
- Please let me know about any problems that you have. I'll be very glad to help.
The second way (for the impatient):
Download the setup executable here
To run wx:
I like to run wxProdOp from an icon on the desktop. For Linux, I'm assuming most users are savvy enough to create their own desktop link to the program and use the icon(s) available in the source tar file. Alternatively, you could open a shell and navigate to wherever you installed wxProdOp and simply type './wxProdOp.pl'. Make sure that wxProdOp.pl is executable (chmod 755 wxProdOp).
For Windows users make a shortcut to the "wxProdOp.pl" file in "c:\wxProdOp" on your desktop. If you have installed ActiveState perl you should now be able to click on it and run the program.
For those of you who might be interested in playing with the code there's a nifty visual debugger for Perl called ptkdb. You can download it here. I'll assume that since you're interested in debugging that you're advanced enough to know how to install the program.
Why Perl? Well, primarily because I've been using it for many years for all sorts of scripting things including cgi stuff for various web pages. I'm used to it. It may not be the ideal language for this sort of thing but then again there's lots and lots of text manipulation in wx ProdOp which is what Perl is good at so maybe Perl was the right choice. I did find the wxPerl documentation a bit obtuse but after whacking away at it for a while it started making a bit of sense.
I'm open to any comments/suggestions/criticisms that you might feel like sending along to me. Please note that the documentation is currently in the help files. There is a short tutorial iin there that should help you get going.
Let me know what you think:brownk@chem4823.usask.ca
Back to Practical NMR
|