# 1 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
;@ schema_version: "0.0.2"
;@ sequence_version: "2.0.1"
;@ title: 15N XSTE diffusion
;@ description: |
;@   15N XSTE diffusion measurement
;@
;@   - using hard-coded linear gradient from 5-95% of max
;@ authors:
;@   - Chris Waudby <c.waudby@ucl.ac.uk>
;@ citation:
;@   - Ferrage et al., JACS (2004) 126:5654
;@ created: 2020-09-04
;@ last_modified: 2025-11-15
;@ repository: github.com/waudbylab/pulseprograms
;@ status: experimental
;@ experiment_type: [diffusion, 1d]
;@ features: [xste, watergate]
;@ typical_nuclei: [1H, 13C, 15N]
;@ dimensions: [diffusion.gradient_strength, f1]
;@ acquisition_order: [f1, diffusion.gradient_strength]
;@ reference_pulse:
;@ - {channel: f1, duration: p1, power: pl1}
;@ - {channel: f3, duration: p21, power: pl21}
;@ diffusion:
;@   type: bipolar
;@   coherence: [f1, 1]
;@   big_delta: d20
;@   little_delta: p31
;@   tau: d17
;@   gradient_strength: {type: linear, start: cnst1, end: cnst2, scale: gpz6}
;@   gradient_shape: gpnam6

prosol relations=<triple_d>

# 1 "/opt/topspin/exp/stan/nmr/lists/pp/Avance.incl" 1
;Avance3.incl
;   for AV III
;
;avance-version (13/06/17)
;
;$CLASS=HighRes Incl
;$COMMENT=


# 169 "/opt/topspin/exp/stan/nmr/lists/pp/Avance.incl"
;$Id: Avance3.incl,v 1.10.2.2 2013/08/30 09:43:33 ber Exp $
# 27 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw" 2

# 1 "/opt/topspin/exp/stan/nmr/lists/pp/Grad.incl" 1
;Grad2.incl  -  include file for Gradient Spectroscopy
;   for TCU3
;
;avance-version (07/01/17)
;
;$CLASS=HighRes Incl
;$COMMENT=

# 27 "/opt/topspin/exp/stan/nmr/lists/pp/Grad.incl"
define list<gradient> EA=<EA>


# 31 "/opt/topspin/exp/stan/nmr/lists/pp/Grad.incl"
;$Id: Grad2.incl,v 1.14 2012/01/31 17:49:21 ber Exp $
# 28 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw" 2

# 1 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl" 1
;Delay.incl  -  include file for commonly used delays
;
;version (13/08/07)
;
;$CLASS=HighRes Incl
;$COMMENT=

# 9 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl"
;general delays

define delay DELTA
define delay DELTA1
define delay DELTA2
define delay DELTA3
define delay DELTA4
define delay DELTA5
define delay DELTA6
define delay DELTA7
define delay DELTA8
define delay DELTA9
define delay DELTA10
define delay DELTA11
define delay DELTA12
define delay DELTA13
define delay DELTA14
define delay DELTA15
define delay DELTA16

define delay TAU
define delay TAU1
define delay TAU2
define delay TAU3
define delay TAU4
define delay TAU5
define delay TAU6
define delay TAU7
define delay TAU8
define delay TAU9
# 40 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl"
define delay INCR1
define delay INCR2
define delay INCR3
define delay INCR4
define delay INCR5
define delay INCR6


;delays for centering pulses
# 50 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl"
define delay CEN_HN1
define delay CEN_HN2
define delay CEN_HN3
define delay CEN_HC1
define delay CEN_HC2
define delay CEN_HC3
define delay CEN_HC4
define delay CEN_HP1
define delay CEN_HP2
define delay CEN_CN1
define delay CEN_CN2
define delay CEN_CN3
define delay CEN_CN4
define delay CEN_CP1
define delay CEN_CP2


;loop counters
# 69 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl"
define loopcounter COUNTER
define loopcounter SCALEF
define loopcounter FACTOR1
define loopcounter FACTOR2
define loopcounter FACTOR3
define loopcounter FACTOR4
define loopcounter FACTOR5
define loopcounter FACTOR6


# 80 "/opt/topspin/exp/stan/nmr/lists/pp/Delay.incl"
;$Id: Delay.incl,v 1.14.2.1 2013/08/30 09:43:33 ber Exp $
# 29 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw" 2


# 34 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
define list<gradient> diff=<Difframp>


"p2=p1*2"
"p22=p21*2"

"p31=p30*2"
"d17=p30+d16+p22"

# 40 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
"d11=30m"
"d12=20u"
"d13=4u"
"d15=50u"
;"d4=1s/(cnst4*4)-p30-d16-larger(p21,p1)"
;"d5=1s/(cnst4*4)-p19-d16-larger(p21,p1)"
;"d6=1s/(cnst4*4)-p19-d16-larger(p21,p1)-p11-d12"
"d4=2.77m-p30-d16-larger(p21,p1)"
"d5=2.77m-p19-d16-larger(p21,p1)"
"d6=2.77m-p19-d16-larger(p21,p1)-p11-d12"

