EasySpin: EPR Spectral Analysis, Simulation And Fitting

Transcription

EasySpinEasySpin:EPR Spectral Analysis,Simulation and FittingStefan StollDepartment of ChemistryUniversity of Washingtonbased on EasySpin 5.0 betaJune 20151

EasySpin runs on Matlab, cross-platformEasySpinMatlabLinuxWindowsOS X2

EasySpin development teamStefan StollUniversity of WashingtonJeremy LehnerUniversity of WashingtonStochastic Liouville equation solverJoscha NehrkornHelmholz-Zentrum BerlinFrequency-domain simulationsGeneral excitation geometriesMatthew KrzyaniakSpecMan data importNorthwestern University3

What's new in EasySpin 5Simulation of frequency-swept EPR spectra- for all levels of theory and motional regimesSimulation of magnetization curves- 𝜒, 𝜒𝑇, 𝜇eff for general spin systemsGeneral excitation schemes- circular and linear polarization, unpolarized mw- arbitrary angles between B0, B1 and mw beamNew frame definitions, improve single-crystal interface- simplifies specifications of tensor and crystal orientationsImport of ORCA calculations- read in calulated g, A, Q, and D tensorsRapid-scan EPR signals- time-domain steady-state solutions of Bloch equationsMore data formats- SpecMan, Magnettech, Adani, ActiveSpectrum, JEOL4

EasySpin and Matlab: VersionsMatlab- Two new releases per year (spring and fall)- Names: R2013a, R2013b, R2014a, R2014b, R2015a, etc.Always use most recent Matlab version.EasySpin- Major new version about once a year, bug fix releases in between- Supports all Matlab versions starting from 7.5 (R2007b)- Older Matlab versions cannot supported, since they lack someof the features needed in EasySpinRegularly check easyspin.org for updates.Keep EasySpin updated!5

EasySpin and Matlab documentationWeb resourcesEasySpin documentationEasySpin user atlab esk/help/helpdesk.htmlMatlab sys.matlab/topicsMatlab file eexchangeLocal Matlab and EasySpin documentation- press F1 - go to Start Toolboxes EasySpin Help- type doc in command window- point browser to EasySpinDir /documentation/index.html- type doc plot in command window to get help on function plot6

EasySpin user forum at easyspin.org/forum7

Matlab: Graphical user interfaceribbon menuworkspacefigureseditorcommand windowRunning code from the editor- press Ctrl Enter , or- select portion of code you want to run and press F9 , or- save as a file and press F5 8

