MEX/MEXICO

THE McMASTER PROGRAMS FOR EXCHANGE LINESHAPES

INTRODUCTION

MEXICO and MEX are programs to calculate the lineshapes of exchanging systems with and without scalar coupling. They are intended to provide a simple way of comparing calculated and experimental lineshapes, so that accurate rate measurements can be made. The programs are an implementation of the theory described in (1). MEX produces the same results as the classic Bloch equations (2,3), but uses the approach that the experimental lineshape is always the sum of individual transitions (4,5). In an NMR spectrum, the intensity of a transition in NMR is given by the product of how much coherence the transition receives from the total z magnetization, times how visible the transition is to the detector. Just as in a normal system, the spectrum of an exchanging system can be viewed as a sum of transitions, but the transition probabilities are complex numbers (1). This is the mathematical method that is also used in the powerful GAMMA program (6). For a coupled spin system, MEXICO uses the same new approach and produces similar results to the durable classic DNMR3 (7). MEX allows great freedom in specifying the exchange mechanism for a system of uncoupled spins, but MEXICO is restricted (at the moment) to two-site exchange with the possibility of unequal populations. Mutual exchange can also be handled. The programs are designed to be run in conjunction with Bruker's XWINNMR program on a Silicon Graphics workstation. This manual has a section on running the program, details of MEX and MEXICO, some examples and instructions for compiling the program.

DOWNLOADING THE PROGRAM

Click here to download

RUNNING THE PROGRAM

(back to introduction)

It is convenient to run MEX/MEXICO in a separate window, while XWINNMR is running. In this way, the results can be inspected and analyzed while dialogue with the program proceeds. The executable for MEX/MEXICO can either be in a particular user's directory, or in system directories such as /usr/local/bin. The output of the programs are put in an existing XWINNMR data file (usually another procno in the same file as the original experimental data) for easy manipulation and comparison with real data. MEX/MEXICO produce output by overwriting the real part of the data structure in the transformed data, so that the calculated and experimental spectra can be compared using the dual display features of XWINNMR . Before the program is run, it is necessary to create one or more dummy procno files, which MEX will use to hold the calculated lineshape. XWINNMR can then be persuaded to re-load the calculated spectrum by switching to the imaginary part, then back again in the main display. In dual display, changing the procno or expno of the second file also re- loads the calculated spectrum. The input file is a text file, which can be handled with the editor of your choice, and is written in a fairly user-friendly fashion, using the style of the matrix package called meschach (8). The input file is called the mechanism file, and contains values of the parameters, along with the definitions of the spin system and mechanism matrices. The program assumes that the mechanism file is in the directory from which the program is run. The input files are text files, created by any text editor, and the format is somewhat free. In technical terms, they are read in using the C function fscanf. This means that entries need to be separated by "whitespace" - spaces, tabs or carriage returns. In between lines of input, comments can be placed on lines starting with the character '#', and blocks of whitespace are ignored. Some error checking is done, but be sure that the number of entries for each site is correct. If there is a wrong number of entries, interesting things may result. The exception to the free format is that the title occupies the first line of both the mechanism and the data file. Here, the line is read in (up to 80 characters) until a carriage return, so the title must occupy a single line. Both MEX and MEXICO support a command-line argument for the filenames of these files. Typing

      mex test

will make the program look for a file named test.mch as the mechanism file. If no name follows mex on the command line, then the user will be prompted individually for the name of the file. The command-line usage assumes the extension .mch, but this are not required if the filename are entered explicitly. In this case, the program will look for the exact filename entered.

The program will ask which procno will be used, and warn that it will be overwritten. It is convenient to make this another procno of the experimental data, so that experiment and simulation can be compared easily using dual display. MEX/MEXICO will then do the calculations as specified in the mechanism file, and prompt for a command. The possible commands are as follows.

s:
change the vertical scale factor of the calculated spectrum. May be greater or less than 1.0
f:
change any of the frequencies of the sites, in the absence of exchange (only in MEX).
r:
change the rates of any of the processes.
c:
change the spin system (strong versus weak coupling, for the same number of spins) (only in MEXICO)
w:
write out the last set of parameters in a file called exchange.mch, and quit. The output is in the format of a MEX .mch file. The file will go into the directory brukerdatafile/pdata/procno
q:
quit without writing a set of parameters.

The program will first print out a condition number, indicative of the numerical stability of the solution. So far the numbers seem occasionally alarmingly high (10e6), but the resulting spectra are still accurate. Then the program prints the line numbers, their frequency, width and the real and imaginary parts of the intensity. The last two numbers define the intensity and the phase of the line. In the calculation of the lineshape itself, only those transitions above a certain threshold are included.

DETAILS OF MEX

(back to introduction)

Once the mechanism file has been opened and read, the program does a detailed balance calculation. This means that it calculates what the equilibrium values should be, based on the exchange mechanism entered. This is compared to the observed equilibrium values. This is merely for reference purposes, as a check on the mechanism, and the calculated values are not used in the rest of the program. The format of the mechanism file follows that from McClung's SIFIT program (9), and allows a complicated mechanism to be described by a single rate. For instance, a three-fold rotation has three processes (A->B, B->C, C->A), but is described by a single rate. The actual rate for a single step is the rate entered first times the element of the exchange matrix. For equally populated sites, the elements are usually all 1, so this does not matter. However, for unequal populations, say 10:1, this is an important factor. In this case, the rate from minor to major site is 10 times the rate from the major to the minor, so it is important to distinguish these two cases. The mechanism file has the following format. The # indicates places where comments (which will be ignored by the program) make be used.

#
1st line:          Title (<80 characters)
#
2nd line:          Full filename of the XWINNMR data file.  It should
                   go as far as the expno directory, and then the
                   program will overwrite one of the procno files.
#
3rd line:          Number of sites and number of rate processes (both
                   integers).  Because all the memory allocation is
                   dynamic, there is no restriction on the number of
                   sites.  The maximum number of rate processes is
                   defined by the constant MAXEX in the program.  At
                   the moment, this is set to 5, but this is
                   arbitrary and can be changed.
#
4th line:          Frequencies (in Hz) of each site in the spin
                   system.  Frequencies are referenced to the offset
                   of the experimental spectrum, so using the
                   frequencies as read off with the cursor should be
                   correct.  Remember there is no scalar coupling!
#
5th line:          1/T2 for each site, in s-1.
#
6th line:          M(infinity) for each site.  For equal populations cases
                   these are all 1, but for unequal populations,
                   these are determined by the equilibrium constants. 
                   The program actually works out M(infinity) from the
                   principle of detailed balance, as a check.  

for each mechanism:
#
7th line:          Initial guess at the rate for this process
#
8th line:          Number of non-zero, off-diagonal elements in the
                   exchange matrix for this process.
  for each non-zero element:
9th line:          The row and column address of the element
                   (integers) and its value (real).  Note that the
                   addresses start at 0, not 1.  For unequal
                   populations, be careful of which way around the
                   matrix is.

There are as many of these lines as needed for the system.

The following is a specific case of the mechanism file for MEX. The system is two unequally populated (10:1) sites.

uneq.mch:

#title of the data
two-site exchange on 10:1 unequal pops
#full bruker file name for experimental data
/u/data/bain/nmr/furf/1
#2 sites, 1 process
2 1
#frequencies of the two sites 
36 -23                                        
#1/T2 for each site
1 1
#M(infinity) for each site, for checking purposes
1 10

#Only one process, first we enter the initial guess at the rate
25.0
#Then there are two non-zero off-diagonal elements
#We give the number of such elements we expect, then the
#zero-based row and column addresses and the value for each one
 2
0  1    0.1
1  0    1.0

DETAILS OF MEXICO

(back to introduction)

The mechanism file in this case specifies the spin systems of the two exchanging sites. These two sites can be permutations of each other (mutual exchange) or may be quite different. Mutual exchange allows the matrices to be simplified and reduced in size by half. There is no fundamental limitation on the size of the spin systems, since all the memory allocation is dynamic. Two exchanging four-spin systems are easily handled (<30 seconds) and five strongly-coupled (or six weakly-coupled) spins can also be done on most systems(<10 minutes). Invoking weak coupling can speed the program up dramatically, especially for large spin systems, since all the combination lines are eliminated.

