This is a Jupyter notebook that was composed to run most of the examples distributed with SpinEvolution. It gives a visual overview of the examples and shows how to use SpinEvolution from Jupyter notebooks.

If you are viewing this content in a web browser, then this is just an HTML export (a Web version) of the original notebook. While the notebook format allows making all figures fully interactive, only some of the 2D spectra were made interactive in the Web version.

The whole gallery (35 simulations) can be fully computed in about 10 minutes on a 4-core CPU. About 95% of this time is spent on five relatively large calculations.

Note that only about one third of these problems can be simulated with SIMPSON. Except for the most basic ones, however, they will be quite difficult to program for that software and will typically take at least an order of magnitude longer to compute.


Using the notebooks

In short, SpinEvolution/Jupyter notebooks gather three things in one place: live access to the simulations, the results of these simulations, and the accompanying notes. This makes them uniquely suitable for preparing lectures, tutorials and other educational materials on subjects that concern NMR theory and computations. Even more importantly, the notebooks can be also used as a very convenient user interface for conducting theoretical and computational NMR research that can be easily shared with other people.

The notebooks contain two types of cells: Python code and Markdown text. The former can be executed, while the latter provides commentary that may include richly formatted text, mathematical equations (via LaTeX format), images, links, etc.

The simulations are started by calling spinev() function inside the code cells as

spinev('<filename> [<options>]', opts)

The command-line options can be provided both explicitly and as the second (optional) argument. The options shared by most of the spinev() calls in this notebook are provided as the opts variable. The <filename> may also include the name of the folder, where the input files are located.

Any output of the simulation that would normally be printed to the terminal will appear as the cell output. Results of the simulation are plotted automatically as soon as it completes, unless plotting is suppressed with the -px0 option.

The input file for the simulation can be opened in the Jupyter text editor, side-by-side with the notebook. One can make changes to it, re-run the simulation, and see the results. The simulation can be re-run either in the same cell, which will replace the old figure, or in a new cell. Comments about what has been changed can be added as a Markdown cell.

After the figures have been plotted, additional changes can be applied to them via the usual Matplotlib interface.


Setting up

All required preparations are done in the first cell. This cell sets the options for displaying the figures, imports spinev() and plot() functions, and sets the current directory and the opts variable. After this cell has been run, the other cells can be run in any order.

To execute the code in a cell after editing it, press Shift+Enter. Alternatively, the notebook menu can be used to execute several cells in a row, or even to run the whole notebook. When executing multiple cells, the results will appear immediately if the inline mode is used, or only after the calculation is finished for all of the cells if the widget mode is used.

The modes are chosen with the %matplotlib widget and %matplotlib inline commands. The widget mode produces interactive figures, while the inline mode will result in static figures. When a notebook with inline figures is saved and then re-opened, the figures will preserve their appearance. In the widget mode was used, the figures are lost once you close the notebook. Also, the widget mode figures cannot be exported to HTML.

The %config InlineBackend line selects SVG format for the inline figures, which makes them look much sharper.

In [1]:
import matplotlib.pyplot as plt

#%matplotlib widget
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
plt.rcParams['figure.figsize'] = [6.4,4.8]

from plot import spinev, plot

examples = '~/spinev/examples/'
%cd $examples

opts = '-v0 -vf0 -vsf0 --verb'
/Users/mvesh/spinev/examples

In [2]:
spinev('csa/csa', opts)
****** The System *******
spectrometer(MHz)  500
spinning_freq(kHz) *
channels           C13
nuclei             C13
atomic_coords      *
cs_isotropic       *
csa_parameters     1 1 0.5 0 0 0
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)      (200)512
power(kHz)         0           
phase(deg)         0       
freq_offs(kHz)     0
******* Variables ***********************************
fig_title="CSA Powder Pattern"
******* Options *************************************
rho0               I1x
observables        I1p
EulerAngles        asgind100o
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     1
options            -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb
******************************************************
-- Note the orientation of the CSA tensor. So that powder averaging
over one octant could be used, it has to be alligned with the crystallite frame.
-- See also the analytic mode version of this simulation, csa-am

