Examples

Here is a collection of examples for the use of EasySpin, divided into several categories. They are an excellent starting point for writing your own code.

Data analysis
adaptiveaverage.mSignal averaging using the EWRLS adaptive filter method
deadtime.mESEEM dead time correction with ctafft()
denoise.mVarious methods for de-noising spectral data

ENDOR simulations
endorperturb.mENDOR simulations: matrix diagonalization vs perturbation theory
endorseparate.m1H ENDOR, summed and separate output
endorsimple.m1H ENDOR of a powder
excitew.mENDOR excitation widths and orientation selectivity
manynuclei.mOrientation-selective ENDOR of many protons
mn_cluster_ps2.mENDOR of the tetranuclear Mn cluster in photosystem II (S2 state)
oripreselect.mSpeed-up of ENDOR simulations using orientation pre-selection
oripreselect2.mSpeed-up of ENDOR simulations using orientation pre-selection
oriselection.mENDOR orientation selection in a powder
userpreselect.mUser-supplied orientation pre-selection

exchange
chemicalexchange_norris.mMulti-site chemical exchange

Fast-motion cw EPR simulations
fast_fnb.mParafluoronitrobenzene (multinuclear system), fast-motional regime
fremysalt.mFremy's salt (PADS), motional narrowing
nitroxide_ftcorr.mNitroxide radical, various correlation times

Least-squares fitting
basicfit.mBasic example of spectral fitting using EasySpin
chili_multifreq.mCustom function for simulating slow-motion X- and Q-band EPR spectra
curry_fit.mCombined fit of magnetic susceptibility and magnetic moment
fit_multifreq.mUsing a custom function for globally fitting multiple EPR spectra
fitscaling.mImpact of different scaling methods on fitted parameters
fittarget.mFitting the spectrum vs fitting its integral
globallocal.mGenetic algorithm combined with local simplex search
multicomponents.mFitting a multi-component spectrum
pentacenefit.mFitting the spectrum of pentacene anion radical
twocompfit.mFitting a two-component spectrum
userfun_esfitalgorithm.mUtilizing low-level fitting functions directly for custom fitting

Isotropic cw EPR simulations
biarylradical.mBridged biaryl cation radical (1000s of lines)
biphenyl.mBiphenyl radical anion
cobalttrimer.mCobalt trimer
isotopemix.mSimple isotope mixture
naphthalene.mNaphthalene radical anion and cation
pentacene.mPentacene radical anion and cation
phenalenyl.mPhenalenyl radical anion, including 13C satellite lines
phenalenyl_manual.mPhenalenyl radical anion, including 13C satellite lines

Magnetometry
cobaltdimer_magnetization.mMagnetization curve of a cobald dimer complex (crystal)
curry_curie_law.mSusceptibility for S=1/2 using curry and explicit Curie law
effectivemagneticmoment.mComparison of magnetic moment and effective magnetic moment
magnetization_tempdep.mTemperature-dependence of magnetization
squid_basic.mTemperature dependence of magnetic moment and susceptibility
squid_twospins.mTemperature dependence of magnetic moment and susceptibility
susceptibility.mTemperature dependence of magnetic susceptibility

pulse evolve
deer_simple.mDEER from a simple system with two spins-1/2 (powder)
pulsprof.mExcitation profile of a mw pulse
threepeseem.mManual simulation of three-pulse ESEEM (density matrix)
twopecho.mSimulation of a two-pulse echo using the density matrix
twopeseem.mManual two-pulse ESEEM simulation (density matrix)

pulse saffron
custom_2p_echo.mTwo-pulse echo using chirp pulses (saffron)
custom_3p.mThree-pulse ESEEM sequence with user-defined sequence
custom_3p_transient_detection.mThree-pulse ESEEM sequence with user-defined sequence
custom_3pecho_withPhasecycling.mThree-pulse echo with phasecycling (saffron)
custom_echo_indirectdimensions.mTwo-pulse echo using chirp pulses (saffron)
custom_hyscore.mHYSCORE with non-ideal pulses
hh_threepulse.mThree-pulse ESEEM of two 1H nuclei (saffron)
hyscoresimple.mHYSCORE of a 14N nucleus (saffron)
n14_twopulse.mTwo-pulse ESEEM of a 14N nucleus (saffron)
orisel2p.mOrientation-selective three-pulse ESEEM (saffron)

pulse shaping
Downconversion.mDigital downconversion and quadrature detection for a real input signal
IQupconversion.mUpconversion of an IQ signal to an intermediate frequency (IF)
ResonatorBandwidthCompensation.mResonator bandwidth compensation by chirp rate adaptation
ResonatorSimulation.mIllustration of the effect of the resonator on pulse shapes and pulse
SSBupconversion.mSingle sideband upconversion with upsampling
TransmitterNonlinearity.mIllustration of amplitude compression and compensation for transmitter
chirpechopulses.mWURST chirp pi/2 and pi pulses
higherordersechpulses.mFirst order sech/tanh and higher order sech inversion pulses
sechtanhinversionpulse.mComparison of excitation profiles of a rectangular and sech/tanh pulse