Spin relaxation also affects linshapes in coupled spin systems. Each spin has its own T2, but also gets additonal broadening from the T1's of the spins coupled to it. MEXICO calculates this correctly from the values of 1/T2 (which is assumed to equal 1/T1) in the mechanism file.

Running the program is very similar to MEX. Once the mechanism file is read, the program shows the parameters for the exchanging systems, and prompts for the file number. Then a dialogue starts to confirm that it is permissible to overwrite the output file. Once the first spectrum is calculated, then the program loops and permits changes to the rates and to the vertical scale until a satisfactory match is obtained. If frequencies or coupling constants are to be changed, then it is necessary to quit the program, change the mechanism file and start again.

The format of the mechanism file is similar to that for MEX. Lines in the file which begin with # are ignored, as is whitespace, so the user is encouraged to make the files well commented.

#
1st line:          Title (<80 characters)
#
2nd line:          Full filename of the XWINNMR data file.  It should
                   go as far as the expno directory, and then the
                   program will overwrite one of the procno files.
#
3rd line:          Number of sites and number of rate processes (both
                   integers) and the equilibrium constant K (double). 
                   The program allows only two sites and one process
                   at the moment.  The equilibrium constant is used
                   to define the reverse rate from the rate that is
                   entered.  

#Spin Definitions of the First Site
4th line:          Character definition of the spin system.  The
                   number of characters defines the number of spins,
                   and spaces between the characters implies weak
                   coupling.  Therefore, 'abc' defines three strongly
                   coupled spins, whereas 'ab c' defines an ABX spin
                   system.