Matlab: Vectors and arraysRow vector ( 1xN array)g [2.21 2.21 2.03];Column vector ( Mx1 array)f [1; 1; 2; 3; 5; 8];Matrices ( 2D arrayA [4 5; 6 7; 8 9];Array manipulationsX(:)X.'X'M(3,1) pi;f(2) [];f(1:2) 1;f(3:end) 0;X(:,3) 0;X(2,:) [];MM [M; M]make column vectortransposeadjointset elementdelete elementset elementsset elementsset columndelete rowconcatenatecommas or spaces along rowssemicolons to separate rowsArray functionszerosonesrandarray with all 0array with all 1random numbersMathematical operationsX*YX.*Yf. 2vector/matrix multiplyelementwise multiplyelementwise squaredMatlab is case-sensitive!So mwFreq and mwfreq are treatedas two separate variables!9

Matlab: StringsString enclosed between to single quotesConcatenate two stringsAlgorithm 'simplex';Nucs '63Cu,14N';y 'Jerry';X ['Tom', ' and ', y];Two single quotes to include a quoteX 'Ivar''s Salmon House';String array of charactersString manipulationsConverting to/from numbersX(3)X(1:4)X(1:4) strmat2strstring to numbernumber to stringmatrix to stringsprintfgeneral conversion function(similar to C programming)extract characterextract sub-stringdelete sub-stringfind one string in anothercomparing stringssearch and replace10

Matlab: StructuresStructure collection of variables (called fields), with a nameAn exampleSoftware.Name 'EasySpin';Software.YOB 2000;Software.Version [4 5 5];Software.Price 0;Software.Users 'many';Software.Developers 1;Software.Budget 0;Software.Functions 97;Software.UnitTests 495;Software.Citations 1100;EasySpin spin systemNitroxide.g [2.0088 2.0061 2.004];Nitroxide.Nucs '14N';Nitroxide.A [16 16 86];Nitroxide.lwpp 1;EasySpin experimental parametersExperiment.mwFreq 94.9;Experiment.CenterSweep [3462 50];11

Matlab: Cell arraysCell arrays arrays where each element can be of arbitrary size and typeA{1}A{2}A{3}A{4} 'EPR';[1 1 2 3 5 7];sin(pi/5);{'x',12};A(k) addresses the cell no kA{k} addresses the content of cell no kA{3} [];A(3) [];puts an empty array into cell kremoves cell k altogether12

Matlab: CommentsOne-line comments: percentage signa log(5);% a sophisticated computationMulti-line comments: %{ and %}a [5, 3i, 1.4];% values to be squared%{b(1) a(1) 2;b(2) a(2) 2;b(3) a(3) 2;% element-by-element%}b a. 2;% all in one line13

Matlab: Scripts and functionsMatlab files *.m are either scripts or functions, depending in the keyword function.Each callable function must reside in a separate file.Functions can have sub-functions, which are not accessible from outside.mysims.mMatlab scriptNx.Nucs '14N';Nx.A [16 16 86];Nx.tcorr 1e-9;Ex.mwFreq 9.5;[B,spc] chili(Nx,Ex);save mysims Nx Ex B spcaffects variables on the workspaceCalling the script mysimsaddnoise.mMatlab functionfunction ynoisy addnoise(y,snr)noise rand(size(y)) - 0.5;noiselevel snr*(max(y)-min(y));ynoisy y noiselevel*noise;has its own workspaceCalling the function spcn addnoise(sim,0.2)14

EasySpin: Installation1. Install auxiliary softwareWin 64bit: download2. Download zip file from EasySpin website easyspin.org3. Unpack zip file to a directory mydir e.g. to C:/easyspin-x.y.z or /usr/var/easyspin-x.y.z EasySpin folder structure:main folder mydir /easyspin-x.y.ztoolbox functions mydir /easyspin-x.y.z/easyspindocumentation mydir /easyspin-x.y.z/documentationexamples mydir /easyspin-x.y.z/examples4. Tell Matlab about EasySpin Launch Matlab Go to File Set path . Remove any old EasySpin entries from Matlab path Add the folder mydir /easyspin-x.y.z/easyspin to Matlab path Save and close the Set path window5. Finish Type easyspincompile in command window Type easyspininfo in command window15

Data import and exporttext formatstextreadtextscandlmreadsave dographIgor JEOLSpecMan16

Data import and exportLoading and importingeprloadreads data from Bruker spectrometersESP: .spc/.par, BES3T: .DTA/.DSCalso loads experimental parameterssupports ActiveSpectrum, magnettech and Adani spectrometersloadtextreadxlsreadload data stored in Matlab format (.mat)reads text (ASCII) datareads Excel spreadsheets (.xls)Import wizard: File Import Data.or through workspace toolbar[B,spc] eprload('myoglobin.spc');[B,spc] eprload('catalase.DSC');[B,spc] textread('data.txt', '%f %f', 'headerlines', 12)17

Data import and exportSaving and exportingsavesave –ASCIIxlswritesaves data in Matlab format (.mat)saves text (ASCII) datasaves as Excel spreadsheet (.xls)data [B spc];save –ASCII mysims.txt aves data in Bruker EPR format (BES3T)18

Data work-upBaseline correction etcbasecorrexponfitmeansmoothaddnoisepolynomial baseline correctionfits exponentials to datacomputes the meandata smoothingadds noise to dataFourier transform etcfftfdaxisctafftapowinFast Fourier Transform (complex)frequency-domain axiscross-term averaged FFTapodization window (Hamming etc)Complex datarealimagabsreal partimaginary partmagnitude19

Plotting dataPlotting )semilogx(x,y)semilogy(x,y)loglog(x,y)Changing the appearance of plotsxlabel('magnetic field [mT]');ylabel('intensity');title('EPR spectrum');legend('first','second','third');hold onhold offaxis tightstackplot(x,y)xlim([0 30])ylim([0 2])20

Motional regimes21

EasySpin simulation functionspeppergarlicchilirigid-limit cw EPRisotropic-limit and fast-motion cw EPRslow-motion cw EPRsaltsaffronENDORpulse EPR (ESEEM and ENDOR)Calling two input argumentsthree input argumentsspin system details (structure)experimental details (structure)simulation options (structure)pepper(.)spc pepper(.)[B,spc] pepper(.)plots the simulated spectrumreturns simulated spectrumreturns spectrum and field axis22

Spin system: Electron spinsInput syntaxSys.S 1/2one electron spin S 1/2(default, no need to specify explicitly)Sys.S 5/2one electron spin S 5/2Sys.S [1/2, 1/2]two electron spins S1 S2 1/2Possible valuespeppergarlicchilisolid-state cw EPRisotropic, fast-motionslow-motionsaltENDORsaffron pulse EPRarbitrary number, arbitrary spinone spin with S 1/2one spin with S 1/2arbitrary number, arbitrary spinone spin with arbitrary S23

Spin system: g matrices𝜇B /ℎ 𝑩𝒈𝑺 𝜇B /ℎ (𝐵𝑥 𝑔𝑥 𝑆𝑥 𝐵𝑦 𝑔𝑦 𝑆𝑦 𝐵𝑧 𝑔𝑧 𝑆𝑧 )g values,Sys.gSys.gSys.gone electron spin [1.9, 2.1, 2.2] [1.9, 2.2] 2g values,Sys.gSys.gSys.gtwo electron spins [2,2,2; 2.1,2.1,2] [2 2.1; 2.05 1.98] [2.03; 2.01]Tensor orientationSys.gFrame [0,pi/4,0]g eigenframerhombic gaxial g, [1.9, 1.9, 2.2]isotropic g, [2, 2, 2]one row per electron spinrhombic gaxial gisotropic gone row per electron spinorientation of g tensor frame in molecular frameUnits: radiansFrequency/field/g conversions(ν/GHz) 13.9962 g (B0/T)71.4477 (ν/GHz) g (B0/mT)or use eprconvert24

Spin system: Zero-field splitting tensorsHamiltonian (in frequency units)S D S Dx S x2 Dy S y2 Dz S z2 D(S z2 S 2 / 3) E (S x2 S y2 )EasySpin inputSys.D 100Sys.D [100 10]Sys.D [-40 -40 80]Tensor orientation Dx D 0 0 Units: MHz0Dy00 13 D E0 10 0 3D E Dz 000 0 2D 31 cm-1 30 GHzD 100 MHz, E 0D 100 MHz, E 10 MHz[Dx, Dy, Dz] in MHzUnits: radiansSys.DFrame [0 40 32]*pi/180;EasySpin also supports higher-order zero field terms. See documentation.25

Spin system: Magnetic nucleiSpecifying nuclear spinsSys.NucsSys.NucsSys.NucsSys.Nucs comma-separated list of isotopes'1H';'63Cu,14N';'13C';'1H,1H,1H,1H';Helper functions to add or remove nuclear spins from the spin systemSys nucspinadd(Sys,'1H',[2 8]);Sys nucspinrmv(Sys,2);26

Spin system: Magnetic nucleiNuclear constantsisotopesinteractive periodic tablewithnuclear isotope databasenucabundnucgvalnucqmomnatural abundancenuclear g factorsnuclear electricquadrupole momentsnuclear spinquantum numbersnucspinlarmorfrqLarmor frequency27

Spin system: Isotope mixturesNatural-abundance mixtures: omit mass numberSys.NucsSys.NucsSys.NucsSys.Nucs 'Cu';'Cu,14N';'Cu,Cl';'C';69% 63Cu, 31% 65Cu53% 63Cu/35Cl, 23% 65Cu/35Cl, 17% 63Cu/37Cl, etc98.9% 12C, 1.1% 13C"natural abundance" can vary!Mixtures with custom abundances: separate fieldSys.Nucs '(14,15)N';Sys.Abund [50 50];Sys.Nucs 'Cu,(32,33)S';Sys.Abund [0.1 0.9];28

Spin system: Multiple componentsOne componentone spin system. pepper(SysA,Exp,.)Two componentstwo spin systems. pepper({SysA,SysB},Exp,.)Weights in SysA.weight, SysB.weight.Arbitrary number of components possible.29