pulse spidyan
adiabatic_passage.mSpin trajectory during adiabatic passage (spidyan)
advanced_options.mAdvanced options for spindynamics (spidyan)
inversion_pulses.mSpin trajectories with three different inversion pulses (spidyan)
moving_pulses.mMoving a pulse with Exp.Dim (spidyan)
multidimensional_experiments.mSetting up indirect dimensions (spidyan)
populationtransfer.mEnhancement of central transition in a S = 3/2 system (spidyan)
rabi_oscillation.mRabi oscillation (spidyan)
relaxation.mRelaxation (spidyan)
resonatorlimitations.mResonator limitations and compensation (spidyan)
spin_selective_excitation.mSelective excitation of two spins with identical resonance frequency (spidyan)
spinecho_gaussianline.mSpin echo of a Gaussian line (spidyan)
spinecho_nitroxide.mSpin echo of a nitroxide using spidyan (spidyan)

Slow-motion cw EPR simulations
cupc.mSlow-motion spectrum of copper phthalocyanine in sulfuric acid
nitroxide_basic.mSimple slow-motional cw EPR spectrum simulation of a nitroxide radical
nitroxide_frq.mFrequency dependence of nitroxide slow-motional spectra
nitroxide_potential.mNitroxide slow-motional cw EPR spectrum with an orientational potential
nitroxide_tcorr.mCorrelation time dependence of a nitroxide spectrum
orderparameter.mCalculate order parameter S(2,0)
orientpotential.mEffect of orientational potential on slow-motion an rigid-limit EPR spectra
rhombicdiffusion.mComparison between fast- and slow-motion simulation algorithms
slow_fast.mComparison between fast- and slow-motion simulation algorithms
tempone.mSlow-motional EPR spectrum of TEMPONE
tumbling.mEffect of tumbling on EPR spectrum of axial g tensor
xchange.mEffect of Heisenberg exchange in a nitroxide sample

Solid-state cw EPR simulations
broaden.mLine broadening models for cw EPR spectra
chromium_iii.mCr(III) at Q band
copper_nitrogens.mCu2+ with four imidazole nitrogens
copper_sxq.mA Cu(II) complex at S, X and Q band
crystalroadmap.mResonance roadmap from single crystal rotation
crystalrotation.mSingle-crystal spectra with sample rotation
cuedta.mMixture of two copper-EDTA complexes
cumnt2.m[Cu(mnt)2] at 1.4 GHz, single-crystal
dstrain_corr.mDemonstration of correlated D-E strain
eespins.mTwo coupled electrons
freq_vs_field_sweeps.mComparison of field sweep and frequency sweep cw EPR
freqsweep.mBasic frequency-swept EPR spectrum
gstrain.mEffect of g strain at various mw frequencies
inhomogeneous.mHow to use custom inhomogeneous distributions
matrixperturb.mMatrix diagonalization vs perturbation theory
mn_strain.mMn(II) at X band with D strain
partial_order.mAn partially oriented Cu(II) complex
photosystem2_oec.mEPR spectrum of the S2 state of the oxygen evolving complex
temp.mTemperature effects for cw EPR
trifluormethyl.mCF3 radical in gas matrix at low temperature
triplet_C60fullerene.mExited triplet state EPR of C60 fullerene
triplet_naphthalene.mPhoto-excited triplet state of naphthalene
triplet_spinpolarized.mPowder spectrum of spin-polarized triplet (simple)
triplet_spinpolarized2.mSingle-crystal spectra of triplet with non-equilibrium populations
triplet_triphenylbenzene.mGround-state triplet of triphenylbenzene di-anion

trajectories
cardamom_brownian_diffusion.mSimulate a motional cw EPR spectrum using cardamom and chili
cardamom_jump.mSimulate a cw EPR spectrum using a jump model between 3 states with
cardamom_md_direct_nitroxide.mSimulation of a cw EPR spectrum using a molecular dynamics trajectory of
cardamom_md_explicit_nitroxide.mSimulation of a cw EPR spectrum using a molecular dynamics trajectory of
cardamom_restricted_diffusion.mSimulate a cw EPR spectrum with an orientational potential using cardamom
trajectories_diffusion.mTrajectories of stochastic rotational diffusion
trajectories_diffusion_userpot.mTrajectories of stochastic rotational diffusion
trajectories_jump.mTrajectories of Markovian jumps between discrete states
trajectories_local_global.mTrajectories of coupled stochastic rotational diffusion

Other examples
cwmultiphoton.mCw EPR as a multiphoton experiment
overmodulation.mEffect of modulation amplitude on the line shape in cw EPR
resonatorcoupling.mTuning picture of a cw EPR spectrometer
rotplane.mCompute a set orientations in a plane
spinopxyz.mQuick way to compute spin matrices by hand
symmdemo.mHamiltonian symmetry using symm()
terbium.mResonances of a Tb4+ system, animated