Fe(III) G-Tensor Anisotropy EPR Simulation
Matlab/EasySpin tutorial
Matlab/EasySpin tutorial
By Dan M.
TABLE OF CONTENTS
IntroductionOpen Matlab
The Fitting Script
Appendix
Introduction
This tutorial is a quick overview on how to run EasySpin using a simple Matlab script. The example is a simulation of published work regarding the g-tensor of Fe(III).It is highly recommended to follow the EasySpin youtube videos first as they are a far better resource:
- EasySpin_Youtube - Excellent YouTube videos regarding Matlab/EasySpin
Software used:
- CentOS 7 - My Linux OS
- Matlab - Download Matlab from UofI webstore if at UIC.
- EasySpin - Free EPR simulator.
Go ahead and download and unzip a starting directory: tut.zip which will be named easy_spin_tut_fe3
Look in Dir:
$ cd easy_spin_tut_fe3 $ ls fe_fit_2.m intermediate.dat pathdef.m
Here you can see we have a few files:
- fe_fit_2.m - EasySpin matlab file
- intermediate.dat - The X/Y formatted EPR spectrum
- pathdef.m - Matlab path definitions.
Open Matlab
$ matlabNote we use the "Run Section" instead of "Run" button.
The software interface looks like:
The program loaded our initial guesses to the g-tensors and their
distribution defined as gStrain. I believe
the gStrain is expressed as a Gaussian distribution of g-tensor values
due to slight molecular distortions (ligand distance variations etc) within the sample.
This is an interesting result describing the order of such ligands around the metal center.
the simulation and experimental data. Now lets go one step further
and Minimize with the Levenberg/Marquardt algorithm:
command window above. Cut and paste these values into a file for safe keeping.
Next we generate X/Y text file formats for the simulated and exptl data so we
can make plots in any program we choose. This is done in the "second" section of the
script defined by "%%":
The resulting files are in text format:
- exp.txt - The original spectrum in ascii-text format
- sim.txt - The simultaed spectrum in ascii-text format
We are effectively done now with the simulation. However, I'd like to talk a bit more about the
matlab script used in the easyspin simulation.
A closer look at the .m script
Please see the EasySpin documentation and tutorials for a better understanding. Below is a
very broad overview of how our script works.
Appendix Files:
All of the files for the tutorial are available here:tut.zip