Chemical exchange simulation - getting started.
Installation.
Download the archives from the upper posts. Extract the 'chemical exchange' folder into your easyspin working directory. Replace the 'exchange.m'
file by one from second 'exchange.zip' archive. Compile files for your platform. Just type 'mex(exlinesum.c)' and 'mex(exlinesum2.c)' into matlab command window. Now you can write your own scripts in the 'chemical exchange' folder.
Usage of exchange function.
First let's define the exchanging sites.
The spin system for each site can be defined either by permutation of the nuclei of by manual definition of each site.
Definition of nuclei permutation is follow:
Code: Select all
Sys.g = 2.0023;
Sys.Nucs = '14N,14N,1H,1H,1H';
Sys.n = [1 1 3 1 1];
Sys.A = [15 5 1 2 5]; %in MHz
Sys.xc = [2 1 3 5 4];
This code defines two-site exchange, the nuclei 1 and 2 are swaped as well as 4 and 5 ones whereas nucleus 3 is the same for both sites.
Code: Select all
Sys.Nucs = '1H,1H,1H';
Sys.n = [1 1 1];
Sys.A = [15 5 1]; %in MHz
Sys.xc = [2 3 1; 3 1 2];
This code defines three-site exchange, second site is a result of swapind of the nuclei 1-2 and 2-3, third one is a result of swapind of the nuclei 1-3 and 2-1.
The other way is defining the exchange sites manually.
Code: Select all
Sys.Nucs = '1H,1H,1H';
Sys.n = [1 1 1];
Sys.g(1,:) = 2.0013;
Sys.g(2,:) = 2.0023;
Sys.g(3,:) = 2.0033;
Sys.A(1,:) = [1 2 3]; %in MHz
Sys.A(2,:) = [2 3 1]; %in MHz
Sys.A(3,:) = [3 2 1]; %in MHz
Next step is defining the line width (in mT):
or
If separate line width is necessary for every site, use the follow sintax
Code: Select all
Sys.lwpp(1,:) = 0.015;
Sys.lwpp(2,:) = 0.025;
Sys.lwpp(3,:) = 0.005;
At last, the exchange rates must be defined. It can be defined as 2D (N x N) matrix in which non-diagonal elements are rate constants for each site-to-site exchange reaction. The direct constants (Site 1 -> Site 2) constants are placed in the columns whereas reverse ones (Site2 -> Site 1) in the rows. Diagonal elements may have any values (i.e. zeroes):
This code defines k<12>=2MHz, k<13>=1MHz, k<21>=1MHz, k<23>=1MHz, k<31>=1MHz, k<32>=2MHz where k<ij> means the rate constant for Site i -> Site j reaction.
Another way assumes that k<ij>=k<ji> for mutual exchange. The sintax is quite simple:
Code: Select all
Sys.k = [k<12> k<13> ... k<1n> k<23> k<24> ... k<34> ...];
The populations of each site is calculated by default if rate constants are defined by 2D matrix. Also they may be defined manually by defining the weight coefficient for each site:
At last, experimental parameters should be given:
Code: Select all
Exp.nPoints = 4096; %number of points
Exp.mwFreq = 9.5; %microwave frequency in GHh
Exp.Range = [337.5 340.5]; % the range in mT, calculates automatically if not given
And some options as well:
Code: Select all
Opt.Method = 2;
Opt.reduce = 0;
Opt.Output = 'separate';
Opt.Method can be a number from -3 to 3 and means follow:
-3 Explicit method, two-site mutual exchange, Matlab accumulation
-2 Explicit method, two-site mutual exchange, mex accumulation
-1 Liouville method, two-site mutual exchange, Matlab accumulation
0 Liouville method, two-site mutual exchange, mex accumulation
1 Liouville method, general n-site exchange, mex accumulation
2 Liouville method, general n-site exchange, Matlab accumulation
3 Bloch/McConnell, two-site mutual exchange
Opt.reduce (1 by default) - reduction of dublicates of lines. If set to zero, the reduction is neglected.
Opt.Output ('summed' by default). If set to 'separate', the each line draws as separate spectrum, else all lines are summed in single spectrum.
Mex acumulation works faster but incompatible wits separate output. Only general exchange methods (1 and 2) are compatible with separate linewidths for each site.
And finally, the function exchange can be called.
Just draw the simulated spectrum.
Returns spectrum as a pair of x,y values for thuther processing.