Installing and Configuring VNMR for MATLAB
The following instructions detail the recommended procedure to install the Virtual NMR Spectrometer (VNMR)
ver 3.5 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). If this directory
does not exist, create it.
- Save the attached vnmr_35.zip (or vnmr_35.tar.gz -- for Unix/Linux) file in a temp
directory. Unzip/untar 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). Please keep
in mind that file vnmr_35.zip was compressed using WinZip (Windows); file vnmr_35.tar.gz
(Unix) should be first unzipped using gunzip and then un-tarred. A properly unzipped
and copied VS folder must contain the following (sub)folders and files:
- vs_src -- a folder containing VNMR source code and the translator;
- vs_pp -- a folder containing several examples of pulse programs;
- components -- a folder containing GUI components;
- config -- a folder containing configuration files;
- helper -- a folder containing several common scripts;
- readme -- a folder containing vs_help file and other user-oriented info;
- save -- a folder used by VNMR to save/load data, including user-generated shapes
(for shaped RF pulses and PFG);
- xlatedir -- a folder used by Xlator to write the output files from reading/translating a pulse sequence;
(IMPORTANT: Make sure you have the write permission for this folder!)
- components -- a folder containing GUI components;
- manuals -- user's manuals in html-format;
- temp -- a temporary folded where the program stores a temporary version of the current pulse program;
(IMPORTANT: Make sure you have the write permission for this folder!)
- files vsnmr.m, vs_start.m, vs_exit.m, make_xlate.m,
vs_findWorkDirectory.m, vs_defineGlobals.m, addUser.m, and readme.txt.
- Now you have to make an executable for the VNMR TRANSLATOR. You will have to make it only once,
when you install the VNMR package. Follow these steps:
- Start Matlab
- In the Matlab window, go to your VS directory. If you are using Matlab 6 and up, you can
use the
"Current Directory" pull-down menu in the top part of the Matlab window to navigate
and select the desired VS directory. For earlier versions
of Matlab or if the Matlab (Java-based) graphical user interface is not available,
you will have to
type the corresponding "change directory" commands directly from your Matlab shell. An
alternative way, which will work for all matlab versions, is to create a
start file
that will automatically place your matlab session into the VNMR directory.
- Type the following command (from the Matlab prompt):
make_xlate
This will start the C-compiler and create an executable file for the xlator. The program
may ask you to select a version of the C-compiler you would like to use. I usually select
the compiler that comes as an integral part of the Matlab package.
Note #1: Norton Antivirus conflicts with the commands involved in making the executavle (ask folks at Matlab and/or Symantec why). If you have Norton Antivirus
running on your computer, you will have to disable it for the make_xlate step. You can enable your antivirus software after this step is done.
Note #2: Matlab will create a Matlab-executable file (e.g. vs_lex_bruker.dll in
Windows) and write it in the vs_src directory. Make sure you have the write permission for
this directory.
Note #3: This distribution of the Virtual Spectrometer includes an excecutable for Windows that should work under Windows 98, 2000, and XP, so you might be able to skip
this step.
That's it! Now you are ready to launch the simulator:
- Launch MATLAB.
- In the Matlab window navigate to your VS directory.
- Launch the Virtual Spectrometer by typing: vsnmr at the Matlab prompt (>>).
The VNMR Main Window will appear on the screen.
- Enjoy VNMR!
A note to users working on multiple-user computers (e.g. workstations, classrooms, etc.):
It is highly recommended that each individual user copies VNMR into his/her own directory and
works in this directory. If this is not possible, you will need to create your own working sub-directories,
to avoid confusion resulting from some critical files being overwritten by other users. For this purpose we
have also provided a Matlab function addUser.m. Here is what you will have to do:
After you launched VSNMR, go to the Matlab window and at the Matlab
prompt type:
addUser('username')
where you have to substitute username with your name or any combination of letters
and/or numbers that could uniquely identify you from other users. This command automatically
creates several subdirectories with this name (if these don't exist) in the xlatedir and vs_pp folders and creates a path to them in the Matlab memory. Make sure you have the write permission for the directories xlatedir and vs_pp. These user-specified subdiractories will not be deleted
when your VSNMR session is over and could be used next time you start VSNMR. Repeat this command
every time you launch a new VNMR session, to tell Matlab what personal directories to use.
BACK TO VNMR MANUAL
Back to top
Last modified by David Fushman 12/28/2003.
(c) Copyright 2003 by David Fushman, University of Maryland.