;$DIR=/opt/topspin/exp/stan/nmr/lists/pp/user/
;$CLASS=HighRes
;$DIM=2D
;   F1 -> 0q/2q evolution, F2 -> directly acquired
;$TYPE=heteronuclear correlation
;$COMMENT=dual channel broadband HMQC experiment
;   Rectangular pi rotations replaced with six-pulse SCRAM block (4 on I, 2 on S)
;      Block I:   (q) hmqc
;   Phase-sensitive using echo/antiecho method
;   Interval T(q) adjusted by d61, set T(q) + 1/|J| = 2/|JII| to initialize minimal homonuclear J modulation
;   Pulse field gradients for uncoupled I suppression during d2(q), c2(q), preacquisition delay
;   I : observe nucleus (f1)
;   S : evolve nucleus (f2)
; OPTIONS: Big J (-Dbgj), use when 1/|2J| < dgp to add final echo block accomodating preacq gradient pulse
; WARNING: This pulse sequence is provided only as a guide for experienced users to implement with due care. It may contain mistakes. Improper setting of parameters may cause damage to the spectrometer, probe, or sample. All protections have been removed! The authors nor their employers accept any responsibility for use of this experiment. Any copy or modification of this sequence should contain this header.

;ns 4-step phase cycle (2-step min)
;spnam7 I sweep pulse
;spnam8 S sweep pulse
;p1 I exc pulse (pl1)
;p4 S exc pulse (pl2)
;p6 S sto pulse (pl2)
;p7 I sweep pulse (a)
;p8 S sweep pulse (b)
;p16 gradient pulse (1 ms)
;pl1 I pulse power
;pl2 S pulse power
;pl12 decoupling power
;d0 initial t1 value
;d1 recycle delay
;d8 = 1/|8J|
;d16 gradient recovery delay
;d40 set at runtime
;d61 adds to each interpulse delay (adds 8*d61 to total time)
;gpz1 G; G = base gradient amplitude
;gpz2 = 2G/r; r = gamma_I/gamma_S
;zgoptns -Dbgj


define pulse j                ;displays targeted J (in Hz, listed as �sec)
 "j=1s/(8*d8)"
define delay dgp
 "dgp=p16+d16"
define delay dtj
 "dtj=4*d8-p4"
define delay dqc              ;scram hmqc 'c' delay
 "dqc=p8/2+d61"
define delay dqd              ;scram hmqc 'd' delay
 "dqd=2*d8+d61"
define delay dqe              ;scram hmqc 'e' delay -- nonincremented part
 "dqe=2*d8+d61"
define delay dqf              ;scram hmqc 'f' delay -- nonincremented part
 "dqf=p8/2+d61"
define delay dgc
 "dgc=dqc-dgp"
define delay dgd
 "dgd=dqd-dgp"
define delay initt            ;total initial (q) interval time + 1/|J|
 "initt=2*(dqc+dqd+dqe+dqf)+4*p7+2*p8+8*d8"

#ifndef bgj
define delay dsj
 "dsj=4*d8-p6"
define delay daq              ;refocusing gradient pulse to end of reconversion
 "daq=dsj-dgp-de"
#endif ;bgj

"in0=inf1"
"acqt0=0"


1  ze
   "j=j"                      ;show targeted j value in 'ased'
   10m
2  d1 do:f2
   "d40=d0/4"                 ;for 1/2/1 split t1 evolution
3  (p1 pl1 ph1):f1            ;I exc
   dtj
   (p4 pl2 ph4):f2            ;S exc
   dqc                        ;symmetric scram hmqc block: c, d, e, f, f, e, d, c
   (p7:sp7 ph0):f1
   dqd
   (p8:sp8 ph0):f2
   dqe
   d40
   (p7:sp7 ph0):f1
   dqf
   d40
   d40
   dqf
   (p7:sp7 ph0):f1
   d40
   dqe
   (p8:sp8 ph0):f2
   dgd
   p16:gp1
   d16
   (p7:sp7 ph0):f1
   p16:gp1
   d16
   dgc
   (p6 pl2 ph6):f2            ;S sto

#ifndef bgj
   p16:gp2*-1*EA              ;refocusing gradient pulse
   d16
   daq
#endif ;bgj
#ifdef bgj
   dsj                        ;exit hmqc block
   (p7:sp7 ph0):f1
   de                         ;enter echo shift block
   dgp
   (p7:sp7 ph0):f1
   p16:gp2*-1*EA              ;refocusing gradient pulse
   d16
#endif ;bgj

   go=2 ph31 cpds2:f2 finally do:f2
   d1 do:f2 mc #0 to 2 F1EA(calgrad(EA), caldel(d0))
exit


ph0=          0
ph1=        {{0}*2}^2
ph4=          0 1
ph6=          2 1
ph31=        {2 0}^2