Illustrating Elementary NMR Concepts Through Simple Interactive

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

pubs.acs.

org/jchemeduc Article

Illustrating Elementary NMR Concepts through Simple Interactive


Python Programs
Ishita Sengupta*
Cite This: J. Chem. Educ. 2021, 98, 1673−1680 Read Online

ACCESS Metrics & More Article Recommendations *


sı Supporting Information
See https://pubs.acs.org/sharingguidelines for options on how to legitimately share published articles.
Downloaded via UNIV OF SAO PAULO on September 11, 2021 at 04:35:15 (UTC).

ABSTRACT: Introducing elementary concepts of nuclear magnetic resonance spectroscopy (NMR) to a beginner can be
challenging. Using an interactive graphical platform can greatly aid in demonstrating key concepts in such cases. This paper aims to
bridge this gap in teaching basic NMR spectroscopy through simple standalone interactive Python programs or a Jupyter notebook,
supplementing traditional theoretical approaches. These scripts allow the beginner with basic knowledge of quantum mechanics to
grasp important concepts like precession, nutation, laboratory and rotating frames, on- and off-resonance RF-pulses through user
input, and graphical and terminal output of results.
KEYWORDS: Upper-Division Undergraduate, Graduate Education/Research, Physical Chemistry, Computer-Based Learning,
NMR Spectroscopy

T he introduction of elementary NMR concepts to senior


undergraduate and first-year graduate students, with
experience in introductory quantum mechanics, has traditionally
I present a set of interactive Python programs to introduce the
concepts of precession, nutation, and rotating-frame approx-
imation and to visualize the effect of on- and off-resonance RF-
been through theoretical approaches. A number of excellent pulses of varying phases, offsets, and durations on an isolated
textbooks focusing on theoretical aspects of NMR spectroscopy spin 1/2 system, ignoring the effects of relaxation and coupling.
are available.1−3 In addition, many software programs for Users can change relevant parameters and observe their effects
calculating and visualizing spin dynamics for complicated pulse on spin dynamics as graphical outputs. A preliminary knowledge
sequences and some educational NMR software4 have also been of quantum mechanics, especially the time-dependent Schrö-
developed.5−9 However, these are most useful for advanced dinger equation, is assumed. All operators are expressed in the
researchers in the field and/or those who have a good handle on matrix representation, and ℏ is set equal to 1 for convenience in
the programming language; in addition, they are expensive and/ all calculations. A brief mathematical background for each
or noninteractive. Physical chemistry laboratory and computa- section is provided in the Supporting Information. Importantly,
tional exercises describing the fundamental aspects of pulsed while these scripts supplement the traditional theoretical
NMR10,11 and detection,12,13 computation of NMR spectra and approaches of introducing these concepts, they cannot replace
parameters,14−16 study of conformational equilibria,17 and them in entirety.
theoretical aspects of product operator formalism,18 the vector
approach,19 and multidimensional NMR,20 etc., have been
successfully implemented in the undergraduate/graduate Received: July 28, 2020
curriculum. Revised: March 14, 2021
For a beginner, visualizing spin dynamics in the presence of an Published: March 31, 2021
external magnetic field and/or RF-pulses can often be
challenging. An interactive platform with minimal programming
knowledge can be beneficial to such students. With this in mind,
© 2021 American Chemical Society and
Division of Chemical Education, Inc. https://doi.org/10.1021/acs.jchemed.0c01008
1673 J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

π π π π π π π π
Figure 1. Isolated spin 1/2 in any arbitrary orientation: (A) | 0, 0⟩, (B) |π, 0⟩, (C) 2 , 0 , (D) 2 , , (E) π , , (F) |0, π⟩, (G) 2 , , and (H) 4 , .


2 2 4 4

