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 the are the usual spin operators with .

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.

Measurement of a 1D NMR spectrum

A 1D NMR spectrum can be obtained using a pulse-acquire experiment. To discuss how to calculate it we will first elaborate on how the experiment is performed. 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. The induced magnetic field is directly linked to the Magnetization of the sample as

which in turn can be linked to the magnetic moment

where the integral goes over the volume of the sample and we are assuming a uniform magnetization within the sample to evaluate the integral. At the same time, the magnetic moment of an individual molecule is given as

Therefore, to calculate the spectrum, we simply have to calculate the time-dependent expectation value of the nuclear spin operators of each spin along the - or -direction and scale them with the corresponding gyromagnetic ratio. Note that in the actual implementation we perform the calculation using the dimensionless nuclear spin operator, so we explicitly calculate

The sum of these contributions is directly proportional to the measured magnetic field. However, to obtain the absolute measured magnetic field, an additional scaling is required. This is left to the user, as within HQS NMR Tool we do not have information on the sample volume and concentration of the molecule. Often though, this scaling is unnecessary as one is not interested in absolute values. So in HQS NMR Tool the spectrum is by default normalized to integrate to the number of relevant spins, i.e., to those of the same isotope type as the reference isotope.

Calculation of the spectrum

Time domain

Let us now discuss, how to evaluate these expectation values. For this we will only consider the field along the -direction. The time-dependent expectation value can be calculated using the density matrix

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 this formulation the equation assumes a Hamiltonian in units of Joule, however the Hamiltonian as defined above is 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 . Note that the factor is necessary, as the Hamiltonian is given in units of radians per second.

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 in the following calculations as it does not contribute to the overall expectation value and the second term is approximated with the magnetic field term of the Hamiltonian. This is valid as the contribution from the J-coupling term to the distribution is insignificant in comparison.

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 although for the spectrum we are measuring in NMR typically just the real part is required. However for some postprocessing routines also the imaginary part is required, in which case we will refer to this as a Green's function.

Additionally, 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.