"DELTA1=d20-8*d16-6*p19-4*p21-3*larger(p22,p2)-3*d5-2*p11-2*d15-2*p30-2*p1-2*d12-2*d4-d6-d13"

"TAU=p1*0.63662+de"
"acqt0=de"

"l1=0"
"l2=td1-1"
"cnst1=0.05"
"cnst2=0.95"

# 1 "mc_line 56 file /home/waudbyc/pp_702/stebpgp1s19xn.4.cw dc-measurement inserted automatically"

    dccorr
# 56 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
# 56 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
1 ze
  d11
  d12 setnmr3^0 setnmr0^34^32^33 ctrlgrad 7
2 d11 do:f3
3 d11
4 d11

# 77 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"

# 84 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
  d1


  d12 pl3:f3
  (p21 ph4):f3
  d15 setnmr3|0 setnmr0|34|32|33 ctrlgrad 0
  p19:gp4                     		;Eqm Nz spoiler
  d16 pl0:f1
  (p11:sp1 ph2:r):f1		; flipdown(-x): +z -> +y
  d12 pl1:f1
  (p1 ph4):f1
  d4
  p30:gp6*diff                		;gradient encoding
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient encoding
  d16
  d4
  (p1 ph1):f1
  d12 pl0:f1
  (p11:sp1 ph3:r):f1		; flipdown(-y): -x -> -z
  d15
  p19:gp2                     		;2HzNz spoiler
  d16
  (p21 ph4):f3
  d5
  p19:gp8                     		;spoiler (echo)
  d16 pl1:f1
  (center (p2 ph2):f1 (p22 ph4):f3)
  d5
  p19:gp8                     		;spoiler (echo)
  d16
  (p21 ph5):f3
  d15
  p19:gp3                     		;Nz spoiler
  d16 setnmr3^0 setnmr0^34^32^33 ctrlgrad 7
  DELTA1
  (p21 ph6):f3
  d5 setnmr3|0 setnmr0|34|32|33 ctrlgrad 0
  p19:gp9                     		;spoiler (echo)
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  d6
  p19:gp9                     		;spoiler (echo)
  d16 pl0:f1
  (p11:sp11 ph4:r):f1		; flipback(+x): -z -> +y
  d12 pl1:f1
  (p21 ph2):f3
  d13
  (p1 ph2):f1
  d4
  p30:gp6*diff                     	;gradient decoding
  d16
  (center (p2 ph2):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient decoding
  d16
  d4
# 142 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
; Watergate detection

  TAU
  10u pl18:f1
  p16:gp1
  d16
  p27*0.231 ph7
  d19*2
  p27*0.692 ph7
  d19*2
  p27*1.462 ph7
  d19*2
  p27*1.462 ph8
  d19*2
  p27*0.692 ph8
  d19*2
  p0*0.231 ph8
  6u
  p16:gp1
  d16 pl16:f3

  4u setnmr3^0 setnmr0^34^32^33 ctrlgrad 7
  go=2 ph31 cpd3:f3
  4u do:f3
  d11 wr #0 if #0 zd igrad diff
  lo to 3 times td1
  d11 rf #0
  lo to 4 times td0
exit
# 173 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
ph1= 1
ph2= 2
ph3= 3
ph4= 0
ph5= 1 3
ph6= 1 1 3 3
ph7= 3 3 3 3 0 0 0 0 1 1 1 1 2 2 2 2
ph8= 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0
ph9= 2
ph29=0
ph31=0 2 2 0 2 0 0 2 0 2 2 0 2 0 0 2


;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl16: f3 channel - power level for CPD/BB decoupling
;pl18: f1 channel - high power pulse, fine-tuning for watergate
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p21 : f3 channel -  90 degree high power pulse
;p22 : f3 channel - 180 degree high power pulse
;p11 : f1 channel - water flipdown/back [1-2 ms]
;p27: f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p0 : f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p30 : encode/decode gradient [small delta = 2*p30]
;p16 : watergate gradient
;p19 : spoiler gradient [500-1000 us]
;sp1 : f1 channel - power level for water flipdown
;sp11 : f1 channel - power level for water flipback
;spnam1 : sinc1.1000
;spnam11 : sinc1.1000
;d1 : relaxation delay; 1-5 * T1
;d16 : gradient recovery delay [200usec]
;d19 : delay for binomial water suppression
;     d19 = (1/(2*d)), d = distance of next null (in Hz)
;d20 : diffusion delay (big delta)
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;cnst4: = J(NH)
;NS: 4 * n
;DS: 8
;td0: dimension of accumulation loop (no. of acqusition blocks)
;td1: number of experiments
# 218 "/home/waudbyc/pp_702/stebpgp1s19xn.4.cw"
;gpz0: d1 crusher [73.73 %]
;gpz1: Watergate [-53 %]
;gpz2: 2HzNz crush [17 %]
;gpz3: Nz crush [13 %]
;gpz4: Eqm Nz crush [11 %]
;gpz6: Diffusion [100 %]
;gpz8: 180 pair [9 %]
;gpz9: 180 pair [15 %]

;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam6: SMSQ10.100
;gpnam8: SMSQ10.100
;gpnam9: SMSQ10.100
