Simulation Package for cwEPR spectra
Project description
Opensource simulation package for cwEPR spectra. EPRsim has been developed in the group of Prof. Dr. Stefan Weber at the University of Freiburg, Freiburg im Breisgau, Germany, during the last couple of years. EPRsim was developed by Stephan Rein. The program uses several concepts described in [1]. EPRsim is opensource and available free of charge.
Find the full documentation at the link below: https://www.radicals.unifreiburg.de/de/software
Installation
Install EPRsim via pip:
$ pip install eprsim
Run EPRsim
Call it as package when running Python.
>>> import EPRsim.EPRsim as sim
Define parameters and run the simulation by invoking the simulate() function of EPRsim.
>>> Param = sim.Parameters() >>> B, spc, flag = sim.simulate(Param)
The simulate() functions is discribed in the following:
Parameters
 Parameters : object
 Object with all simulation parameters.
Returns
 field : numpy.ndarray
 Magnetic field vector
 spc : numpy.ndarray
 Intesity vector of the cwEPR signal
 flag : list
 Flags with warning codes (description pleas find below)
Notes
Main function for the simulation of cwEPR in different motional regimes (isotropic, fastmotion and solid state) All spectra are simulated as field sweep spectra.
Isotropic/fastmotion For the fastmotion regime/isotropic limit, the program solves the implicit BreitRabi formula [1] in a fixedpoint iteration. Anisotropic linebroadening effects in the fastmotion regime are calculated via the Kivelson formula [2]. Currently, Euler angles between tensors are ignored by the algorithm! All tensors (only relevant for fastmotion) need to be in their principal axis system and colinear to each other.
Solidstate In the solidstate regime, the program uses a full matrix diagonalization algorithm. Therefore, only spin systems with a Hilbert space dimension of dim(H) < 512 can be calculated. The powder average is partially generated by interpolation of eigenvalues and transition probabilitites (similar to [1]). The interpolation level is automatically set by the program. The solid state algorithm treats arbitrary spin systems as long as the Hilbert space dimension is within the threshold. Spinpolarization can be defined (withing the electronic sublevels) as zerofield populations. The program constructs (sparse) density matrices out of the zerofield eigenvectors, to efficiently calculate the population transformation from zero field to high field. Per default, the program calculates with thermal equilibrium. Nuclear quadrupolar couplings (for I > 0.5) are currently not implemented.
The warning codes are:
0: Everything is alright
1: Solidstate is not possible due to too large matrix dimension.
2: Fastmotion/iso is not possible due to S > 1/2.
The Parameter syntax was kept similar to the one used in EasySpin [1], to make it Optional Parameters (with their defaults):
Parameter  Default  Meaning 

