Solid-state (powder) spectra#
pepper simulates CW EPR spectra of solids: powders and
frozen solutions (averaged over all orientations), or single crystals. It
diagonalizes the full spin Hamiltonian, so it handles any number of electron
and nuclear spins, zero-field splittings, and large hyperfine couplings.
A first spectrum#
A Cu(II) complex at X-band, with g and copper hyperfine strain broadening:
>>> from torchspin import SpinSystem, Experiment, pepper
>>> cu = SpinSystem(S=0.5, g=[2.05, 2.05, 2.25], Nucs='63Cu',
... A=[50, 50, 520], HStrain=[60, 60, 90])
>>> exp = Experiment(mwFreq=9.5, Range=[260, 360], nPoints=1024)
>>> B, spc = pepper(cu, exp)
>>> B.shape, spc.shape
(torch.Size([1024]), torch.Size([1024]))
>>> float(B[0]), float(B[-1])
(260.0, 360.0)
B is the field axis in mT and spc the first-derivative spectrum
(Harmonic=1 is the default), both torch tensors; call .numpy() to plot
them with matplotlib.
Line widths#
lw = [GaussianFWHM, LorentzianFWHM](mT) convolves the whole spectrum.HStrain(MHz, one value per principal axis) gives every transition an orientation-dependent Gaussian width;gStrain,AStrainandDStrainmodel distributions of g, A and D.
Common variations#
To get |
Do this |
|---|---|
absorption instead of the derivative |
|
a frequency-swept spectrum |
|
thermal populations (high-spin systems at low temperature) |
|
a mixture of species |
|
a single crystal |
|
natural-abundance isotopes |
|
a faster, approximate simulation of many ligand nuclei |
|
>>> sys_b = SpinSystem(S=0.5, g=2.003, lw=[1.0, 0.0], weight=0.3)
>>> B, spc = pepper([cu, sys_b], exp)
>>> spc.shape
torch.Size([1024])
Second-order perturbation theory ('perturb') is inaccurate when a hyperfine
coupling is a sizable fraction of the microwave frequency; the
pitfalls page has the numbers. The default 'matrix' is
exact.
Check the orientation grid#
The default grid is not always fine enough for narrow lines on large
anisotropic couplings. grid_convergence tells you.
See also: the pepper API page for every argument, the quickstart tutorial and the pepper playground.