Spin system: Hyperfine matricesHamiltonian (in frequeny units)Units: MHz𝑺𝑨𝑰 𝑆𝑥 𝐴𝑥 𝐼𝑥 𝑆𝑦 𝐴𝑦 𝐼𝑦 𝑆𝑦 𝐴𝑦 𝐼𝑦Principal values1 mT 28 MHz10-4 cm-1 3 MHzone row per nucleusSys.Nucs '1H'Sys.A 10Sys.A [4, 12]Sys.A [3, 5, 12]one nuclear spinisotropic A, [10 10 10]axial A (Axx Ayy), [4, 4, 12]rhombic ASys.Nucs '1H,14N'Sys.A [3 5 12; 1 2 3]two nuclear spinstwo rhombic AIsotropic, axial, rhombic components[aiso, T, ρ]Sys.A [4 2 0];Orientationone row per nucleusSys.AFrame [0,pi/4,0] T A aiso 0 0 one row per nucleus0 T 00 0 2T Units: radiansEuler angles of A eigenframe in molecular frame30

Spin system: Nuclear quadrupole tensorsHamiltonian (in frequeny units)𝑰𝑷𝑰 𝑃𝑥 𝐼𝑥2 𝑃𝑦 𝐼𝑦2 𝑃𝑧 𝐼𝑧200 (1 )e2 qQ P 0 (1 ) 0 4 I (2 I 1)h 02 0e2 qQ / h 2I ( I 1) Pzz(in eigenframe of 𝑷) Tensor principal valuesone row per nucleusUnits: MHzSys.Q 0.7;e2qQ/h 0.7 MHzSys.Q [0.7, 0.1]e2qQ/h 0.7 MHz, and η 0.1 (between 0 and 1)Sys.Q [-1.2,-0.8,2]3 principal values (in MHz)Tensor orientationone row per nucleusPxx PyyPzzUnits: radiansSys.QFrame [0,pi/4,0] Euler angles of Q eigenframe in molecular frame31

Frames and tensor orientationse-e coupling tensorframediffusion tensorframeSys.eeFrameg tensorframeSys.gFrameSys.DiffFramemolecularframe MD tensorframeSys.AFrameSys.DFrameSys.QFrameA tensorframeQ tensorframeFor each frame orientation: 3 Euler angles (𝛼, 𝛽, 𝛾) that transform M frame to tensor frame.32

Frames and tensor orientationsmolecularframe M(𝛼, 𝛽, 𝛾)Rtensorframe T% g tensor in eigenframeg eig diag([1.9, 2.0, 2.1])1.90000002.00000002.1000% Euler angles α, β, γ (in radians)abc [10 45 30]*pi/1800.17450.78540.5236% Rotation matrixR 9640.12280.7071rows of R: g axes in molecular framecolumns of R: molecular axes in g frame% g tensor in molecular frameg mol R.'*g .04532.0125% get Euler angles from Reulang(R)*180/pi10.000045.000030.000033

Spin system: Import from ORCA calculationRequesting EPR parameters in ORCAInclude %eprnmr section:%eprnmrgtensor 1Nuclei all H {aiso, adip, aorb, fgrad, rho}endORCA calculationmy.oiftext input fileORCAImport into EasySpinObtain EPR parameters from .prop file:Sys orca2easyspin('my.prop')Visualizationtext output filemy.oof.gbw file.prop filemy.gbwmy.propThanks to Frank Neesereads the .prop fileorcaview34

Spin system: Static broadeningsConvolutional broadeningsisotropic onlyphenomenologically account for line broadeningUnits: mTSys.lwpp [0.2 0.3];Sys.lwpp 0.3;Sys.lw [0 0.1];1st element2nd elementlwpplwSys.lwEndor 0.3;(only salt and saffron), in MHzStrain broadenings(only pepper)GaussianLorentzian (optional)peak-to-peak linewidthfull width at half maximum (FWHM)isotropic or anisotropicUnits: MHzline broadening due to unresolved hf splittings and site-to-site disorderSys.HStrainunresolved hyperfine splittings (MHz)Sys.gStrainSys.AStrainSys.DStraindistribution of g valuesdistribution of A values (correlated with g) (MHz)distribution of D and E (MHz)35

Spin system: Rotational diffusionRotational correlation time(garlic and chili)Sys.tcorr 1e-9;Sys.logtcorr -9;Diffusion tensor c Units: s16R(chili only)Units: 1/sSys.Diff 1e9;Sys.logDiff 9;isotropicSys.Diff [1 2]*1e8;Sys.logDiff [8 8.3];axialSys.Diff [2,2.5,3]*1e8;Sys.logDiff [8.3,8.4,8.5];rhombicSys.DiffFrame [0 20 0]*pi/180; tilt angles fortensor orientation36