In [3]:
spinev('redor/redor-full', opts)
****** The System ***********************************
spectrometer(MHz)  500
spinning_freq(kHz) 10.0
channels           C13 N15
nuclei             C13 N15
atomic_coords      1.367
cs_isotropic       2 0
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)     (100)60D1B  (95     5    100)1D1A (100)60D1B
power(kHz)         0           0    100    0         0
phase(deg)         0           0     0     0         0
freq_offs(kHz)     0           0     0     0         0
CHN 2         
timing(usec)    (redor.pp)   45  5   50  redor.pp (redor.pp)
power(kHz)         *          0  100 0     *         *  
phase(deg)         *          0  0   0     *         *        
freq_offs(kHz)     *          0  0   0     *         *         
******* Variables ************************************
fig_title="REDOR"
******* Options **************************************
rho0               I1x
observables        I1p
EulerAngles        ^asgind30h
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

It is sometimes desireable to simulate a pulse sequence, in which some of the RF field parameters are varied continuously rather than in steps, as is usually the case. The simulation below illustrates, on the simplest possible example, how this can be done is SpinEvolution. In the input file, the RF frequency offset is specified as an analytic function of time: xfreq_1_1=0.025*(t_-tp)/tp, and there are no pulses.

This example also demonstrates that one can use alternative design styles for the output figures.

In [4]:
spinev('cw-nmr/cw-xfreq --style seaborn-dark', opts)
****** The System ***********************************
spectrometer(MHz)  *
spinning_freq(kHz) *
channels           C13
nuclei             C13
atomic_coords      *
cs_isotropic       *
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)       [100000]5001
power(kHz)         [0.0001]5001
phase(deg)         [90]5001
freq_offs(kHz)     [0]5001
******* Variables ***********************************
T1SQ_1_1=2000
T2SQ_1_1=2000
tp=500100000/2
xfreq_1_1=0.025*(t_-tp)/tp
dim_1_units="s"
fig_title="CW NMR: Continuous Linear Frequency Sweep"
******* Options *************************************
rho0               0.25*I1z
observables        I1p
EulerAngles        *
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -re -oes -py
options_cmd_line   --style seaborn-dark -px -py0 -vm -v0 -vf0 -vsf0 --verb

In [5]:
spinev('adiabatic-inversion/adiab', opts)
****** The System ***********************************
spectrometer(MHz)  *
spinning_freq(kHz) *
channels           C13
nuclei             C13
atomic_coords      *
cs_isotropic       *
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)       [200]5001   
power(kHz)         [0.1]5001       
phase(deg)         [90]5001       
freq_offs(kHz)     [0]5001    
******* Variables ***********************************

T1SQ_1_1=2000
T2SQ_1_1=2000
freq_1_1=-1:0.0004:1

fig_title="Adiabatic Inversion by Linear Frequency Sweep at Constant Power"
dim_2_labels = "$I_x$, $I_y$, $I_z$"

******* Options *************************************
rho0               0.25I1z
observables        I1p iI1m I1z
EulerAngles        *
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -oes -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

In [6]:
spinev('cpmg-echo/echo', opts)
****** The System *******
spectrometer(MHz)  *
spinning_freq(kHz) *
channels           C13
nuclei             C13
atomic_coords      *
cs_isotropic       *
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)       0.5 [1000]2900
power(kHz)         500 [0]2900       
phase(deg)          90 [0]2900       
freq_offs(kHz)       0 [0]2900
******* Variables ***********************************

T2SQ_1_1=1000
sigma=0.006

pulse_1_1_[100:200:2900]=1.0
power_1_1_[100:200:2900]=500

** Chemical shifts inhomogeneity
ave_par x/-0.02:0.0025:0.02/
cs_iso_1=0.1+x

W=sum(exp(-0.5*(x.mx/sigma).^2))
ave_wht=exp(-0.5*(x/sigma)^2)/W

fig_title="Carr-Purcell-Meiboom-Gill Echo Train"
** use thinner lines for the plot
fig_options="--widths 0.6"

******* Options **************************************
rho0               I1z
observables        I1p
EulerAngles        *
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -oes -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

In [7]:
spinev('tppm/tppm', opts)
****** The System *******
spectrometer(MHz)  500
spinning_freq(kHz) 15.625
channels           C13  H1
nuclei             C13  H1  H1  H1  H1
atomic_coords      ch4.cor
cs_isotropic       0.0 -0.3 0.5 0.5 0.2
csa_parameters     ch4.csa
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)      (8)256x200
power(kHz)         0
phase(deg)         0
freq_offs(kHz)     0
CHN 2         
timing(usec)      (4   4)
power(kHz)        125 125
phase(deg)         0   15
freq_offs(kHz)     0   0
****** Variables ************************************
spinning_freq=15.625
DW=40*(1000/spinning_freq)
scan_par R/4.5:0.25:5.25/
tc=(1000/spinning_freq)/R
pulse_1_1_1=tc
pulse_2_1_[1:2]=0.5*tc
power_2_1_[1:2]=1000/tc
gsize_1=round(DW/tc)
******************************************************
fig_title="TPPM Lineshape Dependence on RF Field Strength"
dim_2_name="$\omega_1/2\pi$"
dim_2_labels=R.mx*spinning_freq
dim_2_units="kHz"
******* Options **************************************
rho0               I1x
observables        F1p
EulerAngles        rep168
n_gamma            16
line_broaden(Hz)   6
zerofill           *
FFT_dimensions     1 Hz
options            -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

The following shows the Linear Ramp Cross-Polarization pulse sequence, which consists of 30 elementary pulse sequences. The diagram shows each sequence repeated just once, but the $D_1$ symbols over the sequences says that the number of repeats grows in dimension 1.

In [8]:
spinev('ramped-cp/rampcp1 -pseq')
In [9]:
spinev('ramped-cp/rampcp1', opts)
****** The System ***********************************
spectrometer(MHz)  400                                                  
spinning_freq(kHz) 10
channels           C13 H1
nuclei             C13 H1 H1 H1
atomic_coords      *
cs_isotropic       *
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)       [(0)64]30
power(kHz)         [0]30
phase(deg)         [0]30
freq_offs(kHz)     [0]30
CHN 2
timing(usec)       [(0)]30
power(kHz)         [0]30
phase(deg)         [0]30
freq_offs(kHz)     [0]30
******* Variables ***********************************
power_1_[1:30]_1=50+[0:29]*6/29
power_2_[1:30]_1=63
pulse_1_[1:30]_1=1
pulse_2_[1:30]_1=1
sys2ext_map=["1 3 4 5"]
fig_title="Linear-Ramp Cross-Polarization in C$_1$H$_3$ Spin System"
******* Options *************************************
rho0               F2x
observables        I1x
EulerAngles        rep376
n_gamma            5
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -zxmatrampcp.zxmat -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

The following simulation computes a histogram demonstrating that even ramped CP may result in the $^{13}$C polarization, which is extremely non-uniform over the crystallite orientations.

In [10]:
spinev('ramped-cp/rampcp-hist', opts)
****** The System ***********************************
spectrometer(MHz)  400                                                  
spinning_freq(kHz) 10
channels           C13 H1
nuclei             C13 H1 H1 H1
atomic_coords      *
cs_isotropic       *
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)       [0]30
power(kHz)         [0]30
phase(deg)         [0]30
freq_offs(kHz)     [0]30
CHN 2
timing(usec)       [0]30
power(kHz)         [0]30
phase(deg)         [0]30
freq_offs(kHz)     [0]30
******* Variables ***********************************

