Simulating isotropic and fast-motion cw EPR spectra

This user guide explains how to simulate isotropic and fast-motion cw EPR spectra using EasySpin's function garlic. It is assumed that you are familiar with the basics of MATLAB, esp. with structures.

It contains the following topics: There are the following advanced topics:
Running the simulation

Solution cw EPR spectra of radicals are computed by the EasySpin function garlic.


It is called with two arguments. The first argument Sys tells garlic all about the spin system, and the second argument Exp gives the experimental parameters.

If no output argument is given, garlic plots the computed spectrum. But it can also return one or two outputs. (Don't forget the semicolon at the end of the line to suppress output to the command window.)

Spec = garlic(Sys,Exp);
[Field,Spec] = garlic(Sys,Exp);

The outputs Field and Spec are arrays that contain the values of th magnetic field axis and the spectrum, respectively. If these are requested, garlic does not plot the spectrum.

Doing a simulation only requires a few lines of code. A simple example is

Sys = struct('g',2,'Nucs','1H','n',2,'A',15,'lwpp',[0 0.05]);
Exp = struct('mwFreq',9.5);

The first two lines define the spin system (a radical with an unpaired electron spin and two equivalent 1H) and the experimental parameters (X band spectrometer frequency). The details will be explained below. The third line calls the simulation function, which plots the result. Copy and paste the code above to your MATLAB command window to see the graph.

Of course, the names of the input and output variables don't have to be Sys, Exp, Field and Spec. You can give them any name you like, as long as it is a valid MATLAB variable name, e.g., FremySaltSolution or QbandExperiment. For convenience, thoughout this tutorial, we will use the short names Sys and Exp.

The spin system

The first input argument specifies the spin system. It is a MATLAB structure with various fields giving values for the spin system parameters.

Sys.g = 2.006;
Sys.Nucs = '1H';
Sys.A = 15;  % MHz
Sys.n = 2;
Sys.lwpp = 0.05;  % mT

The first line defines the isotropic g value of the spin system, in this case 2.006. garlic always assumes a single unpaired electron spin S=1/2.

The field Sys.Nucs contains a string giving all the magnetic nuclei in the spin system, a proton in the above example. Use a comma-separated list of isotope labels to give more than one nucleus. E.g., Sys.Nucs = '1H,1H,14N' specifies two different protons and one nitrogen.

Sys.A gives the hyperfine coupling in MHz (Megahertz), for each of the nuclei listed in Sys.Nucs. The following defines a hydrogen atom with a 10 MHz coupling to the unpaired electron and a 13C atom with a 12 MHz coupling.

Sys.Nucs = '1H,13C';
Sys.A = [10 12]; % MHz

Remember that garlic (and other EasySpin functions, too), take the hyperfine coupling values to be in MHz. Often, values for hyperfine couplings are given in G (Gauss) or mT (Milltesla), so you have to convert these values. For g = 2.00232, 1 G corresponds to 2.8025 MHz, and 1 mT corresponds to 28.025 MHz. The simplest way to convert coupling constants from magnetic field units to MHz is to use the EasySpin function mt2mhz:

A_MHz = mt2mhz(A_mT);    % mT -> MHz conversion
A_MHz = mt2mhz(A_G/10);  %  G -> MHz conversion (1 G = 0.1 mT)

Sys.n gives the number of equivalent nuclei. So

Sys.Nucs = '1H';
Sys.n = 1;
Sys.A = 5.3;

indicates a single proton, whereas

Sys.Nucs = '1H';
Sys.n = 2;
Sys.A = 5.3;

specifies two equivalent protons, i.e. protons with identical hyperfine coupling constants. The statements

Sys.Nucs = '1H,1H';
Sys.n = [4 4];
Sys.A = [-14 -5];

specify two groups of protons with 4 equivalent nuclei in each (as in a naphthalene radical anion or cation).

Sys.lwpp gives the peak-to-peak line widths. It is described in detail below in the section about line broadenings.

Basic experimental settings

The second input argument, Exp, collects all experimental settings. Just as the spin system, Exp is a structure containing several fields.

Microwave frequency. To simulate an EPR spectrum, Easyspin needs at a minimum the spectrometer frequency. Put it into Exp.mwFreq, in units of GHz.

Exp.mwFreq = 9.385;  % X-band
Exp.mwFreq = 34.9;   % Q-band

Field range. There are two ways to enter the magnetic field sweep range. Either give the center field and the sweep width (in mT) in Exp.CenterSweep, or specify the lower and upper limit of the sweep range (again in mT) in Exp.Range.

Exp.CenterSweep = [340 80]; % in mT
Exp.Range = [300 380];      % in mT

On many cw EPR spectrometers, the field range is specified using center field and sweep width, so Exp.CenterSweep is often the more natural choice.

Exp.CenterSweep and Exp.Range are only optional. If both are omitted, EasySpin tries to determine a field range large enough to accomodate the full spectrum. This automatic ranging works for most common systems, but fails in some complicated situations. EasySpin will issue an error when it fails.

Points. By default, pepper computes a 1024-point spectrum. However, you can change the number of points to a different value using

Exp.nPoints = 5001;

You can set any value, unlike some EPR spectrometers, where often only powers of 2 are available (1024, 2048, 4096, 8192).

Harmonic. By default, EasySpin computes the first-harmonic absorption spectrum, i.e. the first derivative of the absorption spectrum. By changing Exp.Harmonic, you can request the absorption spectrum directly or the second-harmonic (second derivative) of it.

Exp.Harmonic = 0; % absorption spectrum, direct detection
Exp.Harmonic = 1; % first harmonic (default)
Exp.Harmonic = 2; % second harmonic

Modulation amplitude. If you want to include effects of field modulation like overmodulation, use Exp.ModAmp

Exp.ModAmp = 0.2; % 0.2 mT (2 G) modulation amplitude, peak-to-peak

Time constant. To include the effect of the time constant, apply the function rcfilt to the simulated spectrum.

More experimental settings

For more advanced spectral simulations, EasySpin offers more possibilities in the experimental parameter structure Exp.

Mode. Most cw EPR resonators operate in perpendicular mode, i.e., the oscillating magnetic field component of the microwave in the resonator is perpendicular to the static field. Some resonators can operate in parallel mode, where the microwave field is parallel to the static one. EasySpin can simulate both types of spectra:

Exp.Mode = 'perpendicular'; % perpendicular mode (default)
Exp.Mode = 'parallel';      % parallel mode

Temperature. The polarizing effects of low sample temperatures can also be included in the simulation by specifying the temperature:

Exp.Temperature = 4.2; % temperature in kelvin

With this setting, EasySpin will include the relevant polarization factors resulting from a thermal equilibrium population of the energy levels. For S=1/2 systems, it is not necessary to include the temperature. However, it is important in high-spin systems with large zero-field splittings, and in coupled spin systems with exchange couplings.

Microwave phase. Occasionally, the EPR absorption signal has a small admixture of the dispersion signal. This happens for example when the microwave phase in the reference arm is not absolutely correctly adjusted. EasySpin can mix dispersion with absorption if a Lorentzian broadening is given:

Sys.lwpp = [0.2 0.01];           % Lorentzian broadening (2nd number) required

Exp.mwPhase = 0;                 % pure absorption
Exp.mwPhase = pi/2;              % pure dispersion
Exp.mwPhase = 3*pi/180;          % 3 degrees dispersion admixed to absorption
Line broadenings

Lines in an isotropic cw EPR spectrum are not infinitely narrow, the have a certain linewidth. This linewidth can be supplied to garlic in the lwpp or the lw field of the spin system structure, in mT.

Sys.lw = [0 0.05]; % Gaussian and Lorentzian FWHM (full width at half height), mT
This defines the FWHM of the absorption Gaussian (first number) and Lorentzian (second number) broadening of the lines in the spectrum. Note that these are NOT the peak-to-peak line widths in first-harmonic spectra. To specify the peak-to-peak width, use the field Sys.lwpp.
Sys.lwpp = [0 0.03]; % Gaussian and Lorentzian peak-to-peak line width, mT

If you give both a Gaussian and a Lorentzian broadening, both will be used, yielding a so-called Voigtian line shape, e.g.

Sys.lw = [0.05 0.01]; % mT

For ways to model line widths when the anisotropies of the magnetic interactions don't average out completely, see below.

Multiple components

Often, an EPR spectrum shows a mixture of spin species. To simulate these spectra, each of the component spectra has to be simulated and added with the appropriate weight (depending on spin concentration) to the total spectrum.

This can be done all in one go with garlic. Just provide the component spin systems with their weights as a cell list (in curly braces) to garlic. For example, here is the simulation of a very simple two-component mixture with 2:1 ratio of spin concentrations.

Sys1.g = 2;
Sys1.lwpp = 1;
Sys1.weight = 2;
Sys2.g = 2.1;
Sys2.lwpp = 0.8;
Sys2.weight = 1;

Exp.mwFreq = 9.5;
Exp.Range = [300 360];


You don't have to specify Sys.weight - if it's absent it is assumed to be 1. These weights are absolute, i.e. a simulation with Sys.weight=20 yields a spectrum that is 10 times more intense than the one obtained with Sys.weight=2. There is no limit to the number of components in a simulation.

Simulating spectra in the fast-motional regime

If the tumbling of paramagnetic molecules in solution is fast compared to the EPR time scale, but not orders of magnitude faster, dynamic effects appear in the spectrum: Different lines will have different line widths, all of them broader than in the isotropic spectrum. This is the so-called fast-motional regime.

If the tumbling is assumed isotropic and governed by Brownian movement, the only parameter necessary to characterize the speed of tumbling is the rotational correlation time. It can be given in the spin system structure, directly in units of seconds

Sys.tcorr = 1e-10;   % rotational correlation time, in seconds.

or alternatively as the base-10 logarithm of the same value

Sys.logtcorr = -10;   % corresponds to 1e-10 seconds

The origin of the line broadenings lies in the anisotropy of the magnetic interactions, so garlic has to be supplied with full g and A tensor information. This includes the principal values and the orientation of the tensors.

Sys.g = [2.005 2.003 2.007];
Sys.Nucs = '14N';
Sys.A = [17 17 84];

Sys.g contains the three principal values of the g tensor. Sys.A contains the three principal values of the hyperfine tensor. If more than one nucleus is present, one 3-element row per nucleus has to be given. E.g.

Sys.Nucs = '14N,1H';        % two nuclei
Sys.A = [17 17 84; 5 5 2];  % 2x3 array

The orientations of the tensors relative to the molecular frame are defined in terms of Euler angles in 3-element array (see the function erot).

Sys.gFrame = [0 0 0];    % Euler angles for g tensor
Sys.AFrame = [0 pi/4 0]; % Euler angles for A tensor

All-zero values can of course be omitted.

Remember that for fast-motion simulations of systems with more than one nucleus, Sys.n cannot be used. Equivalent nuclei have to be specified one at a time.

garlic doesn't compute the fast-motion linewidths: It calls fastmotion. After the spectrum with the fast-motion linewidths is constucted, garlic convolutes it using the Lorentzian (and possibly Gaussian) FWHM from Sys.lw. This way, residual broadenings are easily included.

In conclusion, an illustrative example of a nitroxide radical in the fast-motion regime

A = mt2mhz([5.8 5.8 30.8]/10);
Sys = struct('g',[2.0088 2.0061 2.0027],'Nucs','14N','A',A);
Sys.logtcorr = -9; % corresponds to 1e-9 s = 1 ns
Exp = struct('mwFreq',9.5);
Frequency-swept spectra

garlic, like the other cw EPR simulation functions pepper and chili, does field sweeps by default. However, you can use it to simulate frequency-swept spectra as well.

For this, all you need to do is the following

Here is an example of a frequency-swept spectrum of an organic radical, with automatic frequency range determination:

Sys.g = 2.005;
Sys.Nucs = '1H,1H,1H,14N';
Sys.A = [6 5 2 1.7];
Sys.n = [2 2 2 1];
Sys.lwpp = 0.1;                   % peak-to-peak linewidth, in MHz
Exp.Field = 340;                  % static field, in mT

By default, garlic returns the absorption spectrum (Exp.Harmonic=0) when you simulate a frequency-swept spectrum. To get the first or second derivative, change Exp.Harmonic to 1 or 2. Note however that Exp.ModAmp is not supported for frequency sweeps.

All other capabilities of garlic apply equally to frequency sweep and to field sweeps. For example, you can simulate multi-component spectra, and you can simulate spectra in the fast-motion regime.