Spin system: Ordering potentialOrdering potential coefficients(chili)Expansion coefficients for potential𝐿𝑐𝐿,𝑀 𝐷𝑀0(𝜴)𝑈 𝜴 𝑘B 𝑇𝐿,𝑀Sys.lambda [1 0 0 0 0];First 5 terms: 𝐿, 𝑀 2,0 , 2,2 , 4,0 , 4,2 , (4,4)Frame aligns with diffusion tensor frame37

Static orientational distributionsOrientation of a spin center in the sample:Distribution of orientations of the spin center:Crystals𝜴 (𝜙, 𝜃, 𝜒)𝑃(𝜴)Partially oriented systemsone or several distinctorientations with equalprobabilitiesprobability is varyingfunction of OrderingPowdersall orientations withequal probabilitydefaultSlow motion: "partial MOMD" Slow motion: "MOMD"38

Single crystalsSpecify site splittings via the space or point group of the crystalspace group number and orientation of sites in unit cell site splittingExp.CrystalSymmetry 'P21/m';Exp.CrystalSymmetry 11;space group symbol, Hermann-Mauguinspace group number (between 1 and 230)Not all space group settings are supported.EasySpin requires the third axis of the crystal abc frame to be the unique axis.Exp.CrystalSymmetry 'C2h';Exp.CrystalSymmetry '2/m';point group, Schönflies notationpoint group, Hermann-Mauguin notationUse the point subgroup of the space group, not the local point group of theparamagnetic center.Crystal orientation in the spectrometerthree Euler anglesExp.CrystalOrientation [0 0 0];Exp.CrystalOrientation [0 0 0; 0 pi/2 0];orientation of a crystaltwin crystal39

, Sys.AFrameSys.DFrame, Sys.QFrameSys.eeFrame, Sys.DiffFrameLabframeCrystalframeMolecularframexL, yL, zLxC, yC, zCxM, yM, zMzL along static field (B0)xL along mw field (B1)zC along highest crystalsymmetry axisxC along another symmetryaxis perpendicular to zClocal symmetry frameof spin centerTensorframexT, yT, zTaligned withtensor principal axes40

Single crystalsCrystal rotations- specify rotation axis- generate rotated orientations- specify crystal symmetryn [1 0 0];[phi,theta] rotplane(n,[0 pi],31);Exp.Orientations [phi;theta];Exp.CrystalSymmetry 'P21212';Opt.Output 'separate';[B,spc] pepper(Sys,Exp,Opt);stackplot(B,spc);41

Powder spectra: Orientational averagingEasySpin computes powder spectra by default.Number of orientations10 5 3 2 Opt.nKnots gives the orientationalresolution in terms of number oforientations between θ 0 (north pole) and θ 90 pt.nKnots 10; 10 31;3 91;1 361; 0.25 901; 0.1 1 0.25 The more orientations, the- smoother the spectrum- longer the computation time42

Powder spectra: orientational averaging"Simulation grass"simple summationEasySpin method(projection)absorption1 3 6 first harmonic10 pepper, salt, saffron: Opt.nKnots43

Partially oriented systemsOrientational distribution𝑃 𝜴 exp [ 𝑈 𝜴 /𝑘B 𝑇]Orientational potential𝜆𝐿𝐾 𝑌𝐾𝐿 (𝜴)𝑈 𝜴 𝑘𝐵 𝑇𝐿,𝐾3cos 2 1U ( Ω) kBT 2Predefined potential in EasySpin:Exp.Ordering 2;Custom potential in EasySpin:Exp.Ordering @(ph,th) cos(3*th). 2;absorptionfirst harmonic–252044

cw EPR: a simple exampleSysCu.g [2 2.2];SysCu.lwpp 1;SysCu.Nucs 'Cu';SysCu.A [50 400];ExpX.mwFreq 9.5;ExpX.Range [270 360];pepper(SysCu,ExpX);45

Field sweeps and frequency sweepsField sweepFrequency sweepSys.g [2.05 2.3];Sys.Nucs '63Cu';Sys.A [40 300];Sys.g [2.05 2.3];Sys.Nucs '63Cu';Sys.A [40 300];Sys.lwpp 1;Sys.lwpp 1;% mTExp1.mwFreq 9.5;Exp1.Range [250 360];pepper(Sys,Exp1); % GHz% mT% MHzExp2.Field 350;Exp2.Range [7 10];% mT% GHzpepper(Sys,Exp2);Field sweep: use Exp.mwFreq and Exp.RangeFrequency sweep: use Exp.Field and Exp.RangeIf Exp.range is omitted, EasySpin automatically determines rangeUnits for Sys.lw and Sys.lwpp different for field and frequency sweepsWorks equally for pepper, chili, garlic and all theory levelsField sweep gives first-harmonic, frequency sweep absorption spectrum46