*save(euler_CR',"rep376.dat")

sys2ext_map=["1 3 4 5"]

power_1_1=50+(0:29)*6/29
power_2_1=63
time=2
pulse_[1:2]_1=1000*time/30

rep2000=(load("rep2000.dat"))'
scan_par i/1:2000/
euler_CR(1:2,1)=rep2000(1:2,i)

fig_options ="--hist 25 --colorsx navy"
x_label = "$^{13}$C polarization after CP"
fig_title="Histogram of ramped CP efficiency for a set of 2000 crystallite orientations"

******* Options *************************************
rho0               F2x
observables        I1x
EulerAngles        *
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -zxmatrampcp.zxmat -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

The following two simulations compute the R$^2$ magnetization exchange curves between CO and C$_\beta$ in alanine using two model spin systems: C2 (without protons) and C2H7. The normal plotting of the results of the first simulation is suppressed with the -px0 option. Instead, these results are plotted as a reference curve by the second simulation.

This illustrates that even at 80 kHz CW decoupling and with both CH3 and NH3 groups in the fast exchange regime, the presence of protons leads to ZQ relaxation and to apparent attenuation of the C-C coupling.

In [11]:
spinev('rotational-resonance/r2-C2 -px0  -macroX=3', opts)
spinev('rotational-resonance/r2-C2H7-hot -macroX=3', opts)
****** The System *******************************************************
spectrometer(MHz)  500
spinning_freq(kHz) 10
channels           C13 H1
nuclei             *
atomic_coords      *
cs_isotropic       176.8 50.9 19.8 0 0 0 0 0 0 0 ppm
csa_parameters     1 -71  0.84   0   0  0 ppm 1
csa_parameters     2 -20  0.44 -20   0  0 ppm 2
csa_parameters     3 -12  0.76   0 -90  0 ppm 3
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    (8 9 10) (11 12 13)
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      (2 1 4) (7 2 3) (2 3 8)
******* Pulse Sequence ***************************************************
CHN 1
timing(usec)     (100)512
power(kHz)         0
phase(deg)         0
freq_offs(kHz)     0
CHN 2
timing(usec)      100
power(kHz)         80
phase(deg)         0
freq_offs(kHz)     0
******* Variables *********************************************************

sys2ext_map=["1 X 7 8 9 10 11 12 13"]
spinning_freq=cs_iso_X-cs_iso_1
freq_1_1_1=(cs_iso_X+cs_iso_1)/2
pulse_[1:2]_1_1=1000/spinning_freq

** Figure setup ***********************************************************
q = (X==2)? "alpha" : "beta"
fig_title=f"C$'$-C$_\[q]$ Rotational Resonance in Ala: C$_2$H$_7$ vs. C$_2$ spin systems"
y_label="${\langle}I_{1z}-I_{2z}{\rangle}$"
legend_labels="C$_2$H$_7$, C$_2$"
fig_options = f"--text 0.3,0.9,'80 kHz $^1$H CW Decoupling[nl]CH3 and NH3 groups in fast exchange' --esize 8.5"
x_lim=["0 10"]

******* Options ************************************************************
rho0               0.5*I1z-0.5*I2z
observables        I1z-I2z
EulerAngles        rep700
n_gamma            12
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options         -zxmatala.zxmat -re -sysc2h7 -nr2-C1CX-H7-hot -refr2-C1CX -py
options_cmd_line   -macroX=3 -px -py0 -vm -v0 -vf0 -vsf0 --verb
**************************************************************************
-- Either -macroX=2 or -macroX=3 must be specified at the command line
-- The spinning frequencies used for X=2 and X=3 cases are different. So the total observation times (512 points) will also different. To plot the output results on the same scale, we simply set the same x-axis limits for both cases.
-- CO-CA  oscillations after ~10ms are due to incomplete powder averaging. They can be seen if one uses a higher upper limit in x_lim, e.g., x_lim=["0 21"]

These effects become much more pronounced when the fast hopping of both CH3 and NH3 groups is frozen. The --ref option requests to show the difference in the input files.

In [12]:
spinev('rotational-resonance/r2-C2H7-frozen -macroX=3 --ref rotational-resonance/r2-C2H7-hot', opts)
****** The System *******************************************************
spectrometer(MHz)  500
spinning_freq(kHz) 10
channels           C13 H1
nuclei             *
atomic_coords      *
cs_isotropic       176.8 50.9 19.8 0 0 0 0 0 0 0 ppm
csa_parameters     1 -71  0.84   0   0  0 ppm 1
csa_parameters     2 -20  0.44 -20   0  0 ppm 2
csa_parameters     3 -12  0.76   0 -90  0 ppm 3
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      (2 1 4) (7 2 3) (2 3 8)
******* Pulse Sequence ***************************************************
CHN 1
timing(usec)     (100)512
power(kHz)         0
phase(deg)         0
freq_offs(kHz)     0
CHN 2
timing(usec)      100
power(kHz)         80
phase(deg)         0
freq_offs(kHz)     0
******* Variables *********************************************************

sys2ext_map=["1 X 7 8 9 10 11 12 13"]
spinning_freq=cs_iso_X-cs_iso_1
freq_1_1_1=(cs_iso_X+cs_iso_1)/2
pulse_[1:2]_1_1=1000/spinning_freq

** Figure setup ***********************************************************
q = (X==2)? "alpha" : "beta"
fig_title=f"C$'$-C$_\[q]$ Rotational Resonance in Ala: C$_2$H$_7$ vs. C$_2$ spin systems"
y_label="${\langle}I_{1z}-I_{2z}{\rangle}$"
legend_labels="C$_2$H$_7$, C$_2$"
fig_options = f"--text 0.3,0.9,'80 kHz $^1$H CW Decoupling[nl]Both CH3 and NH3 groups are frozen' --esize 8.5"
x_lim=["0 10"]

******* Options ************************************************************
rho0               0.5*I1z-0.5*I2z
observables        I1z-I2z
EulerAngles        rep700
n_gamma            12
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options         -zxmatala.zxmat -re -sysc2h7 -nr2-C1CX-H7-frozen -refr2-C1CX -py
options_cmd_line   -macroX=3 --ref rotational-resonance/r2-C2H7-hot -px -py0 -vm -v0 -vf0 -vsf0 --verb
**************************************************************************
-- Either -macroX=2 or -macroX=3 must be specified at the command line
-- The spinning frequencies used for X=2 and X=3 cases are different. So the total observation times (512 points) will also different. To plot the output results on the same scale, we simply set the same x-axis limits for both cases.
-- CO-CA  oscillations after ~10ms are due to incomplete powder averaging. They can be seen if one uses a higher upper limit in x_lim, e.g., x_lim=["0 21"]
- exchange_nuclei    (8 9 10) (11 12 13)
+ exchange_nuclei    *
- fig_options = f"--text 0.3,0.9,'80 kHz $^1$H CW Decoupling[nl]CH3 and NH3 groups in fast exchange' --esize 8.5"
+ fig_options = f"--text 0.3,0.9,'80 kHz $^1$H CW Decoupling[nl]Both CH3 and NH3 groups are frozen' --esize 8.5"
- options         -zxmatala.zxmat -re -sysc2h7 -nr2-C1CX-H7-hot -refr2-C1CX -py
+ options         -zxmatala.zxmat -re -sysc2h7 -nr2-C1CX-H7-frozen -refr2-C1CX -py


The following shows the SPC-5 dipolar recoupling pulse sequence

In [13]:
spinev('spc5/spc5 -pseq')
In [14]:
spinev('spc5/spc5', opts)
****** The System *******
spectrometer(MHz)  400
spinning_freq(kHz) 10.0
channels           C13
nuclei             C13 C13
atomic_coords      4
cs_isotropic       *
csa_parameters     1 70 0.8  0 60 0 ppm
csa_parameters     2 70 0.8 30 90 0 ppm
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)      (spc5.pp)41    (spc5.pp)41    0.5
power(kHz)          *              *            500
phase(deg)          *              *            90
freq_offs(kHz)      *              *            0
phase_cycling       *             1234          *   3131(RCV)
******* Variables **********************************