SPIN-STATES AND SPIN ANGULAR MOMENTUM (Figure 1) and calculates the spin-state (eq 1) (Figure S1). Here,
OPERATORS I demonstrate how different combinations of θ and φ result in
In NMR, the nuclear spin angular momentum is manipulated by different orientations of an isolated spin 1/2.22
short weak radiofrequency (RF) pulses BRF and delays, in the The take home message: The |0, 0⟩ and |π, 0⟩ states are the |α⟩
presence of an external strong magnetic field B0, to produce a and |β⟩ states, respectively. All other spin-states can be expressed
detectable signal, which is modulated by the local environment as a linear combination of the |α⟩ and |β⟩ states (see later). A
around the spin. From careful analysis of the signal, information spin oriented in the same direction can correspond to different
about the structure and dynamics of the molecule can be values of (θ, φ). For example, spin-states |0, 0⟩ (Figure 1A) and |
extracted. In this paper, preliminary NMR concepts will be 0, π⟩ (Figure 1F) point along the +z-direction, whereas spin-
π
described for an isolated spin 1/2, ignoring the effects of states |π, 0⟩ (Figure 1B) and π , 2
(Figure 1E) point along the
relaxation. −z-direction, respectively. It should be noted that the arrowhead
Spin-States is rotated by different angles in Figure 1A,F or Figure 1B,E,
An isolated spin 1/2 (or its nuclear spin angular momentum) respectively, corresponding to the different values of φ. In
pointing in any arbitrary direction can be represented in π π π
contrast, spin-states 2 , 0 (Figure 1C), 2 , (Figure 1D), and
spherical coordinates by the ket |θ, φ⟩ where 2

ij cos θ yz
j 2 z
π π π π π

|θ , ϕ⟩ = jjjj zz
, (Figure 1G) are in the xy-plane with , 0 and ,