Matrix diagonalization vs. perturbation theoryMatrix diagonalization arbitrary number of electron andnuclear spins general spin Hamiltonian all transitions always exact- slowalways ok!2nd-order perturbation theory- for one electron spin only(S 1/2 and S 1/2)- neglects some Hamiltonian terms- only allowed transitions- accurate only for small A and D many nuclei possible fastuse with care!S 1/2, 63Cu, 2x 14NOpt.Method 'matrix'Opt.Method 'perturb'8.4 s0.08 s47

Energy level diagramsPlotting of energy level n systemorientation'x', 'y', 'z', or angles [𝜙, 𝜃]Rangefield range (mT)[minB0 maxB0]mwFreq microwave frequency (GHz)optional(color indicated allowed/forbidden)Calculation of energy level diagrams without plotting:E levels(Sys,Ori,Range,mwFreq)48

Slow-motion regime simulationsEasySpin implementsFreed's SLE solverRotational dynamicsRotational correlation timeSys.tcorr 1e-9;Sys.tcorr [1 2 10]*1e-9;isotropicanisotropic (axial or rhombic)Rotational diffusion tensorSys.Diff 1e-9;Sys.Diff [1 2 2]*1e-9;isotropicanisotropic (axial or rhombic)Partial orderingOrdering potentialSys.lambda [3 1 0 0 0];potential coefficientsPowders vs. single orientationPowder spectrum (MOMD) by defaultSingle-orientation spectrum: use Exp.CrystalOrientation49

Slow-motion regime simulationsOrientational basis set𝐿Wigner functions 𝐷𝐾,𝑀(𝜙, 𝜃, 𝜒)Maximum values for even L, odd L, K and M:Opt.LLKM [12 0 6 6];The slower the motion and the more anisotropic the spectrum, the largerthese values have to be to produce artifact-free spectra.50

Least-squares fitting: Overviewexperimental spectrumyexpResidualsri f ( yi ,exp ) f ( yi ,sim ( p))nSum of squares ri 22i 1rmsd 2 / NThe global minimum is very difficult to locate!a local minimummodel simulation, ysimDeath Valleythe global minimumDead Sea shore51

Least-squares fitting: MethodsEasySpin does not use analytical derivativesMonte CarlosimplexLev/MargridGlobal methods(search all over the place)- Monte Carlo- genetic algorithms- simulated annealing- tree and grid searchesLocal methods(downhill into valley from a starting point)- Nelder-Mead simplex- Levenberg-Marquardt- NL2SOL, NL2SNO- PowellHybrid methods1) global method to locate promising region(s)2) local method to zero in on minimumAvailable in EasySpin:global methods:- grid search- genetic algiorithm- Monte Carlolocal methods:- Levenberg-Marquardt- Nelder-Mead simplexhybrid methods52

Least-squares fitting: esfitOne interface for all simulation functions.experimental spectrumsimulation parameters[SysFit,spcFit] simulation function(1) Central values of parametersSys0.g [2.008 2.006 2.003];Sys0.Nucs '14N';Sys0.A [16 16 86];Sys0.logtcorr -8.5;spin systemparameter variationsettings forfitting algorithms(2) Allowed variation of parametersone parameter, for 1D searchVary.logtcorr 1;two parameters, for 2D searchVary.logtcorr 0.2;Vary.g [0, 0, 0.0005];No limit on number of parameters, but the more parameters the slower the fitting.53

Least-squares fitting: Multiple componentsOne componentone spin system. esfit('pepper',expspc,SysA,VaryA,,Exp,.)one spin systemparameter variationTwo componentstwo spin systems. p,.)two spin systemparameter variationsWeights in SysA.weight, SysB.weight, VaryA.weight, VaryB.weight.54

Least-squares fitting: SettingsChoosing the algorithm:FitOpt.Method'simplex' Nelder/Mead simplex (default)'levmar' Levenberg/Marquardt'montecarlo' Monte Carlo'genetic' genetic algorithm simplex'grid' grid search simplex'fcn' use spectrum'int' use integralExample:FitOpt.Method 'simplex int'Knowing when to tion tolerance for chi-squaredtermination tolerance for parameter stepmaximum runtimeeach algorithm has different additional parameters55