spinning_freq=9
psf_1_[1 2]=0.1*spinning_freq
tsf_[1 2]=1/psf_1_1

** Turn on/off the CSA
scan_par csa/0 1/
csa_swb_[1 2]_1 = csa
csa_swb_[1 2]_2 = csa

** Set up the Figure
legend_labels = "'SPC-5 no CSA', 'SPC-5 70 ppm CSA'"
y_label = "DQ filtering efficiency"
fig_title = "SPC-5"
fig_options = f"--text 0.6,0.4,'$^1$H 400 MHz    $\omega_R/2\pi=9$ kHz[nl]$^{13}$C$-^{13}$C pair    $r=4$ Å' --esize 8"

******* Options *************************************
rho0               F1z
observables        I1p
EulerAngles        rep168
n_gamma            20
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -re -dw1 -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

In [15]:
spinev('hccn/hccn', opts)
****** The System ***********************************
spectrometer(MHz)  500                                                  
spinning_freq(kHz) 10
channels           C13 H1 N15
nuclei             H1 C13 C13 N15
atomic_coords      hccn.cor
cs_isotropic       * 
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *    
csa_switchboard    *
exchange_nuclei    *
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    (1 2 3 4)
groups_nuclei      *
******* Pulse Sequence *****************************************
CHN 1
timing(usec)  (100)21  100   1   100  (100)21  (100)x7  (12.5)21
power(kHz)      0       0   500   0     0       5.0       70.0
phase(deg)      0       0    0    0     0        0          0
freq_offs(kHz)  0       0    0    0     0        0          0
CHN 2                                                                    
timing(usec)  (100)         200       (100)      100     (12.5)
power(kHz)     100          100        100       100     65.574
phase(deg)      0            0          0         0         0
freq_offs(kHz)  0            0          0         0      45.826
CHN 3         
timing(usec) (redor1.pp)    200    (redor2.pp)   100     (12.5)
power(kHz)      *            0          *         0         0
phase(deg)      *            0          *         0         0
freq_offs(kHz)  *            0          *         0         0
******* Variables **********************************************
scan_par phi_1/-130:-10:-180/
spinning_freq=12.9
tsf_[1:5]=10/spinning_freq
psf_1_[1:4]=spinning_freq/10
psf_3_[1:4]=spinning_freq/10
power_1_5_1=80-spinning_freq
****************************************************************
fig_title="HCCN Correlation Experiment"
y_label="C$'\to\mathrm{C}_\alpha$"
******* Options ************************************************
rho0              -I3x
observables        I2p
EulerAngles        rep168
n_gamma            16
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     *
options            -dw13 -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb

In [16]:
spinev('chem-exchange/exch', opts)
****** The System *******
spectrometer(MHz)  400
spinning_freq(kHz) *
channels           H1
nuclei             H1 H1
atomic_coords      *
cs_isotropic       1 -1
csa_parameters     *
j_coupling         *
quadrupole         *
dip_switchboard    *
csa_switchboard    *
exchange_nuclei    (1 2)
bond_len_nuclei    *
bond_ang_nuclei    *
tors_ang_nuclei    *
groups_nuclei      *
******* Pulse Sequence ******************************
CHN 1
timing(usec)      (100)1024
power(kHz)          0
phase(deg)          0
freq_offs(kHz)      0
******* Variables ***********************************
scan_par k_1/0.7 1.5 3 4.4 6 16/
pdata_re=pdata_re/pdata_re(512,6)
fig_title="Chemical Exchange in a Two-Spin System"
******* Options *************************************
rho0               F1x
observables        F1p
EulerAngles        *
n_gamma            *
line_broaden(Hz)   *
zerofill           *
FFT_dimensions     1
options            -re -py
options_cmd_line   -px -py0 -vm -v0 -vf0 -vsf0 --verb
******************************************************
-- 4.4 ≈ π√2
-- The signal is normalized by the height of the last peak