SIMPSON coding examples

Saving spectra in jsNMR format

by Thomas Vosegaard

We have recently released a JavaScript-based NMR spectrum viewer jsNMR (see more here). It is perfectly suited for visualising SIMPSON spectra, and even though the viewer can easily load spectra in SIMPSON format, it is often convenient to prepare a jsNMR file directly from your SIMPSON input file.
All you need to do is download the Tcl library jsnmr attached to this snippet and use the code below to save in jsNMR format from your input file. Please remember to update the path in the first line.

1
2
3
4
5
6
7
8
9
10
lappend ::auto_path $::env(HOME)/Dropbox/Tcl/jsnmr
package require jsnmr

...

proc main {} {
  global par
  ...
  fsave $par(name).html -jsnmr
}
File:jsnmr.zip
Add comment

Snippets version 1.0.1