Installing and Configuring VNMR for MATLAB
The following instructions detail the recommended procedure to install the Virtual NMR Spectrometer (VNMR)
ver 2.0 on your computer. It is assumed that MATLAB (version 5 or higher) has been installed already.
Simply follow these steps:
- Decide upon a location for the VNMR files (for example 'c:\mymatlab' directory). Create this directory.
- Save the attached vnmr_alpha.zip (or vnmr_alpha.tar.gz -- for Unix) file in a temp
directory. Unzip it and copy the folder VS to the location you have chosen (you can save
space and effort by unzipping the zipped file directly into this directory). File vnmr_alpha.zip
was compressed using WinZip (Windows); file vnmr_alpha.tar.gz (Unix) should be first
unzipped using gunzip and then un-tarred. The properly unzipped
and copied VS folder must contain the following three (sub)folders and three files:
- vs_src -- a folder containing VNMR source code and the translator;
- vs_pp -- a folder containing several examples of pulse programs;
- vs_shapes -- a folder to store files containing user-defined shapes (for shaped
RF pulses and PFG);
- manuals -- user's manuals in html-format;
- files vs_path.m, vs_source.m, and README.txt.
- Now you must edit the following files to tell MATLAB and VNMR where to find files on your computer:
- pathfile, vs_path.m: this file sets Matlab path to your VS-directory. You
have to put it (e.g. use copy/paste or move) in the Matlab 'work' directory
(Windows users) or paste its content into the existing startup.m-file (both Windows
and Unix); in the latter case, when you start Matlab, it will envoke this file). This file
will help your computer find the VS-directory. Unix users: If you are going to start Matlab
from the VS-directory, you may skip the copying procedure.
- If multiple users will use the same machine, you may wish to rename the vs_path.m.
(For example John Doe might call his path file jdpath.m).
- In lines 1-4, replace '/vsdir/' with the location of the VS folder on your computer.
(For example, line 1 might read: addpath('c:/MyMatlab/VS/vs_shapes'); ).
- In line 7, you might want to replace 'VNMR-tester' with your name. The only purpose
of this line is to signal you that the path was set; you may drop this line if you want.
- sourcefile, vs_source.m: This file tells the computer the location of the
translator file, xlate.exe(Win32) or xlate (Unix). It is important
here to properly use the 'slash' and 'backslash' symbols for Unix and Dos, respectively.
Depending on the OS you are using, replace /vsdir/ or \vsdir\ with the locations
of the VS-folder on your computer.
NOTES on Translator:
- for Windows users: The translator executable for Windows is xlate.exe.
It has been tested under Win95/98/NT and 2000 and should work fine.
- for Unix/Linux users:
- the translator executable, xlate, was precompiled under Unix (Solaris OS).
The odds are high that you have a different OS. See Compile/Test
Xlate for the instructions how to test if this version will work for your OS
and how to compile the Translator for your own machine.
- please make sure that the translator executable, xlate,
has the necessary executable permissions. You might have to change its permissions
(e.g. chmod +x xlate);
That's it! Now you are ready to launch the simulator:
- Launch MATLAB.
- At the command line prompt ( >> ) type the name of your pathfile (e.g. vs_path).
You should see the 'Hello' message.
- To launch the Simulator, type: vsnmr. The VNMR Main Window will appear on the screen.
- Enjoy VNMR!
BACK TO VNMR MANUAL
Back to top