#
5th line:          Permutation of the spin system.  These are
                   integers from zero to (nspins -1), and indicate
                   how the  spin parameters (shifts and couplings may
                   be permuted.  This is designed mainly for mutual
                   exchange, since there the spin parameters are
                   identical, and we define the exchange by the
                   permutation. 
#
6th line:          1/T2 for each spin, in s-1.
#
7th line:          Tableau of chemical shifts and couplings, in a
                   triangular form.  The elements along the diagonal
                   are the chemical shifts (in Hz, as read off the
                   experimental spectrum), and the off-diagonal
                   elements are the couplings.

There is another set of these parameters for the second site.

#
last line:                Rate of the exchange from site 1 to site 2. 
                          In mechanism files that the program creates,
                          the reverse rate will also appear here for
                          information, but the input ignores it.

The program is designed to recognize mutual exchange from the mechanism file. If the equilibrium constant equals 1, and the chemical shifts and couplings are equal (up to a permutation), then the program assumes mutual exchange. To set up mutual exchange, simply copy the shifts and couplings from the first site into the second site. The permutation of the second site relative to the first is used as the exchange mechanism. In this case a message is printed out and the appropriate exchange matrix is set up. The following file, nodma.mch, is the mechanism file for the mutual exchange of the four aromatic protons in paranitroso dimethylaniline.

#Mutual exchange on NODMA
N,N-dimethyl-4-nitrosoaniline 

#data file to overwrite
/u/data/bain/nmr/bainth/4

#sites, number of rates, equilibrium constant
#equilibrium constant is 1.0 since mutual 
#restricted to 2 sites, 1 process
2    1    1.0

#first system
abcd
#permtutation (identity for first site)
0  1  2  3

# values of 1/T1
1.0  1.0  1.0  1.0

# Chemical shifts and couplings
# site 0 is H3, site 1 H5, site 2, H2, site 3, H6
 2480.2
    2.3    3139.1
    9.0       0.0   3115.4
    0.0       9.45     2.7   3199.0
 
#second system
#permute site 0, 1 and site 2 3
abcd

#permutation
1  0  3  2

# values of 1/T1
1.0  1.0  1.0  1.0

# Chemical shifts and couplings, site 2
# For mutual exchange, these are the same
# as site.  The permutation defines the
# exchange
 2480.2
    2.3    3139.1
    9.0       0.0   3115.4
    0.0       9.45     2.7   3199.0

#rates
1.0

The following shows the mechanism file for the use of MEXICO on a general coupled spin system. The application is to an unequally populated two-site exchange involving 4 strongly coupled spins. The spin system is defined by the string "abcd". This means that there are four spins, strongly coupled. The letters used are not specific, but spaces are important. If spins are separated by a space in the system definition, they are treated as weakly coupled. For example, "abcd" is four strongly coupled spins; "ab c d" is two strongly coupled spins, a and b, weakly coupled to c and d. Note that this strong versus weak coupling can be changed (with the command 'c') while the program is running. Each spin system has a permutation associated with it. This means that we can swap nuclei around without having to change the chemical shifts and couplings.

#test data for meschach form of coupled exchange
OMe derivative of oxadiazoline compound
#data file to overwrite
/u/data/bain/nmr/bainpme/10

#number of sites, rates, equilibrium constant
2   1    0.36

#first system
abcd
#permutation
0  1  2  3
# values of 1/T1
0.5  0.5  0.5  0.5
#shifts and couplings
 487.7
  -8.2    516.6
   6.0      7.3    702.7
   7.1      6.0     -8.6    733.0
  
#second system
abcd
#permutation
3  2  0 1
# values of 1/T1
0.5  0.5  0.5  0.5
#shifts and couplings
 563.1
  -8.3    544.5
   3.9      8.4     549.9
   8.6      8.8      -8.8    564.5 

#rates
5.0

EXAMPLES

(back to introduction)

EXAMPLE 1

The first example for MEX is the exchange in furfural, a two-site, unequal-populations case. The mechanism file is the one listed above, called uneq.mch. There is only a single process in this case, so we only need specify the two off- diagonal elements for the mechanism, in the ratio of 1:0.27 (or 3.85:1), which is the ratio of the two equilibrium populations. Remember that the first site (the minor site) has address 0. The program checks that the M(inf) are consistent with the exchange matrix. The (m, n) element of the exchange matrix is the relative rate from site n to site m.

# unequal population, two site exchange
Furfural in Toleune at 215 K

#data file to overwrite
/u/data/bain/nmr/bainth/4

#two sites, one process
2 1

#frequencies of the two site
377.07 511.67

#1/T2 for each site
2 2 

#equilibrium z magnetizations
#these will be checked to see if
#they are consistent with the mechanism
#and detailed balance 
1 3.85

#Rate for the first process
200
#two non-zero off-diagonal elements
#essentially the forward and reverse rates
2
0 1 .27
1 0 1.0

The following is the console dialogue that went on using this mechanism file.

cosy 17% mex fur
MEX 1.0
Current values of rates are
Rate 0 =    200.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
Calculating line parameters
Condition =      2955.28
Line  Frequency      Width  Real Part  Imag Part Equilibrium
Equil (calc)
0        379.07      32.51   0.870972  -0.465659   0.259740  0.270000
1        509.67       8.56   3.979028   0.465659   1.000000  1.000000
Commands: (s)cale/ (w)rite out/ (q)uit/ (r)rate change/
(f)frequency change)
Enter a command :r
Rate 0:1
Current values of rates are
Rate 0 =      1.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
Calculating line parameters
Condition =      2372.01
Line  Frequency      Width  Real Part  Imag Part Equilibrium
Equil (calc)
0        377.07       0.48   0.999997  -0.002412   0.259740  0.270000
1        511.67       0.36   3.850003   0.002412   1.000000  1.000000
Commands: (s)cale/ (w)rite out/ (q)uit/ (r)rate change/
(f)frequency change)
Enter a command :r
Rate 0:1000
Current values of rates are
Rate 0 =   1000.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
Calculating line parameters
Condition =      5186.32
Line  Frequency      Width  Real Part  Imag Part Equilibrium
Equil (calc)
0        399.75     188.99  -0.238812  -0.262143   0.259740  0.270000
1        488.99      13.77   5.088812   0.262143   1.000000  1.000000
Commands: (s)cale/ (w)rite out/ (q)uit/ (r)rate change/
(f)frequency change)
Enter a command :w
cosy 18% 
EXAMPLE 2

