.. _numerical-spectra: ===================== Numerical EPR spectra ===================== A simulation turns the parameters of the :ref:`spin Hamiltonian ` back into an observable in two stages. It first locates every resonance and assigns it an intensity and a width. It then lays a line shape over each resonance and sums the result. EPRoducer uses the MATLAB package `EasySpin `_ [Stoll2006]_, which implements both steps of the reconstruction. Liquids and solids ================== EasySpin computes spectra in two different ways, depending on whether the radicals tumble freely in a liquid or stay fixed in a solid [Stoll2006]_. * **Liquids.** In a liquid of low viscosity, fast rotation averages out the anisotropic parts of :math:`\mathbf{g}` and :math:`\mathbf{A}^A`, leaving only their isotropic values. For :math:`S = 1/2`, the resonance condition then reduces to :math:`h\nu = g\mu_\mathrm{B} B`, where :math:`\nu` is the microwave frequency and :math:`B = |\mathbf{B}|` the magnitude of the field. The hyperfine coupling to :math:`n` equivalent nuclei of spin :math:`I` splits the line into :math:`2nI+1` components [Atherton1993]_. Analytical expressions for the energy levels then give every resonance field directly, while the residual anisotropy only modulates the line widths through the rotational correlation time [Freed1963]_ [Stoll2006]_. * **Solids.** In a solid, every radical keeps its orientation, the full tensors of the :ref:`spin Hamiltonian ` enter the calculation, and the spectrum becomes a superposition over all orientations, each of which requires a numerical diagonalization of the spin Hamiltonian. This solid-state route is exact for any magnitude of the hyperfine coupling, but far slower [Stoll2006]_. The samples that motivate EPRoducer are polymers and tissues broken with mechanical stress at low temperature. Their radicals cannot rotate freely, and EPRoducer therefore simulates all spectra with the solid-state method (EasySpin's :code:`pepper`). The rest of this page describes this case. .. _resonance-fields: Resonance fields and intensities ================================ EasySpin builds a solid-state spectrum in three steps. It finds the fields at which each orientation of the radical absorbs, it weights each of these resonances by an intensity, and it averages the result over all orientations. Stoll and Schweiger describe each step in detail [Stoll2006]_, and Stoll gives an accessible overview of the whole procedure [Stoll2015]_. Here, we summarize only the main ideas. Resonance fields ---------------- The resonance fields follow from the energy levels of the spin Hamiltonian as a function of the field. For a field of fixed direction :math:`\mathbf{n} = \mathbf{B}/B`, the spin Hamiltonian splits into a field-independent part :math:`\hat{H}_0`, which contains the hyperfine and quadrupole terms, and a part linear in :math:`B`, :math:`\hat{H}_{\mathrm{SH}}(B) = \hat{H}_0 + B\,\hat{H}_1`, where .. math:: \hat{H}_1 = \mu_\mathrm{B}\,\mathbf{n}\,\mathbf{g}\,\hat{\mathbf{S}} + \mu_\mathrm{N} \sum_A \mathbf{n}\,\mathbf{g}_\mathrm{N}^A\,\hat{\mathbf{I}}^A collects the Zeeman terms. A transition between two eigenstates :math:`|\varphi_u\rangle` and :math:`|\varphi_v\rangle` absorbs when its energy :math:`E_v - E_u` matches the microwave quantum :math:`h\nu`. In a field-swept experiment, this condition defines the resonance fields only implicitly, which allows a pair of states to have no resonance field, one, or several. For the latter case, EasySpin maps the energy levels over the whole field range of the experiment. It diagonalizes :math:`\hat{H}_{\mathrm{SH}}` at a few fields and obtains the slope of each level from the Hellmann-Feynman theorem, .. math:: :label: hellmann-feynman \frac{\partial E_u}{\partial B} = \left\langle \varphi_u \left| \frac{\partial \hat{H}_{\mathrm{SH}}}{\partial B} \right| \varphi_u \right\rangle = \langle \varphi_u | \hat{H}_1 | \varphi_u \rangle , which states that the slope of a level equals the expectation value of the Zeeman part of the Hamiltonian in that state. With energies and slopes at both ends of a field interval, a cubic polynomial describes each level inside it. EasySpin halves every interval in which this polynomial disagrees with an exact diagonalization at the centre. As a result, the intervals concentrate where levels approach each other. The roots of the final polynomials then give all resonance fields in the range [Stoll2003]_. Intensities ----------- Three factors set the intensity of each resonance [Stoll2006]_: #. The **transition rate** measures how strongly the microwave field couples the two states, and it depends on the orientation of that field. #. The **polarization factor** is the population difference between the two states, which EasySpin takes from the exact Boltzmann distribution rather than from its high-temperature limit. That distinction matters below about 10 K or above 95 GHz, and thus in G-band experiments. #. The **frequency-to-field conversion factor**, .. math:: :label: freq-to-field c_{uv} = \left| \frac{\partial \Delta E_{uv}}{\partial B} \right|^{-1} = \frac{1}{\left| \langle \varphi_v | \hat{H}_1 | \varphi_v \rangle - \langle \varphi_u | \hat{H}_1 | \varphi_u \rangle \right|} , where :math:`\Delta E_{uv} = E_v - E_u` is the transition energy. It converts a line from the frequency axis to the field axis that the experiment sweeps. A transition whose energy changes slowly with the field stays close to resonance over a wider field interval, and its line consequently spreads over more millitesla. The second equality follows directly from Eq. :eq:`hellmann-feynman`, and for :math:`S = 1/2` the factor reduces to the :math:`1/g` intensity factor of field-swept powder spectra [Aasa1975]_. Powder average -------------- The powder average sums the contributions of all orientations, and EasySpin performs it on a grid of field directions. It restricts the grid to the part of the unit sphere that the symmetry of the spin Hamiltonian leaves unique, such as one octant for an orthorhombic :math:`S = 1/2` system, and covers that region with a triangular grid of orientations, the knots [Stoll2006]_ [Ponti1999]_. It computes resonance fields, intensities and widths at the knots and interpolates them with splines onto a grid ten to a hundred times finer. Two geometric constructions then turn these values into a spectrum. The Voronoi cell of a knot is the region of the sphere closer to that knot than to any other [Voronoi1908]_, and its area measures the fraction of radicals that the knot represents. A sum of the lines of all knots, weighted by these areas, gives the simplest powder spectrum, but it leaves ripples, the so-called simulation noise, wherever the grid is too coarse. EasySpin avoids that noise with the Delaunay triangulation, the geometric counterpart of the Voronoi cells, which joins neighbouring knots into small spherical triangles [Aurenhammer1991]_. Within one triangle, the resonance field varies almost linearly with the orientation. All orientations inside it therefore produce an analytically known triangular subspectrum, whose area grows with the area of the triangle and with the mean intensity at its corners [Alderman1986]_. EasySpin approximates each broadened subspectrum by a single Gaussian, centred at the mean of the three corner fields, with the width .. math:: :label: projection-width \tilde{\Gamma} = \Gamma_{\mathrm{tot}} \left( 1 + \frac{0.154}{\Gamma_{\mathrm{rel}}^2} \right) , \qquad \Gamma_{\mathrm{rel}} = \frac{\Gamma_{\mathrm{tot}}}{\Delta B} , where :math:`\Gamma_{\mathrm{tot}}` is the total line width (see :ref:`line-broadening`) and :math:`\Delta B` the field range that the corners of the triangle span. A triangle whose field range is much narrower than the line (:math:`\Gamma_{\mathrm{rel}} \gg 1`) therefore contributes a Gaussian of the plain line width, whereas a wide triangle broadens its Gaussian to cover its field range. The relative broadening :math:`\Gamma_{\mathrm{rel}}` thus also measures the quality of the grid [Stoll2006]_: * smallest :math:`\Gamma_{\mathrm{rel}} < 0.5`: the spectrum shows simulation noise, * :math:`\Gamma_{\mathrm{rel}} \approx 1`: smooth spectrum, * :math:`\Gamma_{\mathrm{rel}} > 2`: needlessly fine grid. .. _line-broadening: Line broadening and detection ============================= Each resonance line has a finite width, which EasySpin builds from the broadening mechanisms of the sample [Stoll2006]_. Unresolved hyperfine couplings to the many surrounding nuclei and weak interactions between distant paramagnetic centres enter as a residual width :math:`\Gamma_{\mathrm{res}}`. In addition, small differences in the local environment, the so-called strains, give each radical slightly different magnetic parameters. A narrow Gaussian distribution of a parameter :math:`p` with standard deviation :math:`\sigma_p` adds the width :math:`\Gamma_p = \sigma_p\,|\partial \Delta E_{uv}/\partial p|`, the spread of the parameter times the sensitivity of the transition energy to it [Hagen1985]_. Independent contributions add in quadrature, .. math:: :label: width-sum \Gamma_{\mathrm{tot}}^2 = \Gamma_{\mathrm{res}}^2 + \sum_p \Gamma_p^2 , so the largest contribution dominates the total width. EasySpin can apply one width to all lines and orientations or broaden each line according to its orientation, and the first option suits :math:`S = 1/2` systems with small :math:`g` anisotropy, which is precisely the case of organic radicals [Stoll2006]_. The line shape can be a Gaussian, a Lorentzian or their convolution, the Voigt profile [Stoll2006]_. The last step adapts the simulated absorption spectrum to the way a continuous-wave spectrometer detects it. The spectrometer modulates the field and records a harmonic of the absorption, in practice mostly the first harmonic, which approximates the first derivative [Atherton1993]_. EasySpin either differentiates the absorption spectrum or applies pseudo-modulation, which also reproduces the broadening that a finite modulation amplitude causes [Stoll2006]_. .. admonition:: In EPRoducer :ref:`extract_EPRspec ` (parameters from an ORCA output) and :ref:`spectrum_from_gval ` (parameters given by hand) write the EasySpin input and call :code:`pepper`. Their flags map onto the quantities of this page: * :code:`-m`: microwave frequency :math:`\nu` in GHz (179.813 GHz by default, i.e. G-band). * :code:`-e`: experimental spectrum, whose field values set the field range of the simulation; :code:`-n` sets the number of points (401 by default). * :code:`-l`: peak-to-peak line width :math:`\Gamma_{\mathrm{tot}}` in mT, shared by all lines and orientations (1 mT by default). * :code:`-t`: harmonic, 0 for the absorption (default), 1 for the first derivative and 2 for the second derivative. * :code:`-a`: modulation amplitude in mT, which activates pseudo-modulation. * :code:`-f` (extract_EPRspec): keep the hyperfine couplings of the ORCA output. Without it, only the :math:`g` tensor enters the simulation. * :code:`-d` (extract_EPRspec): add a constant shift to the three principal :math:`g` values, e.g. to test effects that the DFT calculation does not include. .. _g-anisotropy: Reading the g anisotropy from powder spectra ============================================ A simple heuristic argument, which requires no simulation, already reads the three principal values of :math:`\mathbf{g}` from a powder spectrum, because each of them leaves a distinct mark on its shape. A radical with principal values :math:`g_1 > g_2 > g_3` resonates, for every orientation, at a field between the extremes :math:`B_i = h\nu/(g_i\mu_\mathrm{B})`, with :math:`i = 1, 2, 3`. * The largest :math:`g` value sets the low-field end of the powder spectrum and the smallest one its high-field end. Since only one orientation reaches each extreme, the absorption spectrum ends there in a step. * The middle value, in contrast, belongs to a whole family of orientations, which pile up at :math:`B_2` and produce the maximum of the spectrum [Atherton1993]_. The resonance condition alone fixes the positions of the two shoulders relative to that maximum, .. math:: :label: g-shoulders B_2 - B_1 = B_2\,\frac{g_1 - g_2}{g_1} , \qquad B_3 - B_2 = B_2\,\frac{g_2 - g_3}{g_3} , which makes the left shoulder depend only on the difference between the largest and the middle :math:`g` value, and the right shoulder only on the difference between the middle and the smallest one. .. figure:: figures/gval_differences.png :width: 100% :align: center Effect of the :math:`g` anisotropy on powder EPR spectra. Simulated absorption spectra of an immobilized :math:`S = 1/2` radical with principal values :math:`\mathbf{g} = [2.0052 + i,\ 2.0052,\ 2.0052 - j]`. The columns vary :math:`i`, the difference between the largest and the middle :math:`g` value, and the rows vary :math:`j`, the difference between the middle and the smallest one, both from 0 to 0.0088. The maximum stays at the resonance field of the middle value, while :math:`i` sets the position of the left (low-field) shoulder and :math:`j` that of the right (high-field) shoulder. The figure illustrates this separation with simulated spectra in which :math:`g_2 = 2.0052` stays fixed while :math:`g_1 = g_2 + i` and :math:`g_3 = g_2 - j` vary independently. A larger :math:`i` moves the left shoulder away from the maximum and leaves the right one in place, whereas a larger :math:`j` does the opposite. Near 6.4 T, the field range of the figure (G-band), a difference of 0.0088 already displaces a shoulder by about 28 mT. The shoulders also change their height. The closer an extreme value lies to the middle one, the narrower the field range over which its orientations spread and the higher its shoulder rises, until the shoulder merges into the maximum once both values coincide and the spectrum becomes axial. A fit of a powder spectrum therefore determines the two differences :math:`g_1 - g_2` and :math:`g_2 - g_3` independently from the two shoulders, while the position of the maximum fixes :math:`g_2` itself. .. tip:: Spectra like the ones of the figure can be produced with :ref:`spectrum_from_gval `, e.g. .. code-block:: bash $(eproducer spectrum_from_gval -path) -g '[ 2.0096 2.0052 2.0030 ]' -e experiment.dat Together, the spin-Hamiltonian parameters and the simulation settings of this page determine a simulated spectrum completely. The :doc:`decomposition of EPRoducer ` combines spectra simulated within this framework.