Least-squares fitting: GUIset method, target, scalingstart/stopcurrent andbestparametersetsblack: datagreen best fitred: current simulationerrorprogresslist of stored parameter sets56

Least-squares fitting: Quality of fitQuality of fit: How deep is the minimum?indicators:- maximum/mean/standard deviation of residuals- residual index R- correlation coefficient of experimental andsimulated spectrum- eye expertisecompare to noise level σ:- max/mean residual σaccurate fit, only random errors in experimental data- max/mean residual σinaccurate fit, systematic errors in simulated spectrumno convergence or wrong modelError of parameters: How steep are the the walls?sensitivity of chi-square to change of parameter values57

Least-squares fitting: Best practicesBefore you start fitting- Baseline correct the spectrum; smooth the spectrum if too noisy.- Choose a physically reasonable model (number of spins, tensors, etc).- Keep the number of fitting parameters as small as possible.- Find good starting parameters by (1) analyzing your spectrum thoroughly,(2) studying literature of similar systems, and (3) using theoretical estimates.- Narrow down the parameter ranges as much as possible.EasySpin (or any other program) cannot find the minimum- if you are too far off initially.- if the parameter ranges are too large or too small.- if there are too many parameters.- if the model is wrong.- if there is too much noise or a non-flat baseline in the spectrum.After convergence- Estimate the goodness-of-fit at the global minimum. It might still be bad.- Look how sensitive the goodness-of-fit is to changes in parameters.- Even the best minimum you find might be physically incorrect.- The global minimum might not be the real minimum due to noise effects.58

Pulse EPR: A first exampleclearSys.Nucs '1H';Sys.A [2 4];Exp.Field 350;Exp.Sequence '2pESEEM';Exp.tau 0.0001;Exp.dt 0.012;Exp.nPoints 501;saffron(Sys,Exp);59

Pulse EPR: OverviewSimulation function: saffronPre-defined pulse sequenceExp.Sequence '2pESEEM';Exp.Sequence '3pESEEM';Exp.Sequence '4pESEEM';Exp.Sequence 'HYSCORE';Exp.Sequence 'MimsENDOR';TimingsExp.tau 0.120;Exp.dt 0.008;Units: μsEcho-detected field sweep?Simulate cw EPR spectrum withpepper, using Exp.Harmonic 0.What it supports- hard and soft pulses- several nuclear spins- high electron spin- user-defined pulse sequences- orientation selection built-in- data processing built-in60

Pulse EPR: Basic experimental settingsMagnetic field (in mT)Exp.Field 350;Spectrometer frequency (in GHz)Exp.mwFreq 9.5;Only needed for orientation selection.Number of pointsExp.nPoints 201;1D and 2DExp.nPoints [64 201]; 2DExcitation bandwidth (in MHz)Exp.ExciteWidth 100;Only needed for orientation selection.If not given, EasySpin uses default values.Pulse experimentDwell time (in μs)Exp.dt 0.008;1D and 2DExp.dt [0.008 0.012]; 2DThis has to be given for ESEEM experiments.Exp.Sequencefor pre-defined pulse experimentsExp.Flip, Exp.Inc, Exp.t, Exp.tpfor user-defined pulse experimentsFrequency range (in MHz)Exp.Range [0 30];This has to be given for ENDOR experiments.61

Pulse EPR: Pre-defined sequencesTwo-pulse ESEEMExp.Sequence '2pESEEM';Exp.tau 0.080;Three-pulse ESEEMExp.Sequence '3pESEEM';Exp.tau 0.100;Exp.T 0.080;HYSCOREExp.Sequence 'HYSCORE';Exp.tau 0.172;Exp.t1 0.08;Exp.t2 0.08;Mims ENDORExp.Sequence 'MimsENDOR';Exp.tau 0.100;Exp.Range [0 30];all times and delays in microseconds62

Pulse EPR: T1 and T2 relaxationRelaxation time constantsExp.T1T2 [10 2];(time for fall-off to 36.8%)first element: T1second element: T263

Pulse EPR, ENDOR: Orientation selectionOrientation/transition selection1. large anisotropies, wide EPR spectrum2. limited excitation bandwidth of mw pulsesParameters necessaryExp.ExciteWidth 100;(Gaussian FWHM, in MHz)Exp.mwFreq 9.5;(has to be given, in GHz)64