Here is a classic two-site exchange case. Note that at slow rates, there are two broad, slightly-out-of-phase lines, but at fast rates, the two lines are at the same frequency. In the latter case, there is a broad negative line that vanishes in intensity in the limit of fast exchange, as shown by Reeves and Shaw (4).

#mex mechanism file, test 2 site equally populated exchange
Theresa's azapropazone derivative

#complete file name for the data
/u/data/bain/nmr/bainth/4

#2 sites, one process
2 1

#frequencies as in the spectrum
2826.0  2910.0

#1/T2 for each site 
1 1

#M(infinity for each site 
1 1

#rate for the exchange process
92.0

#2 non-zero off-diagonal elements
#addresses [0][1] and [1][0]
2
0 1 1.0
1 0 1.0

In this case, we calculate the lineshape for the two different rates, then use the 'w' command to write out the final parameters in a file called exchange.mch. This file has the format of a MEX mechanism file, with comments, and is placed in the same directory as the output lineshape. In this case, the file will be

/u/data/bain/nmr/bainth/4/pdata/2/exchange.mch

Here is the console output for this case.

cosy 2% mex ther
MEX 1.0
Current values of rates are
Rate 0 =     92.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
Calculating line parameters
Condition =     20971.92
Line  Frequency      Width  Real Part  Imag Part Equilibrium
Equil (calc)
0       2828.63      14.80   1.000000  -0.371961   1.000000  1.000000
1       2907.37      14.80   1.000000   0.371961   1.000000  1.000000
Commands: (s)cale/ (w)rite out/ (q)uit/ (r)rate change/
(f)frequency change)
Enter a command :r
Rate 0:280
Current values of rates are
Rate 0 =    280.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
Calculating line parameters
Condition =     36053.23
Line  Frequency      Width  Real Part  Imag Part Equilibrium
Equil (calc)
0       2868.00      59.62  -1.991605   0.000000   1.000000  1.000000
1       2868.00      29.83   3.991605   0.000000   1.000000  1.000000
Commands: (s)cale/ (w)rite out/ (q)uit/ (r)rate change/
(f)frequency change)
Enter a command :w
cosy 3% 
EXAMPLE 3

The following is an example of a calculation on a coupled spin system, using MEXICO. In this case, we calculate the spectrum and then write out the mechanism file. The two sites, 1 and 2, are in the ratio of 1:0.36. The forward rate, 1->2, is 5 s-1. The triangular arrays show the chemical shifts and couplings: the chemical shifts (in Hz) down the diagonal and the coupling constants in the lower triangle.

#test data for meschach form of coupled exchange
phil's OMe sample
#data file to overwrite
/u/data/bain/nmr/bainpme/10

#number of sites, rates, equilibrium constant
2   1    0.36

#first system
abcd
#permutation
0  1  2  3
# values of 1/T1
0.5  0.5  0.5  0.5
#shifts and couplings
 487.7
  -8.2    516.6
   6.0      7.3    702.7
   7.1      6.0     -8.6    733.0
  
#second system
abcd
#permutation
3  2  0 1
# values of 1/T1
0.5  0.5  0.5  0.5
#shifts and couplings
 563.1
  -8.3    544.5
   3.9      8.4     549.9
   8.6      8.8      -8.8    564.5 

#rates
5.0

This is the console output. Note that MEXICO lists all the transitions, but only uses those above threshold for the lineshape calculations.

cosy 15% mexico philme
MEX(I)CO 1.0
                            Spin system: abcd
Site 1 (1:)                            5.0000      Site 2 (:0.360   )
  487.70                              ------->       549.90
   -8.2000   516.60                   13.8889         -8.8000   564.50
    6.0000     7.3000   702.70       <-------          8.4000     8.8000   544.50
    7.1000     6.0000    -8.6000   733.00              3.9000     8.6000    -8.3000   563.10
Current values of rates are
Rate 0 =      5.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainpme/10/pdata/2/1r
Calculating line parameters
Condition =  31643443.85
Line  Frequency      Width  Real Part  Imag Part
0        959.58       1.07   0.000000   0.000000
1        938.15       1.07   0.000000   0.000000
2        929.52       1.07   0.000000   0.000000

  many more lines

