Spectrum Simulation (NS) (requires 1D version)

This subroutine calculates and displays a spectrum based on user-input values for chemical shifts and coupling constants. The subroutine uses the values of Spectrometer Frequency, Sweep Width, Spectrum Offset and Number of Points from the current spectrum for its calculation, so an actual data file must be loaded before starting the NS subroutine.  

Subcommands are single-letter commands and are listed below, and are also available from the menus.

When the subroutine is started, if the spin system has not yet been entered, the dialog box shown below is displayed.  This dialog box can be displayed at any time while in the simulation subroutine with the command E or be selecting Edit parameters from the Edit menu.  Note that the spectrum is not calculated until a Recalculate command is executed, using either the R command or by selecting Recalculate spectrum from the Edit menu.

The first thing to set is the number of spins.  Failure to set this will result in no calculation of the spectrum.  For all other fields, the default values can be used.

The Spin ID fields allow the user to assign a text label to each spin, if desired.  This can make it easier to relate the spin simulation parameters to a structure.  The Nucleus labels are used by the calculation only to determine whether or not second order spin interactions need to be included.  It does not matter what the actual labels are, just whether or not different spins have the same nucleus label, or different nucleus labels.

The Display Parameters buttons determine whether or not the shifts and coupling constants should be displayed on the screen.  The Calculation Type refers to 2 choices for the matrix diagonalization process.  QL is faster, but doesn't always converge, so Jacobi is usually the better choice.  The other fields should be self-explanatory.

After closing the dialog box shown above, chemical shifts and coupling constants must be entered.  Typing C or selecting Chemical shifts from the Edit menu displays the dialog box below:

It is important to notice that, in this case, only 4 of the chemical shift fields contain values, and the other fields are empty.  This is because the number of spins was set to 4 before opening this dialog box.  Four, and only 4, shift values can be entered in this case.  To enter more shift values, first change the number of spins!

If spin labels had been defined in the Edit Parameters dialog box, they would be displayed instead of numbers in the Spin ID fields.

Similarly, coupling constants are entered using the dialog box shown below, which is displayed with the J command or by selecting Coupling constants from the Edit menu.

For example, the value for J1-2 is entered into the highlighted field, which is column labeled 1 and the row labeled 2.  As with chemical shifts, it is only possible to enter coupling constants for the previously defined number of spins.   If spin labels had been defined in the Edit Parameters dialog box, they would be displayed instead of numbers in the Spin ID fields.

From the View menu, the user can choose whether or not to display the experimental spectrum and the spin simulation parameters.  The spin simulation parameters can be saved to a text file for later retrieval.  These commands are available from the File menu.

Subcommands: (also available from the menus)

R - Recalculate the spectrum from the parameters
E - Edit the spin system parameters
C - Enter chemical shifts
J - Enter coupling constants
D - Display spin simulation parameters on the screen
H - Hide display of spin simulation parameters
F - Set the font for the spin simulation parameters
S - Save the spin simulation parameters to a text file (see example below)
G - Read spin simulation parameters from a previously saved file

Example of a spin simulation file:

Spin Simulation File
Number of spins=3
V1=1.000000
V2=2.000000
V3=100.000000
J12=5.000000
J13=120.000000
J23=0.000000
label1=a
label2=b
label3=c
Nucleus1=H
Nucleus2=H
Nucleus3=C
Min Ht=0.000100
Linewidth=0.250000
Amplitude=200000.000000

The chemical shifts are listed as "V1", etc.  Coupling constants are listed as "J24", for J2-4.  

Allowed command line arguments are as follows.  Note that all of these commands are executed outside the NS subroutine.  These can be included in a macro to set default starting parameters.

ns spins n - set the number of spins for the calculation, where n is an integer

ns ppm n x - set the ppm value for spin n to x

ns J n m J - set the coupling constant between spins n and m to the value J

ns save [filename]- Save the spin simulation parameters to a text file.  If no filename is supplied, a dialog box will be displayed to enter a file name.

ns open [filename] - Open a previously saved file and load spin simulation parameters.  If no filename is supplied, a dialog box will be displayed to enter a file name.

ns showdata - enable display of the experimental spectrum along with the calculated spectrum while in the NS routine (helpful for comparing experimental and calculated spectra)

ns nowshowdata - disable display of the experimental spectrum along with the calculated spectrum while in the NS routine

ns width x - set the linewidth for the calculated spectrum to x

ns amp x - set the amplitude for the calculated spectrum to x

ns offset x - set the vertical offset for the calculated spectrum, where x is a percentage of the screen.  Allowed values for x are -10 to 95.

ns jacobi - uses a jacobi method for matrix diagonalization (default)

ns ql - uses an alternate method for matrix diagonalization; usually faster, but does not always converge

 

Last updated: 7/31/06