;   tocsyt.bf, by B. Fulton, March, 1998.
;   TOCSY with water flip-back and WATERGATE
;   D. B. Fulton et al, J. Biomol. NMR, _8_ 213-218 (1996).
;   Phase-sensitive in F1 via States-TPPI.
;   Mixing sequence: TOWNY-16

#include <Avance.incl>
#include <Grad.incl>

"d11=30m"
"d12=20u"
"d13=4u"
"p2=(p1*2)"
"p9=(p1*3.98)"  ; p90 for pl10=12
"p10=(p9*.1666)"
"p11=(p9*.5)"
"p12=(p9*.8333)"
"p13=(p9*3.0)"
"d0=(in0/2-p1*2/3.14159-d13*2)"
"l10=d8/(p9*72)"
"l3=td1/2"

1 ze
2 d11*2
3 d11
4 d12 
  d1 pl1:f1
  50u UNBLKGRAD
  p1 ph1
  d13 gron1
  d0
  d13 groff
  d13 gron2
  d0
  d13 groff
  p1 ph2
  d17 gron3
  d16 groff
  d12 pl10:f1
5 (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph24 p12 ph22 p13 ph24 p11 ph22)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  (p10 ph22 p12 ph24 p13 ph22 p11 ph24)
  lo to 5 times l10
  d13
  d17 gron4
  d16 groff
  p20:sp1 ph12
  d13
  p20:sp1 ph11
  d13
  p20:sp1 ph13:r
  d12 pl1:f1
  p1 ph3
  d17 gron5
  d16 groff
  d12
  p21:sp2 ph14:r
  d12
  p2 ph4
  d12 
  p21:sp2 ph14:r
  d17 gron5
  d16 groff
  d12 BLKGRAD
  go=2 ph31
  d11 wr #0 if #0 ip1 zd
  d11 ip11
  lo to 3 times 2
  d11 id0
  lo to 4 times l3
  5s
exit 
  
ph1=0 2
ph2=0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2 
ph3=0 0 2 2  1 1 3 3
ph4=0 0 0 0  1 1 1 1
ph11=2 0
ph12=2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
ph13=2 2 0 0  3 3 1 1
ph14=2 2 2 2  3 3 3 3
ph22=0
ph24=2
ph31=0 2 2 0  1 3 3 1  2 0 0 2  3 1 1 3

;pl1: high power level [0 dB]
;pl10: spin-lock power level [12-15 dB]
;sp1: low power level for selective pulses on water
;sp2: low power level for selective pulse in WATERGATE
;p1 : 90 degree transmitter high power pulse
;p9 : 90 degree spin-lock pulse for mixing
;p20: selective 90 degree flip-back pulse [sp1]
;p21: selective 90 degree pulse on water [sp2]  
;d0 : incremented delay                       
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay (e.g. to compensate delay line)    [4 usec]
;d16: settling time after gradient pulse             [100 usec]
;d17: gradient pulse duration                        [500 usec]
;l10: loop for TOWNY-16 cycle: ((p9*72) * l10) = mixing time
;in0: 1/(2 * SW) = DW
;nd0: 2
;NS: 16 * n
;DS: 16
;td1: number of experiments
;MC2: States-TPPI