Math
The Hamiltonian we are using for the NMR systems is of the form
where are the gyromagnetic factors and the chemical shifts of nuclear spin . denotes the coupling between spins and and , where are the usual spin operators ().
Note in the following, whenever we denote a spin operator as without an additional site index, we mean the sum over the individual spin operators for each nuclear spin .
Within NMR we have a strong magnetic field in the -direction, and electromagnetic pulses / oscillating fields are applied to flip the spins into the -plane. is typically of the order of 500 Mhz, the bandwidth of the pulses is about 10 kHz, and the required resolution is less than 1 Hz.
The spectrum measured in an NMR experiment corresponds to the spectral function calculated in the HQS NMR Tool.
Calculation of the spectrum
Time domain
To discuss how to calculate a NMR spectrum let us first elaborate on how it is obtained experimentally. For this, after a probe has been placed inside a NMR spectrometer a strong magnetic field is applied along the -axis, which leads to a net magnetization along the same axis. Note that at room temperature this magnetization is typically quite small. One then applies a -pulse along the -axis which flips the magnetization to the minus -direction. The spins then start to precess in the -plane, which creates a signal that can be recorded by measuring the magnetic field along the - or -axis.
Therefore, to calculate the spectrum, we simply have to calculate the time-dependent expectation value along the - or -direction. Here we will only consider the field along the -direction. The time-dependent expectation value can be calculated using the density matrix and the full spin operator
This implies that we need to find an expression for the time evolution of the density matrix, which is described by the Liouville-von-Neumann equation
In the following we will assume a Hamiltonian in units of radians per second, which allows us to drop the factor. Therefore the time evolution can be written as
Note that is the Hamiltonian of the process taking place within the time interval . Therefore we have to perform two time evolutions: We start with the density matrix at some time and perform a time evolution using the Hamiltonian associated with the pulse. Then we perform a second time evolution using the NMR Hamiltonian, describing the precession of the spins in the -plane.
Due to the setup of the experiment we can assume a hard (or instantaneous) pulse, meaning we will not be interested in the explicit time evolution during the pulse and can therefore write the time evolution operator of the pulse as
This leads to the following density matrix after the pulse
where is the time duration of the pulse. Performing the second time evolution under the NMR Hamiltonian we arrive at
We now just have to define the density matrix at time . Due to the experimental setup it is simply given via the Boltzmann distribution
with the inverse temperature , where is the Boltzmann constant and the temperature, as well as the partition function .
While HQS NMR tool provides a solver that evaluates a spectrum using the full density matrix, one should note that for typical NMR experiments it is sufficient to approximate it using a series expansion
In the second approximation applied here, the first term with the identity can be dropped as it does not contribute to the overall expectation value and the second term is approximated with . This is valid as the contribution from the J-coupling term to the distribution is insignificant compared to that of the magnetic field term.
Note that in the NMR literature this step is often skipped and sometimes even is called a density matrix. This is technically incorrect, as is not positive semi-definite, a key requirement for a density matrix. Furthermore, the prefactor is often omitted, as it only serves as normalization.
However, with this approximation one can now further simplify the calculation using the identity
which in our case of a -pulse reduces to
This leads us to the final expression for the expectation value
Frequency domain
Up to now we have only discussed how to calculate the time signal, however what we are actually interested in is the spectrum given by its Fourier transform. Most implementations therefore first calculate a time evolution according to the derivation performed above and then do a Fourier transform of the result. However, as will be explained in the next section, it is much more efficient to do the Fourier transform analytically first and then perform all calculations in the frequency domain. To be able to do this, we have to rewrite the above formulation into a Lehmann representation using sums over the eigenbasis.
By introducing a small convergence aiding factor we can now do the Fourier transform.
This represents the final form we are evaluating. Note that the factor leads to a broadening of the peaks, giving them generally the shape of a Lorentzian. This broadening has to be chosen to fit the expected resolution, as discussed in the next section.
Energy rediscretization
One problem that arises in NMR is that the peaks are usually very sharp. Therefore, performing calculations in time domain typically requires a lot of time steps, that have to be evaluated. Also in the frequency domain, discretizing the frequency axis with a very fine grid would be computationally ineffective. Therefore, we perform several rounds of computing the spectral function. We start with a linear grid in frequency space and a rather large artificial broadening . Then we iteratively rediscretize the frequency space in equal weight partitions of the total spectral function while reducing in each step until we reach the desired broadening. In this way, we obtain a non-linear adaptive grid with accumulation points at the spectral function peaks.