mwFreq  9.6  microwave frequency in GHz 
A  None  Hyperfine couplings in MHz 
abund_threshold  0.0001  Threshold for isotope mixtures 
D  None  Zerofield splitting in MHz 
g  2.0023193  gtensor 
Harmonic  1  Harmonic of the spectrum 
J  None  Exchange coupling 
tcorr  None  Rotational correlation time in ns 
logtcorr  None  Decadic logarithm of tcorr 
lw  [0.1, 0.1]  Linewidths (Gaussian, Lorentzian) 
ModAmp  0  Modulation amplitude 
motion  ‘solid’  Motional regime 
mwPhase  0  Microwave phase offset 
n  1  Number of equivalent nuclei 
nKnots  12  Initial number of theta values 
Nucs  None  Isotope specification 
Points  1024  Number of points 
Range  [330, 360]  Magentic field range in mT 
S  0.5  Electron spin quantum number 
SNR  None  Signaltonoise ratio 
verbosity  True  Print output information 
weight  1  Weighting (for multiple species) 
gFrame  None  Euler angles for the g tensor 
AFrame  None  Euler angles for the A tensors 
DFrame  None  Euler angles for the D tensor 
Temperature  300  Experimental temperature 
Population  None  Zerofield populations 
LevelSelect  5e5  Threshold for level selection 
Examples
Simple example for the simulation of an isotropic nitroxide spectrum.
>>> import EPRsim.EPRsim as sim >>> P = sim.Parameters() >>> P.Range = [335 ,350] >>> P.mwFreq = 9.6 >>> P.g = 2.002 >>> P.A = 45.5 >>> P.Nucs = 'N' >>> P.lw = [0.2, 0.2] >>> P.motion = 'fast' >>> B0, spc, flag = sim.simulate(P)
Simple example for the simulation of an anisotropic nitroxide spectrum (only 14N) in the fastmotion regime.
>>> import EPRsim.EPRsim as sim >>> Ra = [335 ,350] >>> freq = 9.6 >>> g = [2.0083, 2.0061, 2.0022] >>> A = [12, 13, 110] >>> Nucs = '14N' >>> lw = [0.2, 0.2] >>> tcorr = 1e10 >>> motion = 'fast' >>> Param = sim.Parameters(Range=Ra, g=g, A=A, Nucs=Nucs, mwFreq=freq, lw=lw, tcorr=corr, motion=motion) >>> B0, spc, flag = sim.simulate(Param)
Simple example for the simulation of an anisotropic nitroxide spectrum (only 14N) in the solidstate regime.
>>> import EPRsim.EPRsim as sim >>> import EPRsim.Tools as tool >>> P = sim.Parameters() >>> P.Range = [335 ,350] >>> P.mwfreq = 9.6 >>> P.g = [2.0083, 2.0061, 2.0022] >>> P.A = [[12, 13, 110], [20, 30, 30]] >>> P.Nucs = '14N,H' >>> P.lw = [0.5, 0.2] >>> P.motion = 'solid' >>> B0, spc, flag = sim.simulate(P) >>> tool.plot(B0, spc)
Simple example for the simulation of an anisotropic nitroxide spectrum (only 14N) in the solidstate regime, coupled to an additional hydrogen nucleus.
>>> import EPRsim.EPRsim as sim >>> import EPRsim.Tools as tool >>> P = sim.Parameters() >>> P.Range = [335 ,350] >>> P.mwfreq = 9.6 >>> P.g = [2.0083, 2.0061, 2.0022] >>> P.A = [[12, 13, 110], [20, 30, 30]] >>> P.Nucs = '14N,H' >>> P.lw = [0.5, 0.2] >>> P.motion = 'solid' >>> B0, spc, flag = sim.simulate(P) >>> tool.plot(B0, spc)
Simple example for the simulation of two radical species.
>>> import EPRsim.EPRsim as sim >>> import EPRsim.Tools as tool >>> P = sim.Parameters() >>> P.Range = [335 ,350] >>> P.mwfreq = 9.6 >>> P.g = [2.0083, 2.0061, 2.0022] >>> P.A = [12, 13, 110] >>> P.Nucs = '14N' >>> P.lw = [0.5, 0.2] >>> P.motion = 'solid' >>> P2 = sim.Parameters() >>> P2.Range = [335 ,350] >>> P2.mwfreq = 9.6 >>> P2.g = 2.0003 >>> P2.lw = [0.3, 0.0] >>> P2.motion = 'solid' >>> P2.weight = 0.1 >>> B0, spc, flag = sim.simulate([P, P2]) >>> tool.plot(B0, spc)
Simple example for the simulation of a spinpolarized triplet spectrum.
>>> import EPRsim.EPRsim as sim >>> import EPRsim.Tools as tool >>> P = sim.Parameters() >>> P.S = 1 >>> P.Range = [130 ,450] >>> P.mwfreq = 9.6 >>> P.g = 2 >>> P.lw = [4, 1] >>> P.D = [1400, 20] >>> P.Population = [0.2, 0.3, 0.4] >>> P.Harmonic = 0 >>> B0, spc, flag = sim.simulate(P) >>> tool.plot(B0, spc)
Properties
EPRsim provides:
 Simulation for cwEPR spectra in the solidstate limit and fastmotion regime
 Flexible simualtion options
 Highlyoptimized performance of the simulation algorithm
 Various EPRdata processing function
 Opensource
Feedback
We are eager to hear about your experiences with GloPel. You can email me at stephan.rein@physchem.unifreiburg.de.
References
[1] : S. Stoll, A. Schweiger, J. Magn. Reson., 2006, 178, 4255
[2] : N. M. Atherton, Principles of Electron Spin Resonance, 1993
Acknowledgement
A number of people have helped shaping EPRsim and the ideas behind. First and foremost, Prof. Dr. Stefan Weber and Dr. Sylwia Kacprzak (now Bruker Biospin) were for years the driving force behind EPRsim.
Project details
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size  File type  Python version  Upload date  Hashes 

Filename, size EPRsim0.0.4.dev0py3noneany.whl (75.4 kB)  File type Wheel  Python version py3  Upload date  Hashes View hashes 
Filename, size EPRsim0.0.4.dev0.tar.gz (58.5 kB)  File type Source  Python version None  Upload date  Hashes View hashes 
Hashes for EPRsim0.0.4.dev0py3noneany.whl
Algorithm  Hash digest  

SHA256  fed98ccc6e0b069abd0cfb88f12f9bcba2425112b3cac97e331498e12fd1bc31 

MD5  1652b95225a6a1d695fc1712754d667a 

BLAKE2256  aa5cb3d25cdf895e068019592a7794539579581125262d1b9b2290447776eb46 