z
j sin θ e iϕ zz
2 4 2 2 2
pointing along the +x- and +y-direction, respectively. Students
k {
should vary θ,φ to generate spin-states with arbitrary
2 (1)
orientations (Figure 1H) and note if the coefficients are real
Here, θ is the angle which the spin makes with the +z-axis, and φ or imaginary.
is the angle which its projection makes with the +x-axis.21 (Here, Spin Angular Momentum
the direction of +x to +y to −x to −y is anticlockwise. A negative
θ value should be avoided as it changes the direction of The expectation or average values of the x-, y-, and z-
rotation.) components of the spin angular momentum of a given spin-
Some representative examples of an isolated spin 1/2 pointing state (Section S2 in Supporting Information) are calculated by
the program expectation-ang_mom.py. The user defines the

i1y
in specific directions are

|0, 0⟩ = jjj zzz


spin-state by specifying the values of θ and φ. The spin-state and

k0{
expectation values of Ix ,̂ Iy ,̂ and Iz ̂ are calculated and displayed

i0y
on the terminal/notebook.

|π , 0⟩ = jjj zzz
The take home message: Students should verify that a spin 1/

k1{
2 pointing along the ±x-, ±y-, and ±z-direction is an
eigenfunction of Ix ,̂ Iy ,̂ or Iz ̂ operators with an eigenvalue of
±0.5, respectively. Spin-states, oriented in any arbitrary
i yz
and

= jjj zz
π π

k 0.27 + 0.27i {
π π 0.92 direction, for, e.g., , (Figure 1H), are not eigenfunctions
, 4 4
4 4 of Ix ,̂ Iy ,̂ or Iz ̂ operators and have nonzero expectation values of
The program state.py takes as input (θ, φ) (in degrees) and the spin angular momentum ⟨Ix⟩ = 0.25, ⟨Iy⟩ = 0.25, and ⟨Iz⟩ =
outputs the direction of the nuclear spin angular momentum 0.35 along x-, y-, and z-directions, respectively (Figure S2). For
1674 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

i 0.71 zy i1y i0y


= jjj zz = 0.71jjj zzz + (0.71i)jjj zzz
k 0.71i { k0{ k1{
Table 1. Eigenfunctions and Eigenvalues of the of Ix ,̂ Iy ,̂ and Iz ̂ π π
,
Operators 2 2

Iz ̂ |α⟩ = = (0.71)|α⟩ + 0.71i)|β⟩

i zyz
1
Ix ̂ α±β =

= jjj
2

z
k {
Iz ̂ |β⟩ = Iy ̂
1
α±β = π π 0.97
2 ,

ij 1 yz i0y
6 6 +

= (0.97)jj zz + (0.22 + 0.13i)jjj zzz = (0.97)|α⟩


Ix ̂ |α⟩ = 1 0.22 0.13i
Iz ̂ α±β =

k0{ k1{
2

Ix ̂ |β⟩ = 1
Ix ̂ 2 α ± iβ =

Iy ̂ |α⟩ = Iy ̂
1
α ± iβ = + (0.22 + 0.13i)|β⟩
2

Iy ̂ |β⟩ = Iz ̂
1
α ± iβ = The take home message: The examples shown above are
2
superposition states of the |α⟩ and |β⟩ spin-states with
probabilities |C+|2 and |C−|2, respectively. The expectation
spin-states which are eigenfunctions of the Ix ,̂ Iy ,̂ or Iz ̂ operators, (average) value of the energy of a superposition state (which
the expectation values and eigenvalues are identical. Students is not an eigenvector of Ĥ ) is evaluated by calculating ⟨θ, φ|Ĥ |θ,
should also verify which spin-states are simultaneous eigenfunc- φ⟩ (eq S2). Students should verify that the average energy and
tions of the Ix ,̂ Iy ,̂ or Iz ̂ operators (Table 1). average z-component of the spin angular momentum ⟨θ, φ|Iẑ |θ,

■ ZEEMAN HAMILTONIAN AND SUPERPOSITION


STATES
φ⟩ of a superposition state are given by |C+|2E1 + |C−|2E2 and |
C+|2(0.5) + |C−|2(−0.5) where E1 and E2 are the energy
eigenvalues, and ±0.5 are the z-components of the spin angular
momentum corresponding to the |α⟩ and |β⟩ states, respectively
Zeeman Hamiltonian and Superposition States
(see previous section). Students should also check if any
|θ, φ⟩ can be expressed in the Zeeman basis as a linear superposition state of their choice is an eigenfunction of the spin
combination of the |α⟩ and |β⟩ spin-states. The program angular momentum operators, Ix ,̂ Iy ,̂ and Iz ̂ (Table 1).
coefficients.py takes θ, φ (in degrees) as input, calculates the
coefficients C+ and C−, and outputs the user defined spin-state in
the Zeeman basis (Section S3 and Figure S3).
For example
■ SPIN DYNAMICS
Precession

i 0.71 yz i1y i0y


= jjj zz = (0.71)jjj zzz + (0.71)jjj zzz
In the presence of an external magnetic field B0, a nuclear spin

k 0.71 { k0{ k1{


π undergoes precession about the B0 axis (z-axis) (Section S4 in
,0
2 SI). The program precession.py allows the user to specify the
initial state of the spin, the Larmor frequency, and the time
= (0.71)|α⟩ + 0.71)|β⟩ duration. It solves eq S4 to output the final polar coordinates of

π
Figure 2. (A−D) The initial state ψ(0), 2 , 0 (red arrow), precesses about the z-axis at a Larmor frequency 500 MHz for 0.25, 0.5, 0.75, and 1 ns to the
final state ψ(t) (orange arrow). (E−H) This is the same as in parts A−D except the Larmor frequency is 800 MHz. Note that, for the same time
intervals, the angle of rotation (ω0*t) for the spin is larger at 800 MHz compared to 500 MHz. Precession is equivalent to rotation about the z-axis.

1675 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

Figure 3. Rotation of spin-states: (A−C) The initial state |0, 0⟩ rotates by angle π about the axis defined by φp = 0 (x), π (y), and π (−x) resulting in the
2
final spin-states |π, 1.18π⟩, |π, 1.68π⟩ and states |π, 0.18π⟩, respectively. (D) The initial state |0, 0⟩ rotates by π about the axis defined by φp = 0 resulting
2
π 3π 3π 3 π
in the final state 2 , 2
. (E) The initial state |π, 0⟩ rotates by π about the axis defined by φp = 0 resulting in the final state 2
, 2 . (F) The initial state
2
π
2
, 0 rotates by π
about the axis defined by φp = 3π
resulting in the final state |0, 1.32π⟩.
2 2

the spin and graphically illustrates the initial and final spin-state. The take home message: The |α⟩ state converts to the |β⟩ state
Note that the time parameter here is just for the sake of and vice versa upon rotation by 180° about the ±x-/±y-axis
visualization. Since B0 is always “on” in an NMR experiment, (Figure 3A−C). In each case, the final state is |β⟩, but with a
precession about the z-axis continues indefinitely. However, for different value of φ′ (corresponding to a different orientation of
illustration purposes, precessions for different values of t have the orange arrowhead). Spin orientations can be manipulated by
been shown, to observe how the final spin-state changes during rotating about the appropriate axis and angle. For example, (i) a
precession (Figure 2). rotation by 90° about the x-axis brings the |α⟩ state to point
The take home message: This section emphasizes the relation along the −y-axis (Figure 3D) and the |β⟩ state to point along
among ω0, B0, γ, and ΔE between the |α⟩ and |β⟩ states for an the +y-axis (Figure 3E), and (ii) a rotation by 90° about the −y-
isolated spin 1/2. Students should calculate ω0 for an isolated axis converts a spin pointing initially along the +x-axis to convert
spin 1/2 with different γ values (corresponding to 1H, 13C, 15N, into the |α⟩ state (Figure 3F). The right-hand thumb rule can
19
F, 31P, etc.) and check for themselves how ΔE varies as a predict the final orientation of the spin after rotation and should
function of B0. The examples shown here are for an isolated 1H be verified with this program. Students should generate arbitrary
and illustrate the following: (1) The spin rotates through a larger spin-states (superposition states) by changing the angle and axis
angle in the same amount of time with an increase in Larmor of rotation of their choice.
frequency (Figure 2A−D versus Figure 2E−H). (2) By keeping Rotating-Frame Approximation
the Larmor frequency fixed and varying the time duration, the
angle of rotation can be varied (Figure 2A−D and Figure 2E− The rotating-frame approximation simplifies the mathematics
H). Most importantly, students should note that precession (involved in solving eq S4) in the presence of a static magnetic
pertains to rotation about the z-axis, i.e., the B0 direction. field B0 and an oscillating RF-pulse BRF. The program
rotating_frame.py calculates precession for a time duration
Rotation Operators
specified by the user at an offset Ω0, with ω0, ωref, and |θ, φ⟩
Experimentally, rotations of spin-states are realized by applying specified by the user (Figure 4, and Section S6 and Figure S6).
weak RF-pulses away from the direction of B0 and treating the Precession in the laboratory frame (see above, eq S4, Figure
problem in the rotating frame. Importantly, rotation can be 2) and precession in the rotating frame must be clearly
about any arbitrary axis and is fundamentally different from differentiated. For a spin with offset Ω0 = 0 Hz, there is no
precession, which is strictly about the z-axis. precession. For the same duration, spins with varying offsets
The program theta_phi.py takes an isolated spin 1/2 pointing rotate through different angles. This is equivalent to precession
in any arbitrary direction and operates Rφp(βp) on it (Section in the laboratory frame, but in the presence of a reduced B0. The
S5). The initial state |θ, φ⟩, βp, and φp are taken as inputs. The sign of the offset specifies the direction in which the spin rotates.
program outputs the initial and final state on the terminal/ For, e.g., a spin precessing at a Larmor frequency of 500 MHz in
console and graphically (Figure 3, and Section S5 and Figure the laboratory frame, this rotates by (i) an angle of 0° when the
S5). The program also outputs the polar coordinates of the final offset = 0 Hz (Figure 4A), (ii) an angle of 18° when the offset =
state |θ′, φ′ ⟩. 105 Hz (Figure 4B), (iii) an angle of 180° when the offset = 106
1676 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

π
Figure 4. Precession in the rotating frame. The initial state 2 , 0 undergoes precession at ω0 = 500 MHz for 500 ns with (A) ωref = 500 MHz (Ω0 = 0
Hz), (B) ωref = 499.9 MHz (Ω0 = 1 × 105 Hz), (C) ωref = 499.0 MHz (Ω0 = 1 × 106 Hz), and (D) ωref = 500.1 MHz (Ω0 = −1 × 105 Hz) where ωref =
rotating-frame frequency and Ω0 = offset. Note the opposite direction of the final spin-state in the cases of examples B and D with offsets of equal
magnitude but opposite signs.

Figure 5. Graphical representation of an RF-pulse in the laboratory frame, with (A) ω1 = 2000 Hz, ωp = 50 MHz, and φp = 0 (x-pulse); (B) ω1 = 2000
Hz, ωp = 200 MHz, and φp = π (y-pulse); and (C) ω1 = 2000 Hz, ωp = 500 MHz, and φp = π . For an on-resonance pulse, ωp = ω0. The green asterisk
2 3
indicates the phase of the pulse, and the blue and red solid lines denote the x- and y-components of the oscillating RF field (shown as a gray solid line).

Hz (Figure 4C), and (iv) an angle of −18° when the offset = spin only experiences the effect of the weak static RF-pulse
−105 Hz (Figure 4D) in 500 ns. applied away from the z-axis and rotates about its axis in the
The take home message: A spin with Larmor frequency ω0 rotating frame. Students should change the phase, amplitude,
equal to the rotating-frame frequency ωref has an offset Ω0 = 0 and frequency of the pulse and note how BRF changes with these
Hz. A difference in ω0 and ωref results in a positive or negative parameters.
value of Ω0. Opposite signs of Ω0 correspond to the opposite Rotation in the Presence of On-Resonance RF-Pulses in the
directions of precession in the rotating frame (Figure 4B,D). In Laboratory Frame (Nutation)
the presence of the same external magnetic field B0, two spins In the presence of B0 and BRF, the spin precesses fast about the z-
with identical γ values can have different magnitudes and signs of axis and slowly about the axis along which the pulse is applied.
offsets (corresponding to different ω0) modulated by the local The program nutation.py evaluates eq S10 with initial |θ, φ⟩,
electronic environment around the spin. Students should realize Larmor frequency (ω0), rotating-frame frequency (ωref),
that, in an actual sample, more than one spin is present, with amplitude of the pulse in Hz (ω1), and time (tp) specified by
different offsets. They should compare precession in the the user and outputs the nutation trajectory graphically (Figure
laboratory and rotating frames for spins with different offsets 6 and Figure S8) and the final state on the terminal/notebook. In
and/or time durations. each case, the initial and final states are identical (i.e., the flip
RF-Pulses angles and phase of the pulses are kept constant), but the
nutation trajectories depend on the Larmor frequency (ω0)
By applying weak oscillating radiofrequency fields away from the (Figure 6A−C), the amplitude of the pulse (ω1) in Hz (Figure
z-axis, the spin can be rotated to different extents about different 6D,E), or both (Figure 6F).
axes. The RF-pulse.py program graphically illustrates the RF- The take home message: The flip angle of the pulse
pulse, its x- and y-components, and the phase in the laboratory determines the angle of rotation of the spin. However, both
frame. The user can interactively change all four parameters of the Larmor frequency (external magnetic field) and amplitude of
the pulse (Figure 5, and Section S7 and Figure S7). In Figure 5, the pulse (in Hz) determine the spin dynamics in the laboratory
the amplitude of the pulse, B1, is kept fixed at 2000 Hz frame. Students should compare the nutation trajectories in the
(expressed in terms of ω1), whereas the phase and frequency are presence of an offset (i.e., by setting ωref ≠ ω0) (off-resonance)
set at 0 and 50 MHz (Figure 5A), π and 200 MHz (Figure 5B), (Figure S8) with a trajectory when offset = 0 Hz (on-resonance)
2
and π
and 500 MHz (Figure 5C), respectively. (Figure 6).
3
The take home message: In the rotating frame, if the Rotation in the Presence of On-Resonance RF-Pulses in the
Rotating Frame
frequency of the oscillating component of the RF-pulse (ωp) is
set equal to the rotating-frame frequency (ωref) and the Larmor The effect of an on-resonance RF-pulse in the rotating frame (ω0
frequency (ω0), then the oscillating RF-pulse becomes a static = ωref = ωp) is to rotate a spin through a flip angle = ω1*τp around
“on-resonance” RF-pulse. So, when both static magnetic field the axis of the pulse. Since the problem is set in the rotating
and oscillating RF-pulse are present and ωref = ωp = ω0, then the frame, and the rotating-frame frequency is set equal to the
1677 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

Figure 6. Nutation of an isolated spin 1/2 during a π x-pulse for different values of ω0 and ω1 (A) ω0 = 250 MHz, ω1 = 500 Hz, t = 0.0005 s; (B) ω0 =
2
500 MHz, ω1 = 500 Hz, t = 0.0005 s; (C) ω0 = 1000 MHz, ω1 = 500 Hz, t = 0.0005 s; (D) ω0 = 600 MHz, ω1 = 250 Hz, t = 0.001 s; (E) ω0 = 600 MHz,
ω1 = 500 Hz, t = 0.0005 s; (F) ω0 = 1000 MHz, ω1 = 250 Hz, t = 0.001 s. All the pulses are on-resonance, i.e., ωp = ω0 = ωref. The blue and orange circles
denote the starting and end spin-state, respectively. A π x-pulse rotates +z-magnetization to the −y-direction.
2

Figure 7. Rotating-frame on-resonance pulses. On-resonance (A) π x-pulse (φp = 0, ω0 = ωref = ωp, ω1 = 1000 Hz, tp = 0.00025 s) rotates initial state |0,
2
π
0⟩, (B) π y-pulse (φp = π , ω0 = ωref = ωp, ω1 = 1000 Hz, tp = 0.0005 s) rotates initial state 2 , 0 , and (C) π x-pulse (φp = 0, ω0 = ωref = ωp, ω1 = 1000 Hz,
2 2
π 3π
tp = 0.00025 s) rotates initial state 2 , 2
. The initial and final states are denoted by red and orange arrows, respectively, and the rotation trajectory is
denoted by the black solid line.

Larmor frequency (offset = 0 Hz), precession about the z-axis is also verify that, in the rotating frame, in the presence of an on-
effectively absent. Typically, RF-pulses are applied along the x-, resonance pulse, the magnitude of the Larmor frequency no
y-, −x-, and −y-directions. These correspond to pulse phases of longer affects the trajectory, unlike in the laboratory frame.
0, π , π, and 3π , respectively. Rotation in the Presence of Off-Resonance RF-Pulses in the
2 2
The program on-resonance-RF.py calculates the trajectory of Rotating Frame
the spin in the rotating frame, in the presence of an on-resonance Off-resonance pulses are RF-pulses in which ωp and ωref are not
RF-pulse, by taking as user input polar coordinates of initial spin- exactly equal to ω0 (see Rotating-Frame Approximation and RF-
state, amplitude of the pulse in Hz, and pulse duration. It rotates Pulses). Unlike in the on-resonance case, this corresponds to a
the initial spin-state and outputs the final state on the terminal reduced static magnetic field in the z-direction (B0′ ) (eq S4) and
and the trajectory of rotation graphically (Figure 7; eqs S8, S9, a weak RF field away from the z-direction in the rotating frame.
and S10; Figure S9). An on-resonance π x-pulse rotates a spin- The resultant magnetic field (Beff) which the spin experiences is
2
state initially along the +z-direction to point along the −y- in a new direction, and the spin rotates about this “tilt axis”.
direction (Figure 7A) or a spin-state initially along the −y- The magnitude of Beff is given by Beff = B0′ 2 + B12 and its
direction to point along the −z-direction (Figure 7C) whereas ω1 Ω0
an on-resonance π y-pulse rotates a spin-state initially along the direction by θp = tan−1 Ω0
, and φp, where B′0 = − γ
. The flip
+x-direction to point along the −x-direction (Figure 7B). angle for such an off-resonance pulse is = γBefftp. The
βoff
p
The take home message: Students should note the trajectories program off-resonance-RF.py takes as input the initial
of the spin in the laboratory frame (Figure 6, solid gray lines) and orientation of the spin, ω0, ωref, ω1, φp, and tp. The program
the rotating frame (Figure 7, solid black lines). Students should calculates Ω0, assumes that ωp = ω0, and graphically outputs the
1678 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education pubs.acs.org/jchemeduc Article

Figure 8. Off-resonance effects in the rotating frame. An isolated spin 1/2 pointing in the z-direction (ω0 = 500 MHz) rotates when an off-resonance x-
pulse with ω1 = 1000 Hz is applied for 0.00025 s (corresponding to a π/2 flip angle in the laboratory frame) at an offset of (A) 0 Hz (corresponding to
an on-resonance x-pulse), (B) 1000 Hz, (C) 2000 Hz, and (D) −3000 Hz. The red and orange arrows indicate the initial and final orientations of the
spin. The gray arrow denotes the pulse-axis. The blue arrow denotes the tilt axis, and the black solid line denotes the trajectory of rotation.

Table 2. Comparison of Parameters for an On- and Off-


Resonance π x-pulse of the Same Duration tp = 0.00025 s for
2
■ CONCLUSION
To summarize, a set of 10 interactive Python programs are
an Isolated 1H with Varying Offset Frequencies presented here which can be used to visualize basic NMR
concepts accompanying in-depth theoretical derivations.
On-Resonance π x-Pulse in Off-Resonance π x-Pulse in Students can greatly benefit from these tools, before progressing
2 2
Parameters the Rotating Frame the Rotating Frame into more advanced concepts. The take home messages
Larmor frequency 500 500 following each section summarize the salient points and allow
(ω0) in MHz
students to test out important concepts themselves. Importantly,
these programs can be run without any prior programming
Offset (Ω0) in Hz 0 1000, 2000, −3000
knowledge, using free open source software on an operating
system of the user’s choice.


Beff in Hz

ASSOCIATED CONTENT
ω1 (Hz) and φp 1000 Hz and 0 1000 Hz and 0
(rad) *
sı Supporting Information

The Supporting Information is available at https://pubs.ac-


tp (s) 0.00025 0.00025
s.org/doi/10.1021/acs.jchemed.0c01008.
Flip angle (βp/βoff π Representative graphical and terminal outputs of Python
p )
in radians 2 programs described in this paper and relevant mathemat-
ical details (PDF)
initial and final orientations of the spin, the rotation trajectory, Python programs described in this paper and Jupyter
and the tilt axis (Figure 8 and Figure S10) along with a terminal/ notebook (ZIP)
notebook output. As the offset increases, the final spin-state ends Installation instructions for Python3, Numpy, Scipy, and
up further and further away from the −y-axis. Matplotlib (PDF)


The take home message: An on- and off-resonance pulse of
the same duration and amplitude rotate a spin by different AUTHOR INFORMATION
angles. Whereas an on-resonance π x-pulse rotates the spin,
2 Corresponding Author
initially pointing toward the +z-direction to the −y-direction
(Figure 8A), the off-resonance pulse, despite its larger flip angle Ishita Sengupta − Department of Chemistry, IIT Bombay,
βoff Mumbai 400076, India; orcid.org/0000-0002-2679-
p , cannot bring the spin to point along the −y-direction in the
same time duration. This is because the axis of rotation is tilted 6954; Email: ishita@chem.iitb.ac.in
in the off-resonance case (Figure 8B−D). Students can calculate Complete contact information is available at:
the flip angles for an off-resonance pulse with varying offsets for https://pubs.acs.org/10.1021/acs.jchemed.0c01008
an isolated 1H (fixed ω0 and varying ωref); compare it to an on-
resonance π x-pulse of same duration, tp; and convince Notes
2
themselves that this is indeed true (Table 2). The author declares no competing financial interest.
1679 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680
Journal of Chemical Education


pubs.acs.org/jchemeduc Article

ACKNOWLEDGMENTS
I.S. acknowledges financial support from IRCC, IIT Bombay,
and Science and Engineering Research Board, Government of
India (Grant SRG/2019/001988).

■ REFERENCES
(1) Levitt, M. H. Spin Dynamics: Basics of Nuclear Magnetic Resonance,
2nd ed.; John Wiley & Sons Ltd.: Hoboken, NJ, 2008.
(2) Keeler, J. Understanding NMR Spectroscopy, 2nd ed.; Wiley:
Chichester, U.K., 2010.
(3) Ernst, R.; Bodenhausen, G.; Wokaun, A. Principles of Nuclear
Magnetic Resonance in One and Two Dimensions; Clarendon Press:
Oxford, 1990.
(4) Lundberg, P. Educational NMR Software. J. Chem. Educ. 1997, 74
(12), 1489−1490.
(5) Bak, M.; Rasmussen, J. T.; Nielsen, N. C. SIMPSON: A General
Simulation Program for Solid-State NMR Spectroscopy. J. Magn. Reson.
2000, 147 (2), 296−330.
(6) Jerschow, A. MathNMR: Spin and Spatial Tensor Manipulations
in Mathematica. J. Magn. Reson. 2005, 176 (1), 7−14.
(7) Veshtort, M.; Griffin, R. G. SPINEVOLUTION: A Powerful Tool
for the Simulation of Solid and Liquid State NMR Experiments. J.
Magn. Reson. 2006, 178 (2), 248−282.
(8) Hogben, H. J.; Krzystyniak, M.; Charnock, G. T. P.; Hore, P. J.;
Kuprov, I. Spinach - A Software Library for Simulation of Spin
Dynamics in Large Spin Systems. J. Magn. Reson. 2011, 208 (2), 179−
194.
(9) Bengs, C.; Levitt, M. H. SpinDynamica: Symbolic and Numerical
Magnetic Resonance in a Mathematica Environment. Magn. Reson.
Chem. 2018, 56 (6), 374−414.
(10) Schwartz, L. J. A Step-by-Step Picture of Pulsed (Time-Domain)
NMR. J. Chem. Educ. 1988, 65 (9), 752−756.
(11) Macomber, R. S. A Primer on Fourier Transform NMR. J. Chem.
Educ. 1985, 62 (3), 213−214.
(12) Doscotch, M. A.; Evans, J. F.; Munson, E. J. Fourier Transform
Nuclear Magnetic Resonance Spectroscopy Experiment for Under-
graduate and Graduate Students. J. Chem. Educ. 1998, 75 (8), 1008−
1013.
(13) King, R. W.; Williams, K. R. The Fourier Transform in
Chemistry. J. Chem. Educ. 1989, 66 (10), A243−A248.
(14) Autschbach, J.; Le Guennic, B. Analyzing and Interpreting NMR
Spin − Spin Coupling Constants Using Molecular Orbital Calculations.
J. Chem. Educ. 2007, 84 (1), 156−171.
(15) Bryce, D. L.; Wasylishen, R. E. Ab Initio Calculations of NMR
Parameters for Diatomic Molecules An Exercise in Computational
Chemistry. J. Chem. Educ. 2001, 78 (1), 124−133.
(16) Johnson, C. S.; Moreland, C. G. The Calculation of NMR Spectra
for Many-Site Exchange Problems. J. Chem. Educ. 1973, 50 (7), 477−
483.
(17) Morris, K. F.; Erickson, L. E. NMR Determination of Internal
Rotation Rates and Rotational Energy Barriers. J. Chem. Educ. 1996, 73
(5), 471−473.
(18) Spiese, C. E. A Simplified Approach to Product Operator
Formalism. J. Chem. Educ. 2004, 81 (1), 134−137.
(19) de la Vega-Hernandez, K.; Antuch, M. The Heteronuclear Single-
Quantum Correlation (HSQC) Experiment: Vectors versus Product
Operators. J. Chem. Educ. 2015, 92, 482−487.
(20) Anderson-Wile, A. M. Introducing 2D NMR Spectroscopy to
Second-Year Undergraduate Chemistry Majors Using a Building-Up
Approach. J. Chem. Educ. 2016, 93, 699−703.
(21) Shankar, R. Principles of Quantum Mechanics; Springer: Boston,
MA, 1994.
(22) Bloch, F. Nuclear Induction. Phys. Rev. 1946, 70 (7−8), 460−
474.

1680 https://doi.org/10.1021/acs.jchemed.0c01008
J. Chem. Educ. 2021, 98, 1673−1680

You might also like