109      550.32       2.45   0.088034   0.008612
110      551.23       2.45   0.063034   0.006386
111      552.03       2.41   0.002392   0.000136
56 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :w
cosy 16% 
EXAMPLE 4

This is the mechanism file for a 4-spin mutual exchange problem. Note that the shifts and couplings are the same, but the exchange of sites 0 <->1 and 2<->3 is handled by the permutation

#Mutual exchange on NODMA
N,N-dimethyl-4-nitrosoaniline 

#data file to overwrite
/u/data/bain/nmr/bainth/4

#sites, number of rates, equilibrium constant
#equilibrium constant is 1.0 since mutual 
#restricted to 2 sites, 1 process
2    1    1.0

#first system
abcd
#permtutation (identity for first site)
0  1  2  3

# values of 1/T1
1.0  1.0  1.0  1.0

# Chemical shifts and couplings
# site 0 is H3, site 1 H5, site 2, H2, site 3, H6
 2480.2
    2.3    3139.1
    9.0       0.0   3115.4
    0.0       9.45     2.7   3199.0
 
#second system
#permute site 0, 1 and site 2 3
abcd

#permutation
1  0  3  2

# values of 1/T1
1.0  1.0  1.0  1.0

# Chemical shifts and couplings, site 2
# For mutual exchange, these are the same
# as site.  The permutation defines the
# exchange
 2480.2
    2.3    3139.1
    9.0       0.0   3115.4
    0.0       9.45     2.7   3199.0

#rates
1.0

In running this system, note that there are 56 possible transitions for 4 strongly-coupled spins. However, one of the couplings is zero, so the spectrum is 4 doublets of doublets, giving 16 lines detected above threshold. However, a faster rate creates more lines that contribute.

cosy 13% mexico nodmap
MEX(I)CO 1.0
                            Spin system: abcd
Site 1 (1:)                            1.0000      Site 2 (:1.000   )
 2480.20                              ------->      3139.10
    2.3000  3139.10                    1.0000          2.3000  2480.20
    9.0000     0.0000  3115.40       <-------          9.4500     0.0000  3199.00
    0.0000     9.4500     2.7000  3199.00              0.0000     9.0000     2.7000  3115.40
Current values of rates are
Rate 0 =      1.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
   Mutual Exchange
Calculating line parameters
Condition =  14603837.99
Line  Frequency      Width  Real Part  Imag Part
0       3831.05       0.72   0.000000   0.000000
1       3838.23       0.72   0.000000   0.000000

   more lines

54      3135.15       0.64  -0.000834   0.000175
55      3135.15       0.48   0.210612   0.010436
16 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :r
Rate 0:30
Current values of rates are
Rate 0 =     30.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
   Mutual Exchange
Calculating line parameters
Condition =  22647149.76
Line  Frequency      Width  Real Part  Imag Part
0       3831.01       5.35   0.000000   0.000000
1       3838.19       5.32   0.000000   0.000000
2       3861.09       5.33   0.000000   0.000000

54      3135.11       5.26  -0.000381  -0.001098
55      3135.11       5.10   0.209882   0.008673
24 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :w
cosy 14% 
EXAMPLE 5

The next dialogue shows the use of first, changing the rate, and second, changing the spin system. In the first two simulations, the four spins are strongly coupled, and described as "abcd". The last simulation defines the spin system as "a b c d", with the spaces indicating weak coupling. Invoking weak coupling makes the simulation faster (32 transitions for 4 spins, rather than 56), but may distort the intensities somewhat.

cosy 14% mexico nodmap
MEX(I)CO 1.0
                            Spin system: abcd
Site 1 (1:)                            1.0000      Site 2 (:1.000   )
 2480.20                              ------->      3139.10
    2.3000  3139.10                    1.0000          2.3000  2480.20
    9.0000     0.0000  3115.40       <-------          9.4500     0.0000  3199.00
    0.0000     9.4500     2.7000  3199.00              0.0000     9.0000     2.7000  3115.40
Current values of rates are
Rate 0 =      1.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
   Mutual Exchange
Calculating line parameters
Condition =  14603837.99
Line  Frequency      Width  Real Part  Imag Part
0       3831.05       0.72   0.000000   0.000000
1       3838.23       0.72   0.000000   0.000000