Pulse EPR: S 1/2Set electron spinSys.S 1;Sys.S 5/2;Sys.S 7/2;Set zero-field interactionSys.D -200;Sys.D [-130 -80 210];What to remember- flip angles are different for differenttransitions- optimized echo amplitude might notcorrespond to 90 flips for any transition- often strong orientation selection- nuclear frequencies strongly dependon mS65

Pulse EPR: S 1/2, many nucleiMn(II)(Im)6S 5/2, I 5/2, and six I 1 (26244 spin states)simulated single-crystal HYSCORE, ideal pulses (6 seconds)66

Pulse EPR: User-defined pulse experimentsFields needed for a user-defined experimentExp.Flippulse flip angle in multiples of 90 Exp.Incincrementation scheme (0 const., 1 first dim., 2 second dim.)Exp.tinitial delays, in microsecondsExample: Two-pulse ESEEMExp.Flip [1 2];Exp.Inc [1 1];Exp.t [0 0];Example: 2D three-pulse ESEEMExp.Flip [1 1 1];Exp.Inc [1 2 1];Exp.t [0.112 0 0.112];Example: HYSCOREExp.Flip [1 1 2 1];Exp.Inc [0 1 2 0];Exp.t [0.1 0 0 0.1];180 90 τ90 constt1t2dim1dim290 τechoconst67

Pulse EPR: Transfer pathways and filters90 90 90 τElectroncoherenceorderT 1 or -10 (α or β)Pathways with detectable echo- equal times in and in –- ending in –Examples:two-pulse ESEEMthree-pulse ESEEMHYSCOREDONUT-HYSCORErefocused primary( -)( α-), ( β-)( αβ-), ( βα-)( αβα-), ( βαβ-)(- -)Pathway filter in EasySpin:three-pulse ESEEM:Exp.Filter '.a.'five-pulse ESEEM: Exp.Filter ' .';τ-1, 1Echo pathways:( α-), ( β-)(-α ), (-β )Pathway filter in EasySpin:Exp.Filter one character per delay' ' 1'-'-1'a'0 (α)'b'0 (β)'.'anything'0'0 (α or β)'1' or Exp.Filter '.a.'Exp.Filter ' .';68

Pulse EPR: Soft (real, non-ideal) pulsesSoft pulses in user-defined sequencesExp.tplength of pulsesExample: HYSCOREExp.Flip [1 1 2 1];Exp.Inc [0 1 2 0];Exp.t [100 0 0 100]*1e-3;Exp.tp [10 10 20 10]*1e-3;Units: μspulse k 1pulse kExp.t(k)Delay values in Exp.t:between end of one pulseand beginning of nextSoft pulses: Offset integration neededOpt.lwOffset width of offset distribution, in MHz(about 1/tp of first pulse; typically 100 MHz)Opt.nOffsets number of integration points (typically 10-30)Soft pulses are not possible with pre-defined sequences!69

Pulse EPR: ENDORSpecifying ENDORExp.Sequence 'MimsENDOR';Exp.Range [135 155]; frequency range (in MHz)Exp.tau 0.100;What to think about- saffron does not (yet) takehyperfine enhancement intoaccount (in contrast to salt)- ENDOR spectrum is simulatedas sum over nucleiENDOR linewidth (in MHz) stick spectrum is convoluted with lineshapeSys.lwEndor 0.1;Gaussian FWHMSys.lwEndor [0.1 0.2];[Gaussian FWHM, Lorentzian FWHM]70

Pulse EPR: Some optionsProduct ruleOpt.ProductRule 0;Opt.ProductRule 1;product rule off (default)product rule on, faster for 3 nucleiHYSCORE log plotOpt.logplot 0;Opt.logplot 1;linear coloring of intensities (default)logarithmic coloring of intensities, gives more detailProcessing optionsOpt.Window 'ham';Opt.ZeroFillFactor 2;apodization window, applied before FFTfactor for zero filling before FFT71

Pulse EPR: Theoretical background1. Hamiltonians- Set up Hamiltonian HS for spins other th

Data import and export eprload reads data from Bruker spectrometers ESP: .spc/.par, BES3T: .DTA/.DSC also loads experimental parameters supports ActiveSpectrum, magnettech and Adani spectrometers load load data stored in Matlab format (.mat) textread reads text (ASCII) data xlsread reads