SIMPSON coding examples

SIMPSON Tutorial #1: Static. Introduction to SIMPSON and simulations

by Thomas Vosegaard

We look at a single spin (1H) located in an external magnetic field and with a certain chemical shift anisotropy. Single crystal.

  1. Use this exercise to get familiar with SIMPSON. Open a command line and run the file by typing simpson 1_Static.in. Look at the output from the file by typing simplot 1_Static,1.fid or simplot 1_Static,1.spe.
  2. Open the input file in wordpad. Change the angles in the line shift 1 0 100 0 0 0 0. The angles are the three last entries, all set to zero initially. You may change the index to 2, so you don't overwrite the first spectrum. Look at the resulting spectrum (1_Static,2.spe).
  3. Change the line crystal_file alpha0beta0 to crystal_file rep678. This changes the number of crystallites from a single crystal to a powder consisting of 678 independent crystal orientations. You may need to try other crystal files to get a nice spectrum, like zcw4180 (1_Static,3.spe)
  4. Change the size of the CSA and asymmetry parameter and observe the effect in the simulated spectrum (1_Static,4.spe).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
spinsys {
  channels 1H
  nuclei 1H
  shift 1 0 10p 0 0 0 0
}

par {
  crystal_file     alpha0beta0
  variable index   1
  variable lb      50

  sw               10000
  variable tsw     1e6/sw
  np               512
  proton_frequency 400e6
  start_operator   I1x
  detect_operator  I1p
  method           direct
  gamma_angles     1
  spin_rate        0
  verbose          1101
}

proc pulseq {} {
  global par
  
  acq
  for {set i 1} {$i < $par(np)} {incr i} {
    delay $par(tsw)
    acq
  }
}

proc main {} {
  global par
  
  set f [fsimpson]
  faddlb $f $par(lb) 0
  fsave $f $par(name),$par(index).fid
  fzerofill $f 4096
  fft $f
  fsave $f $par(name),$par(index).spe
}
Files:1_Static,1.spe  preview
1_Static,2.spe  preview
1_Static,3.spe  preview
1_Static,4.spe  preview
1_Static.in
Add comment

Comment on SIMPSON Tutorial #1: Static. Introduction to SIMPSON and simulations

by Thomas Vosegaard

In fact, to get a completely smooth line shape I had to use the external crystal file zcw28656 containing 28656 crystallites. To invoke an external crystal file, use the code below.

1
2
3
4
5
par {
  ...
  crystal_file ./zcw28656
  ...
}
File:zcw28656.cry
Add comment

Snippets version 1.0.1