53      3132.87       0.48   0.212945  -0.019199
54      3135.15       0.64  -0.000834   0.000175
55      3135.15       0.48   0.210612   0.010436
16 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :r
Rate 0:20
Current values of rates are
Rate 0 =     20.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
   Mutual Exchange
Calculating line parameters
Condition =  22955763.66
Line  Frequency      Width  Real Part  Imag Part
0       3831.03       3.75   0.000000   0.000000
1       3838.21       3.73   0.000000   0.000000

53      3132.85       3.50   0.212049  -0.022707
54      3135.13       3.67  -0.000657  -0.000679
55      3135.13       3.51   0.210360   0.009350
24 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :c
Enter new spin system:a b c d
Current values of rates are
Rate 0 =     20.0000000
Output procno: 2
Procno 2 will have its real part overwritten! OK(y/n)?:y
Output to /u/data/bain/nmr/bainth/4/pdata/2/1r
   Mutual Exchange
Calculating line parameters
Condition =    554882.18
Line  Frequency      Width  Real Part  Imag Part
0       3204.95       3.66   0.000000   0.000000
1       3202.26       3.66   0.000000   0.000000

29      2476.86       3.50   0.250432   0.010500
30      2485.86       3.50   0.249904   0.019351
31      2483.57       3.50   0.250182  -0.015337
16 lines above threshold
Commands:(s)cale/(w)rite out/(q)uit/(r)ate change/(c)oupling weak/strong
Enter a command :q
cosy 15% 

COMPILING THE PROGRAM

(back to introduction)

The program is written in fairly standard ANSI-style C, and it should compile under most C compilers. It uses a style and many functions from a package of matrix routines called meschach (8), available through netlib (www.netlib.org). The tar file for meschach is included with the distribution file. Alternatively, meschach can be obtained through the web at ftp://ftpmaths.anu.edu.au/pub/meschach/meschach.html or via anonymous ftp to ftpmaths.anu.edu.au in the pub/meschach directory.

Before mexico is compiled, a meschach archive must be created. Uncompress and un-tar the meschach file as follows.

      uncompress mesch12b.tar.Z
      tar xvf mesch12b.tar

Before the package is compiled on an SGI machine, we have found it necessary to delete or comment out line 43 in matrix.h, which defines u_int.

typedef unsigned int u_int /* line 43, delete or comment out */
Now construct the meschach archive, meschach.a, with the following UNIX commands.
      configure --with-all
      make all
      make clean
On a SGI Indigo running IRIX 5.3, the following command for compiling the program is used. This sets optimization level 2, and links in the meschach archive.
      cc mex.c -O2 -o mex meschach.a -lm
      cc mexico.c -O2 -o mexico meschach.a -lm

REFERENCES

1. A.D. Bain and G.J. Duns, Can. J. Chem. 74, 819 (1996).
2. H.S. Gutowsky and C.H. Holm, J. Chem. Phys. 25, 1228 (1956).
3. H.M. McConnell, J. Chem. Phys. 28, 430 (1958).
4. L.W. Reeves and K.N. Shaw, Can. J. Chem. 48, 3641 (1970).
5. A.D. Bain and G.J. Duns, J. Magn. Reson. 112 A, 258 (1995).
6. S.A. Smith, T.O. Levante, B.H. Meier and R.R. Ernst. J. Magn. Reson. 106 A, 75 (1994).
7. D.A. Kleier and G. Binsch, J. Magn. Reson. 3, 146 (1970).
8. D.E. Stewart and Z. Leyk, Meschach: Matrix Computations in C, Australian National University, Canberra, 1994.
9. D.R. Muhandiram and R.E.D. McClung, J. Magn. Reson. 71, 187 (1987).

IF THERE ARE PROBLEMS

(back to introduction)

This is a relatively new program, so there will be bugs and problems that arise. If this happens, or you have some useful suggestions, please contact

Alex D. Bain
Dept. of Chemistry
McMaster University
1280 Main St. W.
Hamilton, Ontario, Canada
L8S 4M1
fax: (905) 522 2509
email: bain@mcmaster.ca

22 April, 1997. adb