Skip to content

hessammehr/coalescence

Repository files navigation

Frequency coalescence

X-H + Y <-> X + Y-H

Simulates the coalescence of peaks in an ensemble of variable-frequency oscillators, often encountered with exchanging protons in NMR experiments (also an exercise in using JavaScript generators for signal generation/processing). The 1H signal emitted by the above system depends on which one of X or Y the H is bonded to. With slow exchange (fexchange ≪ | fX-H – fY-H |), two distinct peaks result:

slow exchange spectrum

Fast exchange (fexchange ≫ | fX-H – fY-H |) gives a single peak at the average of fX-H and fY-H:

slow exchange spectrum

Try it out!

Intall node.js, then

npm install -g typescript
git clone https://github.com/hessammehr/coalescence
cd coalescence
npm install
tsc -w

You will need to fire up a local dev server

# Python 3
python -m http.server
# Python 2
python -m SimpleHTTPServer
# something a bit faster?
caddy -host localhost -port 8000

Then go to http://localhost:8000.

TODO

  • Display the (phase-adjusted) real part of the FFT instead of its magnitude.
  • Package fft-asm.js as npm package, then pull it in as a proper dependency.

Credits

About

JS demonstration of peak coalescence in NMR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages