correct 3D NUWS ds

correct 3D NUWS ds

;b_hncocacbgp3d.2.nuws.cw
;with NUWS in 15N dimension (for highly folded spectra)
;NB acquistion order 312 not 321
;Chris Waudby Dec 2017
;
;avance-version (15/03/12)
;best-HN(CO)CACB
;3D sequence with
;   inverse correlation for triple resonance using multiple
;      inept transfer steps
;
;      F1(H) -> F3(N) -> F2(C=O) -> F2(Ca -> Cb,t1)
;            -> F2(C=O) -> F3(N,t2) -> F1(H,t3)
;
;on/off resonance Ca and C=O pulses using shaped pulse
;using shaped pulses for inversion and refocussing on f3
;phase sensitive (t1)
;phase sensitive using Echo/Antiecho (t2)
;using semi constant time in t2
;(use parameterset B_HNCOCACBGP3D)
;
;P. Schanda, H. v. Melckebeke & B. Brutscher,
;   J. Am. Chem. Soc. 128, 9042-9043 (2006)
;E. Lescop, P. Schanda & B. Brutscher,
;   J. Magn. Reson.  187 163-169 (2007)
;(S. Grzesiek & A. Bax, J. Magn. Reson. 96, 432 - 440 (1992))
;(J. Schleucher, M. Sattler & C. Griesinger,
;   Angew. Chem. Int. Ed. 32, 1489-1491 (1993))
;(L.E. Kay, G.Y. Xu & T. Yamazaki, J. Magn. Reson. A109,
;   129-133 (1994))
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

define loopcounter dsFlag
"dsFlag=1"

"d11=30m"

"d22=4.5m"
"d23=12m"
"d26=2.7m"

#   ifdef LABEL_CB
"d28=7.2m"
#   else
"d28=3.6m"
#   endif /*LABEL_CB*/

"p29=250u"

#   ifdef CALC_SP
"p41=(bwfac25/(cnst55*cnst51*bf1))*1000000"
"spw25=plw1/((p41*90.0)/(p1*totrot25))*((p41*90.0)/(p1*totrot25))*(integfac25*integfac25)"
"spw27=plw1/((p41*90.0)/(p1*totrot27))*((p41*90.0)/(p1*totrot27))*(integfac27*integfac27)"
"spoal25=1"
"spoal27=0"

"p42=(bwfac26/(cnst55*cnst52*bf1))*1000000"
"spw26=plw1/((p42*90.0)/(p1*totrot26))*((p42*90.0)/(p1*totrot26))*(integfac26*integfac26)"
"spoal26=0.5"

"p43=(bwfac28/(cnst55*cnst53*bf1))*1000000"
"spw28=plw1/((p43*90.0)/(p1*totrot28))*((p43*90.0)/(p1*totrot28))*(integfac28*integfac28)"
"spw29=plw1/((p43*90.0)/(p1*totrot29))*((p43*90.0)/(p1*totrot29))*(integfac29*integfac29)"
"spoal28=1"
"spoal29=0"
#   endif /*CALC_SP*/

"d0=3u"
"d10=3u"
"d29=3u"
"d30=d23-p43-4u-p21*4/PI"

"in0=inf1/2"
"in10=inf2/2"

"FACTOR2=d30*10000000*2/td2"
"INCR2=FACTOR2/10000000"

"if ( INCR2 > in10 ) { in30 = in10; } else { in30 = INCR2; }"
"if ( INCR2 > in10 ) { in29 = 0; } else { in29=in10-INCR2; }"

"TAU=larger(p14,p44)"

"DELTA=d0*2+larger(TAU,p56)-TAU"
"DELTA1=d26-p29-d16-p41*cnst41-larger(p42,p56)/2"
"DELTA2=d23-d26-p44-p16-d16-p14-d29"
"DELTA3=d26-p19-d16-p42/2"
"DELTA4=d26-p29-d16-p43*cnst43-larger(p42,p56)/2"
"DELTA5=p16+d16+de+8u"
"DELTA6=d23-larger(p42,p57)/2"
"DELTA7=d23-larger(p42,p57)/2-p44-d26"
"DELTA8=d26-p14-d10"
"DELTA9=d22-p14-4u"

"spoff2=0"
"spoff3=0"
"spoff5=bf2*((cnst22-cnst21)/1000000)"
"spoff7=bf2*((cnst21-cnst23)/1000000)"
"spoff8=0"

"spoff25=bf1*(cnst54/1000000)-o1"
"spoff26=bf1*(cnst54/1000000)-o1"
"spoff27=bf1*(cnst54/1000000)-o1"
"spoff28=bf1*(cnst54/1000000)-o1"
"spoff29=bf1*(cnst54/1000000)-o1"
"spoff30=0"

; number of complex points
"l3=td1/2"
"l6=td2/2"

aqseq 312

"acqt0=0"
baseopt_echo

1 d11 ze
  d11 pl26:f3
2 d11 do:f3
3 d1 fq=cnst21(bf ppm):f2
  50u UNBLKGRAD

  (p41:sp25 ph1)
  p29:gp3
  d16
  DELTA1
  (center (p42:sp26 ph1) (p56:sp39 ph1):f3 )
  DELTA1
  p29:gp3
  d16
  (p41:sp27 ph2):f1

  p16:gp4
  d16 pl3:f3

  (p21 ph1):f3
  DELTA6
  (center (p14:sp3 ph1):f2 (p57:sp40 ph1):f3 )
  DELTA7
  (p44:sp30 ph1)
  d26 pl3:f3
  (p21 ph1):f3
  (p44:sp30 ph1)

  p16:gp5
  d16

  (p13:sp2 ph3):f2
  4u
  (p14:sp5 ph1):f2
  DELTA9
  (p14:sp3 ph1):f2
  4u
  (p14:sp5 ph1):f2
  DELTA9
  (p13:sp8 ph2):f2

  4u
  30u fq=cnst23(bf ppm):f2

  (p13:sp2 ph4):f2
  d28
  (p14:sp3 ph1):f2
  d28
  (p13:sp8 ph2):f2
  d0
  (center (p44:sp30 ph1) (p14:sp7 ph1):f2 (p56:sp39 ph7):f3 )
  d0
  4u
  (p14:sp3 ph1):f2
  DELTA
  (center (p44:sp30 ph1) (p14:sp7 ph1):f2 )
  4u
  (p13:sp2 ph9):f2
  d28
  (p14:sp3 ph1):f2
  d28
  (p13:sp8 ph10):f2

  4u
  30u fq=cnst21(bf ppm):f2

  (p13:sp2 ph2):f2
  DELTA9
  (p14:sp5 ph1):f2
  4u
  (p14:sp3 ph1):f2
  DELTA9
  (p14:sp5 ph1):f2
  4u
  (p13:sp8 ph1):f2

  p16:gp6
  d16 pl3:f3

  (p44:sp30 ph1)
  (p21 ph8):f3
  2u
  (p56:sp39 ph1):f3
  d10
  (p14:sp5 ph1):f2
  DELTA8
  (p44:sp30 ph1)
  DELTA2
  p16:gp1*EA
  d16
  (p14:sp3 ph1):f2
  d29
  (p56:sp39 ph7):f3
  d30
  2u pl3:f3
  (p43:sp28 ph1)
  (p21 ph5):f3
  p19:gp7
  d16
  DELTA3
  (center (p42:sp26 ph1) (p57:sp40 ph1):f3 )
  DELTA3
  p19:gp7
  d16 pl3:f3
  (p21 ph6):f3

  (p43:sp29 ph2)
  p29:gp8
  d16
  DELTA4
  (center (p42:sp26 ph1) (p56:sp39 ph1):f3 )
  DELTA4
  p29:gp8
  d16
  (p43:sp28 ph1)
  DELTA5
  (p42:sp26 ph1)
  4u
  p16:gp2
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3

; begin NUWS bit
  if "dsFlag==0" goto 10
  zd
  "dsFlag=0"
  goto 2  ; repeat following ds (without counting it as part of vclist)
10 4u

; repeat acquisition block according to schedule in vclist
  lo to 2 times c

; save data, reset scan counter
  4u do:f3
  d11 wr #0 if #0 zd

; 13C looping
  1u dp9
  1u dp10
  lo to 3 times 2
  1u id0
  1u ip9
  1u ip9
  lo to 3 times l3

; 15N looping (and NUWS incrementation)
  4u ivc
  1u rp9
  1u rp10
  1u rd0
  1u igrad EA
  1u ip6
  1u ip6
  lo to 3 times 2
  1u id10
  1u id29
  1u dd30
  1u ip8
  1u ip8
  1u ip31
  1u ip31
  lo to 3 times l6

;  d11 do:f3 mc #0 to 2
;     F1PH(calph(ph9, -90) & calph(ph10, -90), caldel(d0, +in0) & calph(ph9, +180))
;     F2EA(calgrad(EA) & calph(ph6, +180), caldel(d10, +in10) & caldel(d29, +in29) & caldel(d30, -in30) & calph(ph8, +180) & calph(ph31, +180))
;  TAU
exit

ph1=0
ph2=1
ph3=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph4=0
ph5=0 0 2 2
ph6=1 1 3 3
ph7=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph8=0
ph9=3 1
ph10=0 2 0 2 2 0 2 0
ph31=0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB low power decoupling
;sp2: f2 channel - shaped pulse  90 degree  (on resonance)
;sp3: f2 channel - shaped pulse 180 degree  (on resonance)
;sp5: f2 channel - shaped pulse 180 degree  (Ca off resonance)
;sp7: f2 channel - shaped pulse 180 degree  (C=O off resonance)
;sp8: f2 channel - shaped pulse  90 degree  (on resonance)
;                  for time reversed pulse
;sp25: f1 channel - shaped pulse  90 degree (Pc9_4_90.1000)
;sp26: f1 channel - shaped pulse 180 degree (Reburp.1000)
;sp27: f1 channel - shaped pulse  90 degree (Pc9_4_90.1000)
;                   for time reversed pulse
;sp28: f1 channel - shaped pulse  90 degree (Eburp2.1000)
;sp29: f1 channel - shaped pulse  90 degree (Eburp2tr.1000)
;                   for time reversed pulse
;sp30: f1 channel - shaped pulse 180 degree (Bip720,50,20.1)
;sp39: f3 channel - shaped pulse 180 degree (Bip720,50,20.1)
;sp40: f3 channel - shaped pulse 180 degree (Reburp.1000)
;p13: f2 channel -  90 degree shaped pulse
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse                         [1 msec]
;p19: gradient pulse 2                                 [500 usec]
;p21: f3 channel -  90 degree high power pulse
;p29: gradient pulse 3                                 [250 usec]
;p41: f1 channel -  90 degree shaped pulse for excitation
;                      Pc9_4_90.1000             (2.2ms at 600.13 MHz)
;p42: f1 channel - 180 degree shaped pulse for refocussing
;                      Reburp.1000               (1.4ms at 600.13 MHz)
;p43: f1 channel -  90 degree shaped pulse for excitation
;                      Eburp2.1000/Eburp2tr.1000 (1.7ms at 600.13 MHz)
;p44: f1 channel - 180 degree shaped pulse for refocussing
;                      Bip720,50,20.1            (200us at 600.13 MHz)
;p56: f3 channel - 180 degree shaped pulse for inversion
;                      Bip720,50,20.1            (500us at 600.13 MHz)
;p57: f3 channel - 180 degree shaped pulse for refocussing
;                      Reburp.1000               (1.6ms at 600.13 MHz)
;d0 : incremented delay (F1 in 3D)                     [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d10: incremented delay (F2 in 3D)                     [3 usec]
;d11: delay for disk I/O                               [30 msec]
;d16: delay for homospoil/gradient recovery
;d22: 1/(4J(COCa)                                      [4.5 msec]
;d23: 1/(4J(NCO)                                       [12 msec]
;d26: 1/(4J(NH)                                        [2.7 msec]
;d28: 1/(4J(CaCb)                                      [3.6 msec or 7.2 msec]
;d29: incremented delay (F2 in 3D)                     [3 usec]
;d30: decremented delay (F2 in 3D) = d23-p43-4u-p21*4/PI
;cnst21: CO chemical shift (offset, in ppm)
;cnst22: Calpha chemical shift (offset, in ppm)
;cnst23: Caliphatic chemical shift (offset, in ppm)
;cnst41: compensation of chemical shift evolution during p41
;           Pc9_4_90.1000: 0.529
;cnst43: compensation of chemical shift evolution during p43
;           Eburp2.1000: 0.5
;cnst51: scaling factor for p41 to compensate for transition region
;           Pc9_4_90.1000: 1.172
;cnst52: scaling factor for p42 to compensate for transition region
;           Reburp.1000: 1.426
;cnst53: scaling factor for p43 to compensate for transition region
;           Eburp2.1000: 1.000
;cnst54: H(N) chemical shift (offset, in ppm)
;cnst55: H(N) bandwidth (in ppm)
;o2p: Caliphatic chemical shift (cnst23)
;inf1: 1/SW(Cali) = 2 * DW(Cali)
;inf2: 1/SW(N) = 2 * DW(N)
;in0: 1/(2 * SW(Cali)) =  DW(Cali)
;nd0: 2
;in10: 1/(2 * SW(N)) = DW(N)
;nd10: 2
;in29: = (1 - k2) * in10
;in30: = k2 * in10
;ns: 8 * n
;ds: >= 16
;aq: <= 50 msec
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI (or TPPI) in F1
;FnMODE: echo-antiecho in F2
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 80%
;gpz2: 8.1%
;gpz3: 11%
;gpz4: 70%
;gpz5: 40%
;gpz6: 75%
;gpz7: 29%
;gpz8: 17%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100
;gpnam7: SMSQ10.50
;gpnam8: SMSQ10.32

                                          ;preprocessor-flags-start
;LABEL_CB: for Cb only start experiment with
;             option -DLABEL_CB (eda: ZGOPTNS)
;CALC_SP: for calculation of all bandselective Proton pulses based on cnst54 and cnst55
;             option -DCALC_SP (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;$Id: b_hncocacbgp3d.2,v 1.1.2.2 2015/03/12 17:07:07 ber Exp $

;b_hncocacbgp3d.2.nuws.cw
;with NUWS in 15N dimension (for highly folded spectra)
;NB acquistion order 312 not 321
;Chris Waudby Dec 2017
;
;avance-version (15/03/12)
;best-HN(CO)CACB
;3D sequence with
;   inverse correlation for triple resonance using multiple
;      inept transfer steps
;
;      F1(H) -> F3(N) -> F2(C=O) -> F2(Ca -> Cb,t1)
;            -> F2(C=O) -> F3(N,t2) -> F1(H,t3)
;
;on/off resonance Ca and C=O pulses using shaped pulse
;using shaped pulses for inversion and refocussing on f3
;phase sensitive (t1)
;phase sensitive using Echo/Antiecho (t2)
;using semi constant time in t2
;(use parameterset B_HNCOCACBGP3D)
;
;P. Schanda, H. v. Melckebeke & B. Brutscher,
;   J. Am. Chem. Soc. 128, 9042-9043 (2006)
;E. Lescop, P. Schanda & B. Brutscher,
;   J. Magn. Reson.  187 163-169 (2007)
;(S. Grzesiek & A. Bax, J. Magn. Reson. 96, 432 - 440 (1992))
;(J. Schleucher, M. Sattler & C. Griesinger,
;   Angew. Chem. Int. Ed. 32, 1489-1491 (1993))
;(L.E. Kay, G.Y. Xu & T. Yamazaki, J. Magn. Reson. A109,
;   129-133 (1994))
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

define loopcounter dsFlag
"dsFlag=1"

"d11=30m"

"d22=4.5m"
"d23=12m"
"d26=2.7m"

#   ifdef LABEL_CB
"d28=7.2m"
#   else
"d28=3.6m"
#   endif /*LABEL_CB*/

"p29=250u"

#   ifdef CALC_SP
"p41=(bwfac25/(cnst55*cnst51*bf1))*1000000"
"spw25=plw1/((p41*90.0)/(p1*totrot25))*((p41*90.0)/(p1*totrot25))*(integfac25*integfac25)"
"spw27=plw1/((p41*90.0)/(p1*totrot27))*((p41*90.0)/(p1*totrot27))*(integfac27*integfac27)"
"spoal25=1"
"spoal27=0"

"p42=(bwfac26/(cnst55*cnst52*bf1))*1000000"
"spw26=plw1/((p42*90.0)/(p1*totrot26))*((p42*90.0)/(p1*totrot26))*(integfac26*integfac26)"
"spoal26=0.5"

"p43=(bwfac28/(cnst55*cnst53*bf1))*1000000"
"spw28=plw1/((p43*90.0)/(p1*totrot28))*((p43*90.0)/(p1*totrot28))*(integfac28*integfac28)"
"spw29=plw1/((p43*90.0)/(p1*totrot29))*((p43*90.0)/(p1*totrot29))*(integfac29*integfac29)"
"spoal28=1"
"spoal29=0"
#   endif /*CALC_SP*/

"d0=3u"
"d10=3u"
"d29=3u"
"d30=d23-p43-4u-p21*4/PI"

"in0=inf1/2"
"in10=inf2/2"

"FACTOR2=d30*10000000*2/td2"
"INCR2=FACTOR2/10000000"

"if ( INCR2 > in10 ) { in30 = in10; } else { in30 = INCR2; }"
"if ( INCR2 > in10 ) { in29 = 0; } else { in29=in10-INCR2; }"

"TAU=larger(p14,p44)"

"DELTA=d0*2+larger(TAU,p56)-TAU"
"DELTA1=d26-p29-d16-p41*cnst41-larger(p42,p56)/2"
"DELTA2=d23-d26-p44-p16-d16-p14-d29"
"DELTA3=d26-p19-d16-p42/2"
"DELTA4=d26-p29-d16-p43*cnst43-larger(p42,p56)/2"
"DELTA5=p16+d16+de+8u"
"DELTA6=d23-larger(p42,p57)/2"
"DELTA7=d23-larger(p42,p57)/2-p44-d26"
"DELTA8=d26-p14-d10"
"DELTA9=d22-p14-4u"

"spoff2=0"
"spoff3=0"
"spoff5=bf2*((cnst22-cnst21)/1000000)"
"spoff7=bf2*((cnst21-cnst23)/1000000)"
"spoff8=0"

"spoff25=bf1*(cnst54/1000000)-o1"
"spoff26=bf1*(cnst54/1000000)-o1"
"spoff27=bf1*(cnst54/1000000)-o1"
"spoff28=bf1*(cnst54/1000000)-o1"
"spoff29=bf1*(cnst54/1000000)-o1"
"spoff30=0"

; number of complex points
"l3=td1/2"
"l6=td2/2"

aqseq 312

"acqt0=0"
baseopt_echo

1 d11 ze
  d11 pl26:f3
2 d11 do:f3
3 d1 fq=cnst21(bf ppm):f2
  50u UNBLKGRAD

  (p41:sp25 ph1)
  p29:gp3
  d16
  DELTA1
  (center (p42:sp26 ph1) (p56:sp39 ph1):f3 )
  DELTA1
  p29:gp3
  d16
  (p41:sp27 ph2):f1

  p16:gp4
  d16 pl3:f3

  (p21 ph1):f3
  DELTA6
  (center (p14:sp3 ph1):f2 (p57:sp40 ph1):f3 )
  DELTA7
  (p44:sp30 ph1)
  d26 pl3:f3
  (p21 ph1):f3
  (p44:sp30 ph1)

  p16:gp5
  d16

  (p13:sp2 ph3):f2
  4u
  (p14:sp5 ph1):f2
  DELTA9
  (p14:sp3 ph1):f2
  4u
  (p14:sp5 ph1):f2
  DELTA9
  (p13:sp8 ph2):f2

  4u
  30u fq=cnst23(bf ppm):f2

  (p13:sp2 ph4):f2
  d28
  (p14:sp3 ph1):f2
  d28
  (p13:sp8 ph2):f2
  d0
  (center (p44:sp30 ph1) (p14:sp7 ph1):f2 (p56:sp39 ph7):f3 )
  d0
  4u
  (p14:sp3 ph1):f2
  DELTA
  (center (p44:sp30 ph1) (p14:sp7 ph1):f2 )
  4u
  (p13:sp2 ph9):f2
  d28
  (p14:sp3 ph1):f2
  d28
  (p13:sp8 ph10):f2

  4u
  30u fq=cnst21(bf ppm):f2

  (p13:sp2 ph2):f2
  DELTA9
  (p14:sp5 ph1):f2
  4u
  (p14:sp3 ph1):f2
  DELTA9
  (p14:sp5 ph1):f2
  4u
  (p13:sp8 ph1):f2

  p16:gp6
  d16 pl3:f3

  (p44:sp30 ph1)
  (p21 ph8):f3
  2u
  (p56:sp39 ph1):f3
  d10
  (p14:sp5 ph1):f2
  DELTA8
  (p44:sp30 ph1)
  DELTA2
  p16:gp1*EA
  d16
  (p14:sp3 ph1):f2
  d29
  (p56:sp39 ph7):f3
  d30
  2u pl3:f3
  (p43:sp28 ph1)
  (p21 ph5):f3
  p19:gp7
  d16
  DELTA3
  (center (p42:sp26 ph1) (p57:sp40 ph1):f3 )
  DELTA3
  p19:gp7
  d16 pl3:f3
  (p21 ph6):f3

  (p43:sp29 ph2)
  p29:gp8
  d16
  DELTA4
  (center (p42:sp26 ph1) (p56:sp39 ph1):f3 )
  DELTA4
  p29:gp8
  d16
  (p43:sp28 ph1)
  DELTA5
  (p42:sp26 ph1)
  4u
  p16:gp2
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3

; begin NUWS bit
  if "dsFlag==0" goto 10
  zd
  "dsFlag=0"
10 4u

; repeat acquisition block according to schedule in vclist
  lo to 2 times c

; save data, reset scan counter
  4u do:f3
  d11 wr #0 if #0 zd

; 13C looping
  1u dp9
  1u dp10
  lo to 3 times 2
  1u id0
  1u ip9
  1u ip9
  lo to 3 times l3

; 15N looping (and NUWS incrementation)
  4u ivc
  1u rp9
  1u rp10
  1u rd0
  1u igrad EA
  1u ip6
  1u ip6
  lo to 3 times 2
  1u id10
  1u id29
  1u dd30
  1u ip8
  1u ip8
  1u ip31
  1u ip31
  lo to 3 times l6

;  d11 do:f3 mc #0 to 2
;     F1PH(calph(ph9, -90) & calph(ph10, -90), caldel(d0, +in0) & calph(ph9, +180))
;     F2EA(calgrad(EA) & calph(ph6, +180), caldel(d10, +in10) & caldel(d29, +in29) & caldel(d30, -in30) & calph(ph8, +180) & calph(ph31, +180))
;  TAU
exit

ph1=0
ph2=1
ph3=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph4=0
ph5=0 0 2 2
ph6=1 1 3 3
ph7=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph8=0
ph9=3 1
ph10=0 2 0 2 2 0 2 0
ph31=0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB low power decoupling
;sp2: f2 channel - shaped pulse  90 degree  (on resonance)
;sp3: f2 channel - shaped pulse 180 degree  (on resonance)
;sp5: f2 channel - shaped pulse 180 degree  (Ca off resonance)
;sp7: f2 channel - shaped pulse 180 degree  (C=O off resonance)
;sp8: f2 channel - shaped pulse  90 degree  (on resonance)
;                  for time reversed pulse
;sp25: f1 channel - shaped pulse  90 degree (Pc9_4_90.1000)
;sp26: f1 channel - shaped pulse 180 degree (Reburp.1000)
;sp27: f1 channel - shaped pulse  90 degree (Pc9_4_90.1000)
;                   for time reversed pulse
;sp28: f1 channel - shaped pulse  90 degree (Eburp2.1000)
;sp29: f1 channel - shaped pulse  90 degree (Eburp2tr.1000)
;                   for time reversed pulse
;sp30: f1 channel - shaped pulse 180 degree (Bip720,50,20.1)
;sp39: f3 channel - shaped pulse 180 degree (Bip720,50,20.1)
;sp40: f3 channel - shaped pulse 180 degree (Reburp.1000)
;p13: f2 channel -  90 degree shaped pulse
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse                         [1 msec]
;p19: gradient pulse 2                                 [500 usec]
;p21: f3 channel -  90 degree high power pulse
;p29: gradient pulse 3                                 [250 usec]
;p41: f1 channel -  90 degree shaped pulse for excitation
;                      Pc9_4_90.1000             (2.2ms at 600.13 MHz)
;p42: f1 channel - 180 degree shaped pulse for refocussing
;                      Reburp.1000               (1.4ms at 600.13 MHz)
;p43: f1 channel -  90 degree shaped pulse for excitation
;                      Eburp2.1000/Eburp2tr.1000 (1.7ms at 600.13 MHz)
;p44: f1 channel - 180 degree shaped pulse for refocussing
;                      Bip720,50,20.1            (200us at 600.13 MHz)
;p56: f3 channel - 180 degree shaped pulse for inversion
;                      Bip720,50,20.1            (500us at 600.13 MHz)
;p57: f3 channel - 180 degree shaped pulse for refocussing
;                      Reburp.1000               (1.6ms at 600.13 MHz)
;d0 : incremented delay (F1 in 3D)                     [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d10: incremented delay (F2 in 3D)                     [3 usec]
;d11: delay for disk I/O                               [30 msec]
;d16: delay for homospoil/gradient recovery
;d22: 1/(4J(COCa)                                      [4.5 msec]
;d23: 1/(4J(NCO)                                       [12 msec]
;d26: 1/(4J(NH)                                        [2.7 msec]
;d28: 1/(4J(CaCb)                                      [3.6 msec or 7.2 msec]
;d29: incremented delay (F2 in 3D)                     [3 usec]
;d30: decremented delay (F2 in 3D) = d23-p43-4u-p21*4/PI
;cnst21: CO chemical shift (offset, in ppm)
;cnst22: Calpha chemical shift (offset, in ppm)
;cnst23: Caliphatic chemical shift (offset, in ppm)
;cnst41: compensation of chemical shift evolution during p41
;           Pc9_4_90.1000: 0.529
;cnst43: compensation of chemical shift evolution during p43
;           Eburp2.1000: 0.5
;cnst51: scaling factor for p41 to compensate for transition region
;           Pc9_4_90.1000: 1.172
;cnst52: scaling factor for p42 to compensate for transition region
;           Reburp.1000: 1.426
;cnst53: scaling factor for p43 to compensate for transition region
;           Eburp2.1000: 1.000
;cnst54: H(N) chemical shift (offset, in ppm)
;cnst55: H(N) bandwidth (in ppm)
;o2p: Caliphatic chemical shift (cnst23)
;inf1: 1/SW(Cali) = 2 * DW(Cali)
;inf2: 1/SW(N) = 2 * DW(N)
;in0: 1/(2 * SW(Cali)) =  DW(Cali)
;nd0: 2
;in10: 1/(2 * SW(N)) = DW(N)
;nd10: 2
;in29: = (1 - k2) * in10
;in30: = k2 * in10
;ns: 8 * n
;ds: >= 16
;aq: <= 50 msec
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI (or TPPI) in F1
;FnMODE: echo-antiecho in F2
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 80%
;gpz2: 8.1%
;gpz3: 11%
;gpz4: 70%
;gpz5: 40%
;gpz6: 75%
;gpz7: 29%
;gpz8: 17%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100
;gpnam7: SMSQ10.50
;gpnam8: SMSQ10.32

                                          ;preprocessor-flags-start
;LABEL_CB: for Cb only start experiment with
;             option -DLABEL_CB (eda: ZGOPTNS)
;CALC_SP: for calculation of all bandselective Proton pulses based on cnst54 and cnst55
;             option -DCALC_SP (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;$Id: b_hncocacbgp3d.2,v 1.1.2.2 2015/03/12 17:07:07 ber Exp $


CHG: updated signal descriptions

CHG: updated signal descriptions


corrected sfhmqcnoesysfhmqcgpph.4d.cw

corrected sfhmqcnoesysfhmqcgpph.4d.cw

;4D HCCH SFHMQC-NOESY-SFHMQC
;for methyl-methyl NOES
;Option for NUS using Topspin 3
;Derived from hmqcnoesyhmqcccgpphpr.jk
;Chris W, July 2018

;F1(H) -> F2(C[mq],t1) ---NOE--> F1(H) -> F2(C[mq],t2) -> F1(H,t3)
;
;Indirect evolution order is t2, t1 (13Cdir, 13Cnoe)
;Uses half-dwell first-point delay by default in all indirect dims
;Option for off-res presat
;Options for 2D planes in each 13C dim
;  (set both to get 1D or 2D HH plane with no 13C phase evolution)
;Removal of 13C equilibrium magnetisation
;Delays adjusted for zero first-order phase correction in acqusition dim

;$CLASS=HighRes
;$DIM=4D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d11=45m" ; for disk access

;------------indirect 1H dim (F1)
"in0=inf1/2"
"d0=in0/2-p3"

;------------options for first (in transfer pathway) 13C dim (F2)
"in10=inf2/2"		; first 13C dim (NB two d10 delays present)
"d10=in10/2"

;------------options for third (in transfer pathway) 13C dim (F3)
"in30=inf3"		; second 13C dim (NB only one d30 delay present)
"d30=in30/2-p3*4/3.1415"

; place pulses on-resonance
;"spoff23=bf1*(cnst19/1000000)-o1"
;"spoff24=bf1*(cnst19/1000000)-o1"
;"spoff25=bf1*(cnst19/1000000)-o1"

"TAU=d8-p16*2-d16*2-p3-8u"  ; noe mixing time

; delays for first SFHMQC
"d5=d2-p41*cnst39-4u-p16-d16"
"DELTA1=d5+p3+p4-p40*0.5"

; delays for second SFHMQC
"DELTA2=d2-p16-d16-p39*cnst39"
"DELTA3=p39*cnst39-de-4u"
"acqt0=de"

;aqseq 4321	; for info only

1 ze
  d11 pl12:f2
  4u BLKGRAD
2 d11 do:f2
  d1 pl2:f2
  50u UNBLKGRAD

;-------------------------kill equm 13C magnetisation

  (p3 ph1):f2
  4u
  p16:gp1
  d16*2

;-------------------------start first 13C HMQC element

  (p41:sp25 ph11):f1
  4u
  p16:gp2
  d16

  ; 1H F1 and 13C F2 evolution (MQ)
  (lalign
    (DELTA1 d0 d0 d10 p40:sp24 ph2):f1
    (d5 p3 ph12 d0 p4 ph1 d0 d10 d10 p3 ph1 d5):f2
  )

  4u
  p16:gp2
  d16
  (p41:sp25 ph1):f1

;------------------------start NOE period
  4u
  p16:gp3*0.71
  d16
  (p3 ph1):f2
  4u
  p16:gp3
  d16

  TAU

;------------------------start second 13C HMQC element
  (p39:sp23 ph1):f1
  p16:gp4
  d16

  (center (p40:sp24 ph2):f1 (DELTA2 p3 ph13 d30 p3 ph1 DELTA2):f2 )

  DELTA3
  p16:gp4
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

#ifndef NUWS
  d11 do:f2 mc #0 to 2
    F3PH(ip13, id30)
	  F2PH(rp13 & rd30 & ip12, id10)
	  F1PH(rp13 & rd30 & rp12 & rd10 & ip11, id0)
#else
  d11 do:f2 mc #0 to 2
	  F1PH(calph(ph11), caldel(d0))
	  F2PH(calph(ph12), caldel(d10))
	  F3PH(calph(ph13), caldel(d30))
#endif /*NUS*/
  4u BLKGRAD

exit

ph1= 0
ph2= 1
ph11=0
ph12=0 2
ph13=0 0 2 2
ph31=0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p16: homospoil/gradient pulse                       [1 msec]
;p19: second gradient pulse                          [250 usec]
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (4D)
;d10: incremented delay (4D)
;d20: decremented delay (4D)
;d28: incremented delay (4D)
;d30: incremented delay (4D)
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d8 : mixing time
;d11: delay for disk I/O                             [45 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(H)
;inf2: 1/SW(C) = 2 * DW(C)
;inf3: 1/SW(C) = 2 * DW(C)
;in0: 1/(2 * SW(C)) = DW(C)
;in10: 1/(2 * SW(C)) = DW(C)
;in30: 1/(2 * SW(H)) = DW(H)
;nd0: 2
;nd10: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI (or States) in F1
;FnMODE: States-TPPI (or States) in F2
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 31%
;gpz2: 29%
;gpz3: 23%
;gpz4: 13%
;gpz5: 43%
;gpz6: 19%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SINE.50
;gpnam3: SINE.100
;gpnam4: SINE.100
;gpnam5: SINE.50
;gpnam6: SINE.100

                                          ;preprocessor-flags-start
;NUS: for non-uniform sampling (Topspin 3)
                                          ;preprocessor-flags-end

;4D HCCH SFHMQC-NOESY-SFHMQC
;for methyl-methyl NOES
;Option for NUS using Topspin 3
;Derived from hmqcnoesyhmqcccgpphpr.jk
;Chris W, July 2018

;F1(H) -> F2(C[mq],t1) ---NOE--> F1(H) -> F2(C[mq],t2) -> F1(H,t3)
;
;Indirect evolution order is t2, t1 (13Cdir, 13Cnoe)
;Uses half-dwell first-point delay by default in all indirect dims
;Option for off-res presat
;Options for 2D planes in each 13C dim
;  (set both to get 1D or 2D HH plane with no 13C phase evolution)
;Removal of 13C equilibrium magnetisation
;Delays adjusted for zero first-order phase correction in acqusition dim

;$CLASS=HighRes
;$DIM=4D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d11=45m" ; for disk access

;------------indirect 1H dim (F1)
"in0=inf1/2"
"d0=in0/2-p3"

;------------options for first (in transfer pathway) 13C dim (F2)
"in10=inf2/2"		; first 13C dim (NB two d10 delays present)
"d10=in10/2-p3*4/3.1415"

;------------options for third (in transfer pathway) 13C dim (F3)
"in30=inf3"		; second 13C dim (NB only one d30 delay present)
"d30=in30/2-p3*4/3.1415"

"spoff23=bf1*(cnst19/1000000)-o1"
"spoff24=bf1*(cnst19/1000000)-o1"
"spoff25=bf1*(cnst19/1000000)-o1"

"TAU=d8-p16*2-d16*2-p3-8u"  ; noe mixing time

; delays for first SFHMQC
"d5=d2-p39*cnst39-4u-p16-d16"
"DELTA1=d5+p3+p4-p40*0.5"

; delays for second SFHMQC
"DELTA2=d2-p16-d16-p39*cnst39"
"DELTA3=p39*cnst39-de-4u"
"acqt0=de"

;aqseq 4321	; for info only

1 ze
  d11 pl12:f2
  4u BLKGRAD
2 d11 do:f2
  d1
  50u UNBLKGRAD

;-------------------------kill equm 13C magnetisation

  (p3 ph1):f2
  4u
  p16:gp1
  d16*2

;-------------------------start first 13C HMQC element

  (p41:sp25 ph11):f1
  4u
  p16:gp2
  d16

  ; 1H F1 and 13C F2 evolution (MQ)
  (lalign
    (DELTA1 2*d0 d10 p40:sp24 ph2):f1
    (d5 p3 ph12 d0 p4 ph1 d0 2*d10 p3 ph1 d5):f2
  )

  4u
  p16:gp2
  d16
  (p41:sp25 ph1):f1

;------------------------start NOE period
  4u
  p16:gp3*0.71
  d16
  (p3 ph1):f2
  4u
  p16:gp3
  d16

  TAU

;------------------------start second 13C HMQC element
  (p39:sp23 ph1):f1
  p16:gp4
  d16

  (center (p40:sp24 ph2):f1 (DELTA2 p3 ph13 d30 p3 ph1 DELTA2):f2 )

  DELTA3
  p16:gp4
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

#ifndef NUWS
  d11 do:f2 mc #0 to 2
    F3PH(ip13, id30)
	F2PH(rp13 & rd30 & ip12, id10)
	F1PH(rp13 & rd30 & rp12 & rd10 & ip11, id0)
#else
  d11 do:f2 mc #0 to 2
	F1PH(calph(ph11), caldel(d0))
	F2PH(calph(ph12), caldel(d10))
	F3PH(calph(ph13), caldel(d30))
#endif /*NUS*/
  4u BLKGRAD

exit

ph1= 0
ph2= 1
ph11=0
ph12=0 2
ph13=0 0 2 2
ph31=0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p16: homospoil/gradient pulse                       [1 msec]
;p19: second gradient pulse                          [250 usec]
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (4D)
;d10: incremented delay (4D)
;d20: decremented delay (4D)
;d28: incremented delay (4D)
;d30: incremented delay (4D)
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d8 : mixing time
;d11: delay for disk I/O                             [45 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(H)
;inf2: 1/SW(C) = 2 * DW(C)
;inf3: 1/SW(C) = 2 * DW(C)
;in0: 1/(2 * SW(C)) = DW(C)
;in10: 1/(2 * SW(C)) = DW(C)
;in30: 1/(2 * SW(H)) = DW(H)
;nd0: 2
;nd10: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI (or States) in F1
;FnMODE: States-TPPI (or States) in F2
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 31%
;gpz2: 29%
;gpz3: 23%
;gpz4: 13%
;gpz5: 43%
;gpz6: 19%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SINE.50
;gpnam3: SINE.100
;gpnam4: SINE.100
;gpnam5: SINE.50
;gpnam6: SINE.100

                                          ;preprocessor-flags-start
;NUS: for non-uniform sampling (Topspin 3)
                                          ;preprocessor-flags-end


add purge pulse to hsqcfpf3gpphwg_T2.cw

add purge pulse to hsqcfpf3gpphwg_T2.cw

;Renamed: hsqcfpf3gpphwg_t2.jk -> hsqcfpf3gpphwg_T2.jk, 3/10/2014
;
;For measuring amide proton T2s (use for PREs), Oct 2013
;Derived from hsqcfpf3gpphwg.3.2.jk
;
;J. Iwahara, C. Tang & G.M. Clore
;J. Magn. Reson. 184, 185-195 (2007)
;
;L.W. Donaldson, L.E. Kay et al
;J. Am. Chem. Soc. 123, 9843-9847 (2001)
;
;
;Option for 1D spectrum with no 15N shift evolution (-DONE_D)
;Delays adjusted for zero first-order phase correction
;Without refocusing for 0,0 phase correction
;Option for (180,-360) phase correction (default is (90,-180) phase corr.)
;Option for carbon decoupling
;Assumes p8 > p2
;With gradients during t1 to keep water along z
;With separate shape/power level for second water pulse in WATERGATE (flip-back)

;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

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

"d11=30m"
"d12=20u"
"d26=1s/(cnst4*4)"

"in0=inf2/4"

"DELTA1=d26-p16-d16-4u"
"DELTA2=d26-p19-d16-p11-d12-4u"
"DELTA3=d26-p19-d16-p11-d12-8u-de+0.63662*p1"

# ifndef ONE_D

# ifdef SINGLEDWELL
    "d0=in0-0.5*(10u+p1+0.63662*p21)"
# else
    "d0=in0/2-0.5*(10u+p1+0.63662*p21)"
# endif /*SINGLEDWELL*/

# endif /*ONE_D*/

# ifdef AMIDESEL
  "spoff24=bf1*(cnst19/1000000)-o1"
# endif /*AMIDESEL*/

aqseq 312

1 ze
  d11 pl16:f3
2 d11 do:f3

# ifdef LABEL_CN
  if "4*d0+p2-24u > p8"
  {
   d12
   "d60=d0+0.5*p1-0.25*p8"
  }
# endif /*LABEL_CN*/

  50u UNBLKGRAD
  p16:gp1		; crush all residual transverse magnetisation
  d16

# ifndef NOPROTCRUSH

;# ifndef WATERCRUSH
;    10u pl0:f1
;    (p11:sp1 ph10:r):f1	; flipdown(-x): +z -> +y
;# endif /*WATERCRUSH*/
;
;  10u pl1:f1
;  (p1 ph1):f1

; purge water before recycle delay
10u pl8:f1
2mp ph1
3mp ph2
10u pl1:f1

  4u
  p16:gp1*0.73		; crush 1H magnetisation at start of scan
  d16

# endif /*NOPROTCRUSH*/

  4u BLKGRAD
  d12
  "TAU=vd/4"

  d1

3 d12 pl1:f1 pl3:f3

  50u UNBLKGRAD
  (p21 ph1):f3
  4u
  p16:gp1*0.57
  d16*2

# ifdef AMIDESEL
  10u pl0:f1
  (p11:sp1 ph13:r):f1	; flipdown(-x/+x), +z -> +y/-y
  10u pl1:f1
# endif AMIDESEL

  (p1 ph11)		; +x/-x

;---------start relaxation/transfer period

# ifndef AMIDESEL
    5u
    5u gron0
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  4u
  p16*0.5:gp2
  d16
  (p22 ph6):f3
  4u
  p16*0.5:gp2*-1
  d16

# ifndef AMIDESEL
    5u
    5u gron0*-1
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  d26

  4u
  p16:gp3
  d16

# ifdef AMIDESEL
  10u pl0:f1
  (p40:sp24 ph12):f1
  10u pl1:f1
# else
  (p2 ph12)
# endif /*AMIDESEL*/

  4u
  p16:gp3
  d16

# ifndef AMIDESEL
    5u
    5u gron0
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  4u
  p16*0.5:gp2
  d16
  (p22 ph6):f3
  4u
  p16*0.5:gp2*-1
  d16

# ifndef AMIDESEL
    5u
    5u gron0*-1
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  d26

;---------end relaxation period

  (p1 ph2) 		; +y

  d12 pl0:f1
# ifdef AMIDESEL
  (p11:sp1 ph2:r):f1		; flipdown(+y), +x -> -z
# else
  (p11:sp1 ph8:r):f1		; flipdown(+x/-x), -y/+y -> -z
# endif /*AMIDESEL*/
  d12 pl1:f1

  p16:gp4
  d16

;--------------------start 15N shift evolution-------------------

# ifndef ONE_D

# ifdef LABEL_CN

  if "4*d0+p2-24u < p8"
  {
   (p21 ph3):f3
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p2 ph5):f1
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p21 ph4):f3
  }
  else
  {
  (p21 ph3):f3
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   ( center (p2 ph5):f1 (p8:sp13 ph1):f2 )
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   (p21 ph4):f3
   }

# else

  (p21 ph3):f3
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p2 ph5):f1
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p21 ph4):f3

# endif /*LABEL_CN*/

# else

  (center (p2 ph5):f1 (p21 ph3 6u p21 ph4):f3 )

# endif /*ONE_D*/

;---------------------end 15N shift evolution--------------------

  4u
  p16:gp6
  d16 pl0:f1
  (p11:sp1 ph7:r):f1	; flipdown(-x), +z -> +y
  4u
  4u pl1:f1

  (p1 ph1)
  4u
  p19:gp5
  d16 pl0:f1
  DELTA2
  (p11:sp1 ph7:r):f1    ; flipdown(-x), +z -> +y
  d12 pl1:f1
  (center (p2 ph1) (p22 ph1):f3 )
  d12 pl0:f1
  (p11:sp11 ph9:r):f1   ; flipback(-x), -y -> +z
  4u
  p19:gp5
  d16 pl16:f3
  DELTA3
  4u BLKGRAD

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1QF(ivd)
	F2PH(ip3, id0)
exit

ph1= 0
ph2= 1
ph3= 0 2
ph4= 0 0 0 0 2 2 2 2
ph5= 0 0 0 0 2 2 2 2
ph6= 0
ph7= 2
ph8= 0 0 2 2
ph9= 2
ph10=2
ph11=0 0 2 2
ph12=1 1 3 3
ph13=2 2 0 0
ph31=0 2 2 0 2 0 0 2

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl8: 1H purge power (ca. 10 kHz)
;pl16: f3 channel - power level for CPD/BB decoupling
;sp1: f1 channel - shaped pulse  90 degree (flip-down)
;sp11: f1 channel - shaped pulse  90 degree (flip-back)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;sp24: f1 channel - shaped pulse 180 degree (Reburp.1000)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: second homospoil/gradient pulse
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p40: f1 channel - 180 degree shaped pulse for refocusing
;                      Reburp.1000       (1679/2257 usec at 600 MHz)
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d26 : 1/(4J)YH
;cnst4: = J(YH)
;cnst19: H(N) chemical shift (offset, in ppm)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz0: 1-2%
;gpz1: 73.73%
;gpz2: 7%
;gpz3: 11%
;gpz4: 17%
;gpz5: 53%
;gpz6: 13%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100

                                          ;preprocessor-flags-start
;LABEL_CN: for C-13 and N-15 labeled samples start experiment with
;             option -DLABEL_CN (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;Renamed: hsqcfpf3gpphwg_t2.jk -> hsqcfpf3gpphwg_T2.jk, 3/10/2014
;
;For measuring amide proton T2s (use for PREs), Oct 2013
;Derived from hsqcfpf3gpphwg.3.2.jk
;
;J. Iwahara, C. Tang & G.M. Clore
;J. Magn. Reson. 184, 185-195 (2007)
;
;L.W. Donaldson, L.E. Kay et al
;J. Am. Chem. Soc. 123, 9843-9847 (2001)
;
;
;Option for 1D spectrum with no 15N shift evolution (-DONE_D)
;Delays adjusted for zero first-order phase correction
;Without refocusing for 0,0 phase correction
;Option for (180,-360) phase correction (default is (90,-180) phase corr.)
;Option for carbon decoupling
;Assumes p8 > p2
;With gradients during t1 to keep water along z
;With separate shape/power level for second water pulse in WATERGATE (flip-back)

;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

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

"d11=30m"
"d12=20u"
"d26=1s/(cnst4*4)"

"in0=inf2/4"

"DELTA1=d26-p16-d16-4u"
"DELTA2=d26-p19-d16-p11-d12-4u"
"DELTA3=d26-p19-d16-p11-d12-8u-de+0.63662*p1"

# ifndef ONE_D

# ifdef SINGLEDWELL
    "d0=in0-0.5*(10u+p1+0.63662*p21)"
# else
    "d0=in0/2-0.5*(10u+p1+0.63662*p21)"
# endif /*SINGLEDWELL*/

# endif /*ONE_D*/

# ifdef AMIDESEL
  "spoff24=bf1*(cnst19/1000000)-o1"
# endif /*AMIDESEL*/

aqseq 312

1 ze
  d11 pl16:f3
2 d11 do:f3

# ifdef LABEL_CN
  if "4*d0+p2-24u > p8"
  {
   d12
   "d60=d0+0.5*p1-0.25*p8"
  }
# endif /*LABEL_CN*/

  50u UNBLKGRAD
  p16:gp1		; crush all residual transverse magnetisation
  d16

# ifndef NOPROTCRUSH

# ifndef WATERCRUSH
    10u pl0:f1
    (p11:sp1 ph10:r):f1	; flipdown(-x): +z -> +y
# endif /*WATERCRUSH*/

  10u pl1:f1
  (p1 ph1):f1
  4u
  p16:gp1*0.73		; crush 1H magnetisation at start of scan
  d16

# endif /*NOPROTCRUSH*/

  4u BLKGRAD
  d12
  "TAU=vd/4"

  d1

3 d12 pl1:f1 pl3:f3

  50u UNBLKGRAD
  (p21 ph1):f3
  4u
  p16:gp1*0.57
  d16*2

# ifdef AMIDESEL
  10u pl0:f1
  (p11:sp1 ph13:r):f1	; flipdown(-x/+x), +z -> +y/-y
  10u pl1:f1
# endif AMIDESEL

  (p1 ph11)		; +x/-x

;---------start relaxation/transfer period

# ifndef AMIDESEL
    5u
    5u gron0
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  4u
  p16*0.5:gp2
  d16
  (p22 ph6):f3
  4u
  p16*0.5:gp2*-1
  d16

# ifndef AMIDESEL
    5u
    5u gron0*-1
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  d26

  4u
  p16:gp3
  d16

# ifdef AMIDESEL
  10u pl0:f1
  (p40:sp24 ph12):f1
  10u pl1:f1
# else
  (p2 ph12)
# endif /*AMIDESEL*/

  4u
  p16:gp3
  d16

# ifndef AMIDESEL
    5u
    5u gron0
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  4u
  p16*0.5:gp2
  d16
  (p22 ph6):f3
  4u
  p16*0.5:gp2*-1
  d16

# ifndef AMIDESEL
    5u
    5u gron0*-1
    TAU
    5u
    5u groff
# else
    20u
    TAU
# endif /*AMIDESEL*/

  d26

;---------end relaxation period

  (p1 ph2) 		; +y

  d12 pl0:f1
# ifdef AMIDESEL
  (p11:sp1 ph2:r):f1		; flipdown(+y), +x -> -z
# else
  (p11:sp1 ph8:r):f1		; flipdown(+x/-x), -y/+y -> -z
# endif /*AMIDESEL*/
  d12 pl1:f1

  p16:gp4
  d16

;--------------------start 15N shift evolution-------------------

# ifndef ONE_D

# ifdef LABEL_CN

  if "4*d0+p2-24u < p8"
  {
   (p21 ph3):f3
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p2 ph5):f1
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p21 ph4):f3
  }
  else
  {
  (p21 ph3):f3
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   ( center (p2 ph5):f1 (p8:sp13 ph1):f2 )
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   (p21 ph4):f3
   }

# else

  (p21 ph3):f3
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p2 ph5):f1
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p21 ph4):f3

# endif /*LABEL_CN*/

# else

  (center (p2 ph5):f1 (p21 ph3 6u p21 ph4):f3 )

# endif /*ONE_D*/

;---------------------end 15N shift evolution--------------------

  4u
  p16:gp6
  d16 pl0:f1
  (p11:sp1 ph7:r):f1	; flipdown(-x), +z -> +y
  4u
  4u pl1:f1

  (p1 ph1)
  4u
  p19:gp5
  d16 pl0:f1
  DELTA2
  (p11:sp1 ph7:r):f1    ; flipdown(-x), +z -> +y
  d12 pl1:f1
  (center (p2 ph1) (p22 ph1):f3 )
  d12 pl0:f1
  (p11:sp11 ph9:r):f1   ; flipback(-x), -y -> +z
  4u
  p19:gp5
  d16 pl16:f3
  DELTA3
  4u BLKGRAD

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1QF(ivd)
	F2PH(ip3, id0)
exit

ph1= 0
ph2= 1
ph3= 0 2
ph4= 0 0 0 0 2 2 2 2
ph5= 0 0 0 0 2 2 2 2
ph6= 0
ph7= 2
ph8= 0 0 2 2
ph9= 2
ph10=2
ph11=0 0 2 2
ph12=1 1 3 3
ph13=2 2 0 0
ph31=0 2 2 0 2 0 0 2

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;sp1: f1 channel - shaped pulse  90 degree (flip-down)
;sp11: f1 channel - shaped pulse  90 degree (flip-back)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;sp24: f1 channel - shaped pulse 180 degree (Reburp.1000)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: second homospoil/gradient pulse
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p40: f1 channel - 180 degree shaped pulse for refocusing
;                      Reburp.1000       (1679/2257 usec at 600 MHz)
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d26 : 1/(4J)YH
;cnst4: = J(YH)
;cnst19: H(N) chemical shift (offset, in ppm)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz0: 1-2%
;gpz1: 73.73%
;gpz2: 7%
;gpz3: 11%
;gpz4: 17%
;gpz5: 53%
;gpz6: 13%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100

                                          ;preprocessor-flags-start
;LABEL_CN: for C-13 and N-15 labeled samples start experiment with
;             option -DLABEL_CN (eda: ZGOPTNS)
                                          ;preprocessor-flags-end


noesyhsqcfpf3gpphwg.cw baseopt

noesyhsqcfpf3gpphwg.cw baseopt

;NOESY-15N HSQC (derived from hsqcfpf3gpphwg.3.2.jk)
;For 15N-labelled samples only (no 13C decoupling)
;With water flipback
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

"p2=p1*2"
"p22=p21*2"
"d11=30m"
"d12=20u"
;"d13=4u"
"d26=1s/(cnst4*4)"

"in0=inf1"
"in10=inf2/4"

"DELTA1=d26-p16-d16-4u"
"DELTA2=d26-p19-d16-p11-d12-4u"
"DELTA3=d26-p19-d16-p11-d12-8u-de+0.63662*p1"

"TAU=d8-p16-d16-p11-20u"

# ifdef H_SINGLEDWELL
    "d0=in0-1.27324*p1"
# else
    "d0=in0/2-1.27324*p1"
# endif /*H_SINGLEDWELL*/

# ifdef N_SINGLEDWELL
    "d10=in10-0.5*(10u+p1+0.63662*p21)"
# else
    "d10=in10/2-0.5*(10u+p1+0.63662*p21)"
# endif /*N_SINGLEDWELL*/

"acqt0=0"

aqseq 321

1 ze
  d11 pl16:f3
2 d11 do:f3

  d1

3 d12 pl1:f1 pl3:f3
  50u UNBLKGRAD

  (p21 ph1):f3
  4u
  p16:gp1
  d16
  (p21 ph2):f3
  4u
  p16:gp1*0.7
  d16*2

# ifndef NH_PLANE

    10u pl0:f1
    (p11:sp1 ph20:r):f1		; flipdown(-x/x), z -> y/-y
    10u pl1:f1

    if "d0+2*p1 < p22"
    {
      (p1 ph10 d0 p1 ph11):f1
    }
    else
    {
      (center (p1 ph10 d0 p1 ph11):f1 (p22 ph5):f3 )
    }

    10u pl0:f1
    (p11:sp11 ph21:r):f1	; flipback(-x/x), -y/y -> z
    10u pl1:f1

    TAU

    p16:gp2
    d16

# endif /*NH_PLANE*/

  (p1 ph1)
  4u
  p16:gp3
  d16
  DELTA1
  (center (p2 ph2) (p22 ph6):f3 )
  DELTA1
  4u
  p16:gp3
  d16
  (p1 ph2)

  4u pl0:f1
  (p11:sp1 ph8:r):f1	; flipdown(x), -y -> -z
  4u
  p16:gp4
  d16 pl1:f1

# ifdef HH_PLANE

    (p21 ph3):f3
    2u
    (p21 ph4):f3
    2u
    (p2 ph5):f1

# else

    (p21 ph3):f3
    2u
    d10 gron0
    d10 gron0*-1
    8u groff
    (p2 ph5):f1
    2u
    d10 gron0
    d10 gron0*-1
    8u groff
    (p21 ph4):f3

# endif /*HH_PLANE*/

  4u
  p16:gp6
  d16 pl0:f1
  (p11:sp1 ph7:r):f1	; flipdown(-x), z -> y
  4u
  4u pl1:f1

  (p1 ph1)
  4u
  p19:gp5
  d16 pl0:f1
  DELTA2
  (p11:sp1 ph7:r):f1	; flipdown(-x), z -> y
  d12 pl1:f1
  (center (p2 ph1) (p22 ph1):f3 )
  d12 pl0:f1
  (p11:sp11 ph9:r):f1	; flipback(-x), -y -> z
  4u
  p19:gp5
  d16 pl16:f3
  DELTA3
  4u BLKGRAD

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1PH(rp3 & rp6 & rd10 & ip11 & ip21, id0)
	F2PH(ip3 & ip6, id10)
exit

ph1=0
ph2=1
ph6=0
ph7=2
ph8=0
ph9=2

# ifndef NH_PLANE

ph3=0 2
ph4=0 0 0 0 2 2 2 2
ph5=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph10=0 0 2 2
ph11=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
ph20=2 2 0 0
ph21=2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
     0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ph31=0 2 2 0 2 0 0 2 0 2 2 0 2 0 0 2
     2 0 0 2 0 2 2 0 2 0 0 2 0 2 2 0

# else

ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 2 2 2 2
ph31=0 2 2 0

# endif /*NH_PLANE*/

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;sp1: f1 channel - shaped pulse  90 degree (flip-down)
;sp11: f1 channel - shaped pulse  90 degree (flip-back)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: second homospoil/gradient pulse
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;d10 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d8 : mixing time
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d26 : 1/(4J)NH
;cnst4: = J(NH)
;inf1: 1/SW(H) = 4 * DW(H)
;inf2: 1/SW(N) = 4 * DW(N)
;in0: 1/(2 * SW(H)) = DW(H)
;in10: 1/(2 * SW(N)) = DW(N)
;nd0: 4
;nd10: 4
;NS: 4 * n
;DS: 16
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI, TPPI, States or QSEQ in F1
;FnMODE: States-TPPI, TPPI, States or QSEQ in F2
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz0: 1-2%
;gpz1: 47%
;gpz2: 11%
;gpz3: 7%
;gpz4: 17%
;gpz5: 53%
;gpz6: 13%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100

;NOESY-15N HSQC (derived from hsqcfpf3gpphwg.3.2.jk)
;For 15N-labelled samples only (no 13C decoupling)
;With water flipback
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

"p2=p1*2"
"p22=p21*2"
"d11=30m"
"d12=20u"
;"d13=4u"
"d26=1s/(cnst4*4)"

"in0=inf1"
"in10=inf2/4"

"DELTA1=d26-p16-d16-4u"
"DELTA2=d26-p19-d16-p11-d12-4u"
"DELTA3=d26-p19-d16-p11-d12-8u-de+0.63662*p1"

"TAU=d8-p16-d16-p11-20u"

# ifdef H_SINGLEDWELL
    "d0=in0-1.27324*p1"
# else
    "d0=in0/2-1.27324*p1"
# endif /*H_SINGLEDWELL*/

# ifdef N_SINGLEDWELL
    "d10=in10-0.5*(10u+p1+0.63662*p21)"
# else
    "d10=in10/2-0.5*(10u+p1+0.63662*p21)"
# endif /*N_SINGLEDWELL*/

aqseq 321

1 ze
  d11 pl16:f3
2 d11 do:f3

  d1

3 d12 pl1:f1 pl3:f3
  50u UNBLKGRAD

  (p21 ph1):f3
  4u
  p16:gp1
  d16
  (p21 ph2):f3
  4u
  p16:gp1*0.7
  d16*2

# ifndef NH_PLANE

    10u pl0:f1
    (p11:sp1 ph20:r):f1		; flipdown(-x/x), z -> y/-y
    10u pl1:f1

    if "d0+2*p1 < p22"
    {
      (p1 ph10 d0 p1 ph11):f1
    }
    else
    {
      (center (p1 ph10 d0 p1 ph11):f1 (p22 ph5):f3 )
    }

    10u pl0:f1
    (p11:sp11 ph21:r):f1	; flipback(-x/x), -y/y -> z
    10u pl1:f1

    TAU

    p16:gp2
    d16

# endif /*NH_PLANE*/

  (p1 ph1)
  4u
  p16:gp3
  d16
  DELTA1
  (center (p2 ph2) (p22 ph6):f3 )
  DELTA1
  4u
  p16:gp3
  d16
  (p1 ph2)

  4u pl0:f1
  (p11:sp1 ph8:r):f1	; flipdown(x), -y -> -z
  4u
  p16:gp4
  d16 pl1:f1

# ifdef HH_PLANE

    (p21 ph3):f3
    2u
    (p21 ph4):f3
    2u
    (p2 ph5):f1

# else

    (p21 ph3):f3
    2u
    d10 gron0
    d10 gron0*-1
    8u groff
    (p2 ph5):f1
    2u
    d10 gron0
    d10 gron0*-1
    8u groff
    (p21 ph4):f3

# endif /*HH_PLANE*/

  4u
  p16:gp6
  d16 pl0:f1
  (p11:sp1 ph7:r):f1	; flipdown(-x), z -> y
  4u
  4u pl1:f1

  (p1 ph1)
  4u
  p19:gp5
  d16 pl0:f1
  DELTA2
  (p11:sp1 ph7:r):f1	; flipdown(-x), z -> y
  d12 pl1:f1
  (center (p2 ph1) (p22 ph1):f3 )
  d12 pl0:f1
  (p11:sp11 ph9:r):f1	; flipback(-x), -y -> z
  4u
  p19:gp5
  d16 pl16:f3
  DELTA3
  4u BLKGRAD

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1PH(rp3 & rp6 & rd10 & ip11 & ip21, id0)
	F2PH(ip3 & ip6, id10)
exit

ph1=0
ph2=1
ph6=0
ph7=2
ph8=0
ph9=2

# ifndef NH_PLANE

ph3=0 2
ph4=0 0 0 0 2 2 2 2
ph5=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph10=0 0 2 2
ph11=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
ph20=2 2 0 0
ph21=2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
     0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ph31=0 2 2 0 2 0 0 2 0 2 2 0 2 0 0 2
     2 0 0 2 0 2 2 0 2 0 0 2 0 2 2 0

# else

ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 2 2 2 2
ph31=0 2 2 0

# endif /*NH_PLANE*/

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;sp1: f1 channel - shaped pulse  90 degree (flip-down)
;sp11: f1 channel - shaped pulse  90 degree (flip-back)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: second homospoil/gradient pulse
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;d10 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d8 : mixing time
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d26 : 1/(4J)NH
;cnst4: = J(NH)
;inf1: 1/SW(H) = 4 * DW(H)
;inf2: 1/SW(N) = 4 * DW(N)
;in0: 1/(2 * SW(H)) = DW(H)
;in10: 1/(2 * SW(N)) = DW(N)
;nd0: 4
;nd10: 4
;NS: 4 * n
;DS: 16
;td1: number of experiments in F1
;td2: number of experiments in F2
;FnMODE: States-TPPI, TPPI, States or QSEQ in F1
;FnMODE: States-TPPI, TPPI, States or QSEQ in F2
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz0: 1-2%
;gpz1: 47%
;gpz2: 11%
;gpz3: 7%
;gpz4: 17%
;gpz5: 53%
;gpz6: 13%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100


adaptive_hsqcphpr.2d.cw tweaks

adaptive_hsqcphpr.2d.cw tweaks

;adaptive_hsqcphpr.2d
; full 2D spectrum
;
;based on hsqcphpr
;avance-version (07/04/04)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive
;with decoupling during acquisition
;
;G. Bodenhausen & D.J. Ruben, Chem. Phys. Lett. 69, 185 (1980)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"

"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf1"
"d0=in0/2-2*0.6366*p3" ; initial evolution time for 90/180 phase correction
"d20=in0/2" ; actual first evolution time accounting for 13C pulse durations

"d4=1s/(cnst2*4)"
"DELTA=d4-larger(p2,p4)/2-p16-d16-4u"

"acqt0=0.6366*p1"

1 ze
  d11 pl12:f2
2 d11 do:f2

  ; off-resonance presat
  30u pl9:f1
  30u fq=cnst21(bf hz):f1
  d1 cw:f1 ph1
  4u do:f1
  4u fq=0:f1
  d12 pl1:f1 pl2:f2 UNBLKGRAD

  ; purge 13C equilibrium magnetisation
  (p3 ph1):f2
  4u
  p16:gp5
  d16
  4u

  ; INEPT
  p1 ph1
  4u
  p16:gp1
  d16
  DELTA
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA
  p16:gp1
  d16
  4u
  (p1 ph2)

  ; zz-filter
  4u
  p16:gp2
  d16

  (p3 ph6):f2
  d0 ; 13C evolution
  (p3 ph7):f2

  ; zz-filter
  4u
  p16:gp3
  d16

  ; retro-INEPT
  (p1 ph2)
  4u
  p16:gp4
  d16
  DELTA
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA pl12:f2
  p16:gp4
  d16 BLKGRAD
  4u
  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2 F1PH(ip7, id0)
exit

ph1=0
ph2=1
ph3=2
ph6=0 2
ph7=0 0 2 2
ph31=0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p10 : f1 channel - 90 degree selective pulse [1000 usec]
;sp1 : f1 channel - 90 degree WFB (p10)

;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;cnst2: = J(XH)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 7 %
;gpz2: 50 %
;gpz3: 35 %
;gpz4: 13 %
;gpz5: 17 %

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100

;adaptive_hsqcphpr.2d
; full 2D spectrum
;
;based on hsqcphpr
;avance-version (07/04/04)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive
;with decoupling during acquisition
;
;G. Bodenhausen & D.J. Ruben, Chem. Phys. Lett. 69, 185 (1980)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"

"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf1"
"d0=in0/2-2*0.6366*p3" ; initial evolution time for 90/180 phase correction
"d20=in0/2" ; actual first evolution time accounting for 13C pulse durations

"d4=1s/(cnst2*4)"
"DELTA=d4-larger(p1,p3)-p16-d16-4u-0.6366*p1"
"DELTA1=d4-p19-d16-p10-p1-4u-0.6366*p1"
"DELTA2=d4-p19-d16-p10-p1-12u"

"acqt0=0"

1 ze
  d11 pl12:f2
2 d11 do:f2

  ; purge before d1
  ;d12 pl8:f1
  ;40m cw:f1 ph2  ; 10 kHz purge
  ;4u do:f1
  ;p16:gp5
  ;d16 pl1:f1
  ;(p1 ph1)
  ;p16:gp6
  ;d16 BLKGRAD

  30u fq=cnst21(bf hz):f1
  d12 pl9:f1
  d1 cw:f1 ph1
  4u do:f1
  4u fq=0:f1
  d12 pl1:f1 pl2:f2 UNBLKGRAD

  ; purge 13C equilibrium magnetisation
  (p3 ph1):f2
  4u
  p16:gp5
  d16
  4u

  ; INEPT
  p1 ph1
  4u
  p16:gp1
  d16
  DELTA
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA
  p16:gp1
  d16
  4u
  (p1 ph2)

  ; zz-filter
  4u
  p16:gp2
  d16

  (p3 ph6):f2
  d0 ; 13C evolution
  (p3 ph7):f2

  ; zz-filter
  4u
  p16:gp3
  d16

  ; retro-INEPT
  (p1 ph2)
  p19:gp4
  d16
  DELTA1
  (p10:sp1 ph3):f1
  4u pl1:f1
  (center (p2 ph1) (p4 ph1):f2 )
  4u
  (p10:sp1 ph3):f1
  DELTA2
  p19:gp4
  d16
  4u BLKGRAD
  4u pl12:f2

  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2 F1PH(ip7, id0)
exit

ph1=0
ph2=1
ph3=2
ph6=0 2
ph7=0 0 2 2
ph31=0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p10 : f1 channel - 90 degree selective pulse [1000 usec]
;sp1 : f1 channel - 90 degree WFB (p10)

;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;cnst2: = J(XH)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz0: 46 %
;gpz1: 13 %
;gpz2: 17 %
;gpz3: 33 %
;gpz4: 29 %

;gradients
;p16: 1000u
;p19: 600u

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.50


correcting hmqcgpphpr_1HT2.1.cw

correcting hmqcgpphpr_1HT2.1.cw

; Dec 2016: use baseopt
;
; Jun 2013: added option for Ernst angle excitation
;
; Apr 2013: modified to use half-dwell first-point delay by default
;	    Added option for off-res presat
;
; Option for first row
;
; Removal of 13C equilibrium magnetisation (for methyl TROSY)
; Addition of clean-up gradient-pair
; Delays adjusted for zero first-order phase correction
; With options for 15N decoupling and 90,-180 or 180,-360 phase corr.
;
;hmqcphpr
;avance-version (07/04/04)
;HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;A. Bax, R.H. Griffey & B.L. Hawkins, J. Magn. Reson. 55, 301 (1983)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf1/2"

# ifndef ONE_D

#   ifdef LABEL_CN
    "p22=p21*2"
#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-larger(p1,p21)"
#   else
    "d0=in0/2-0.63662*p3-larger(p1,p21)"
#   endif /*SINGLEDWELL*/
#   else
#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-p1"
#   else
    "d0=in0/2-0.63662*p3-p1"
#   endif /*SINGLEDWELL*/
#   endif /*LABEL_CN*/

# endif /*ONE_D*/

# ifdef ERNST
    "p0=p1*cnst31"
# endif /*ERNST*/

define delay vdmin
"vdmin=4*(p1+p3)"

"DELTA1=d2-p16-d16"
"DELTA2=d2-p16-d16-d12-4u-de+0.6366*p1"
"acqt0=de"
aqseq 312
baseopt_echo

1 ze
  vdmin
  d11 pl12:f2
2 d11 do:f2

  20u
  "TAU1=vd*0.25-p3"
  "TAU2=vd*0.25-p3-p1"

  4u BLKGRAD

# ifdef OFFRES_PRESAT
    30u fq=cnst21(bf hz):f1
# endif /*OFFRES_PRESAT*/

  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD
  (p3 ph1):f2
  d13
  p16:gp1
  d16*2

# ifdef ERNST
  (p0 ph1):f1
# else
  (p1 ph1):f1
# endif /*ERNST*/

  TAU1
  (p4 ph1):f2
  TAU2
  (p2 ph6):f1
  TAU2
  (p4 ph1):f2
  TAU1

  DELTA1
  p16:gp2
  d16

# ifdef ONE_D

    ( center (p3 ph3 2u p3 ph4):f2 (p2 ph2):f1 )

# else

  (p3 ph3):f2
  d0

#   ifdef LABEL_CN
  (center (p2 ph5):f1 (p22 ph2):f3 )
#   else
  (p2 ph5):f1
#   endif /*LABEL_CN*/

  d0
  (p3 ph4):f2

# endif /*ONE_D*/

  d12 pl12:f2
  p16:gp2
  d16
  4u BLKGRAD
  DELTA2
  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2
      F1QF(ivd)
      F2PH(ip3 & ip29, id0)
  4u BLKGRAD
exit

ph1=0
ph2=0
ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
ph6=0 0 0 0 1 1 1 1
ph29=0
ph31=0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p16: homospoil/gradient pulse
;p22 : f3 channel - 180 degree high power pulse
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:    gp 1 : gp 2
;                         31 :   7

;for z-only gradients:
;gpz1: 31%
;gpz2: 7%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100

                                          ;preprocessor-flags-start
;LABEL_CN: for C-13 and N-15 labeled samples start experiment with
;             option -DLABEL_CN (eda: ZGOPTNS)
;SINGLEDWELL: for initial sampling delay of one dwell-time with
;	    option -DSINGLEDWELL (eda: ZGOPTNS)
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;$Id: hmqcphpr,v 1.4 2007/04/11 13:34:30 ber Exp $

; Dec 2016: use baseopt
;
; Jun 2013: added option for Ernst angle excitation
;
; Apr 2013: modified to use half-dwell first-point delay by default
;	    Added option for off-res presat
;
; Option for first row
;
; Removal of 13C equilibrium magnetisation (for methyl TROSY)
; Addition of clean-up gradient-pair
; Delays adjusted for zero first-order phase correction
; With options for 15N decoupling and 90,-180 or 180,-360 phase corr.
;
;hmqcphpr
;avance-version (07/04/04)
;HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;A. Bax, R.H. Griffey & B.L. Hawkins, J. Magn. Reson. 55, 301 (1983)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf1/2"

# ifndef ONE_D

#   ifdef LABEL_CN
    "p22=p21*2"
#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-larger(p1,p21)"
#   else
    "d0=in0/2-0.63662*p3-larger(p1,p21)"
#   endif /*SINGLEDWELL*/
#   else
#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-p1"
#   else
    "d0=in0/2-0.63662*p3-p1"
#   endif /*SINGLEDWELL*/
#   endif /*LABEL_CN*/

# endif /*ONE_D*/

# ifdef ERNST
    "p0=p1*cnst31"
# endif /*ERNST*/

define delay vdmin
"vdmin=4*(p1+p3)"

"DELTA1=d2-p16-d16"
"DELTA2=d2-p16-d16-d12-4u-de+0.6366*p1"
"acqt0=de"

1 ze
  vdmin
  d11 pl12:f2
2 d11 do:f2

  20u
  "TAU1=vd*0.25-p3"
  "TAU2=vd*0.25-p3-p1"

  4u BLKGRAD

# ifdef OFFRES_PRESAT
    30u fq=cnst21(bf hz):f1
# endif /*OFFRES_PRESAT*/

  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD
  (p3 ph1):f2
  d13
  p16:gp1
  d16*2

# ifdef ERNST
  (p0 ph1):f1
# else
  (p1 ph1):f1
# endif /*ERNST*/

  TAU1
  (p4 ph1):f2
  TAU2
  (p2 ph6):f1
  TAU2
  (p4 ph1):f2
  TAU1

  DELTA1
  p16:gp2
  d16

# ifdef ONE_D

    ( center (p3 ph3 2u p3 ph4):f2 (p2 ph2):f1 )

# else

  (p3 ph3):f2
  d0

#   ifdef LABEL_CN
  (center (p2 ph5):f1 (p22 ph2):f3 )
#   else
  (p2 ph5):f1
#   endif /*LABEL_CN*/

  d0
  (p3 ph4):f2

# endif /*ONE_D*/

  d12 pl12:f2
  p16:gp2
  d16
  4u BLKGRAD
  DELTA2
  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2
      F1QF(ivd)
      F2PH(ip3 & ip29, id0)
  4u BLKGRAD
exit

ph1=0
ph2=0
ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
ph6=0 0 0 0 1 1 1 1
ph29=0
ph31=0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p16: homospoil/gradient pulse
;p22 : f3 channel - 180 degree high power pulse
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:    gp 1 : gp 2
;                         31 :   7

;for z-only gradients:
;gpz1: 31%
;gpz2: 7%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100

                                          ;preprocessor-flags-start
;LABEL_CN: for C-13 and N-15 labeled samples start experiment with
;             option -DLABEL_CN (eda: ZGOPTNS)
;SINGLEDWELL: for initial sampling delay of one dwell-time with
;	    option -DSINGLEDWELL (eda: ZGOPTNS)
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;$Id: hmqcphpr,v 1.4 2007/04/11 13:34:30 ber Exp $


fixes for cpmghmqc.cw

fixes for cpmghmqc.cw

;cpmghmqcph
;CPMG-HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum coherence
;xy16 CPMG blocks during coherence transfers
; turn on using -DCPMG1 and -DCPMG2
;phase sensitive
;with decoupling during acquisition

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

"p2=p1*2"
"p4=p3*2"
"d11=30m"
"d12=20u"
"d13=4u"

"d2=1s/(cnst2*2)"
"DELTA1=d2/32-larger(p1,p3)"
"DELTA=DELTA1*2"

"in0=inf1/2"
"d0=in0/2-p1-p3*0.6366"

"acqt0=0.6366*p1"
baseopt_echo

1 ze
  4u pl1:f1 pl2:f2
2 d1 do:f2

  4u pl2:f2
  50u UNBLKGRAD
  (p3 ph1):f2    ; crush eq'm magnetisation
  20u
  p16:gp1
  d16
  4u BLKGRAD

  p1 ph1

#ifdef CPMG1
; phases: x y x y  y x y x  -x -y -x -y  -y -x -y -x
;         1 2 1 2  2 1 2 1  3  4  3  4   4  3  4  3
DELTA1
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA1
#else
  d2
#endif /* CPMG1 */

  p3:f2 ph13
  d0
  p2 ph12
  d0
  p3:f2 ph14

#ifdef CPMG2
; phases: x y x y  y x y x  -x -y -x -y  -y -x -y -x
;         1 2 1 2  2 1 2 1  3  4  3  4   4  3  4  3
DELTA1
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA1 pl12:f2
#else
  d2 pl12:f2
#endif /* CPMG2 */

  go=2 ph31 cpd2:f2
  ;d1 do:f2 mc #0 to 2 F1PH(calph(ph13, +90), caldel(d0, +in0))
  d1 do:f2 mc #0 to 2
      F1PH(calph(ph13, +90), caldel(d0, +in0) & calph(ph13, +180) & calph(ph31, +180))
exit

ph1=0
ph2=1
ph3=2
ph4=3
ph12=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph13=0 2
ph14=0 0 2 2
ph31=0 2 2 0 2 0 0 2

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D)                  [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)XH
;d11: delay for disk I/O                             [30 msec]
;d13: short delay                                    [4 usec]
;cnst2: = J(XH)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;ns: 16 * n
;ds: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;$Id: hmqcph,v 1.6 2012/01/31 17:49:23 ber Exp $

;cpmghmqcph
;CPMG-HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum coherence
;xy16 CPMG blocks during coherence transfers
; turn on using -DCPMG1 and -DCPMG2
;phase sensitive
;with decoupling during acquisition

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

"p2=p1*2"
"d11=30m"
"d12=20u"
"d13=4u"

"d2=1s/(cnst2*2)"
"DELTA1=d2/32-larger(p1,p3)"
"DELTA=DELTA*2"

"in0=inf1/2"
"d0=in0/2-p1-p3*0.6366"

"acqt0=0.6366*p1"
baseopt_echo

1 ze
  4u pl1:f1 pl2:f2
2 d1 do:f2

  4u pl2:f2
  50u UNBLKGRAD
  (p3 ph1):f2    ; crush eq'm magnetisation
  20u
  p16:gp1
  d16
  4u BLKGRAD

  p1 ph1

#ifdef CPMG1
; phases: x y x y  y x y x  -x -y -x -y  -y -x -y -x
;         1 2 1 2  2 1 2 1  3  4  3  4   4  3  4  3
DELTA1
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA1
#else
  d2
#endif /* CPMG1 */

  p3:f2 ph13
  d0
  p2 ph12
  d0
  p3:f2 ph14

#ifdef CPMG2
; phases: x y x y  y x y x  -x -y -x -y  -y -x -y -x
;         1 2 1 2  2 1 2 1  3  4  3  4   4  3  4  3
DELTA1
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph2):f1 (p4 ph2):f2 ) ; y
DELTA
(center (p2 ph1):f1 (p4 ph1):f2 ) ; x
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA
(center (p2 ph4):f1 (p4 ph4):f2 ) ; -y
DELTA
(center (p2 ph3):f1 (p4 ph3):f2 ) ; -x
DELTA1 pl12:f2
#else
  d2 pl12:f2
#endif /* CPMG2 */

  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2 F1PH(calph(ph13, +90), caldel(d0, +in0))
exit

ph1=0
ph2=1
ph3=2
ph4=3
ph12=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph13=0 2
ph14=0 0 2 2
ph31=0 2 2 0 2 0 0 2

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D)                  [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)XH
;d11: delay for disk I/O                             [30 msec]
;d13: short delay                                    [4 usec]
;cnst2: = J(XH)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;ns: 16 * n
;ds: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;$Id: hmqcph,v 1.6 2012/01/31 17:49:23 ber Exp $


4D HCcoNH_tocsy.cw added and tested

4D HCcoNH_tocsy.cw added and tested


Fixed include.

Fixed include.


tidying up b_trosy_hzdqc.cw sequence

tidying up b_trosy_hzdqc.cw sequence

;BEST-TROSY-H(Z/D)QC
;  Waudby, Ouvry, Davis & Christodoulou (submitted, 2019)
;
;options:
; -DLABEL_CN = 13C decoupling
; -DDQ = HDQC (otherwise runs HZQC)
; -DONE_D = first-row
; -DOFFRES_PRESAT = presat, pl9 on cnst21 (Hz bf)

prosol relations=<triple>

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

"d11=30m"
"d12=20u"
"d13=4u"
"d21=1s/(cnst4*4)"

"p22=p21*2"

"in0=inf1"
# ifdef ONE_D
"d0=2u"
#else
"d0=in0/2-p21*4/3.1415"
# endif /*ONE_D*/

"d2=p39-p39*cnst39-0.3633*p21"
"d3=0.5*p40-0.3633*p21"
"DELTA1=d21-p39*cnst39-p40*0.5-p16-d16-4u"
"DELTA2=d21-0.3633*p21-p16-d16-4u-0.5*p40"
"DELTA3=d21-p40-p16-d16-4u"
"DELTA4=d21-0.5*p40-p16-d16-4u-p21-de"
"acqt0=de"

#ifdef LABEL_CN
"d10=DELTA3+d3+p21+d0*0.5-p8*0.5"
"d9=DELTA3+d3+p21+d0*0.5-p8*0.5"
"in10=in0*0.5"
"in9=in0*0.5"
#endif

# ifdef OFFRES_PRESAT
  "TAU=d1-d11-60u-d12*2-d13-d12-50u-p21-2*p16-2*d16-12u"
# else
  "TAU=d1-d11-d12-50u-p21-2*p16-2*d16-12u"
# endif /*OFFRES_PRESAT*/

;"spoff23=bf1*(cnst19/1000000)-o1"
;"spoff24=bf1*(cnst19/1000000)-o1"
"spoff23=0" ; for amides on-resonance (recommended)
"spoff24=0"

"l0=1"  ; loop counter for shifting 1H 180 pulse between echo/anti-echoes

1 ze
  d11
2 d11

  4u UNBLKGRAD
  p16:gp3
  d16
  4u BLKGRAD

# ifdef OFFRES_PRESAT
  30u fq=cnst21(bf hz):f1
  d12 pl9:f1
  TAU cw:f1 ph1
  d13 do:f1
  d12 pl1:f1
  30u fq=0:f1
# else
  TAU
# endif /*OFFRES_PRESAT*/

3 d12 pl3:f3
  50u UNBLKGRAD

  ; purge Nz
  (p21 ph1):f3
  4u
  p16:gp0
  d16

  ; begin main sequence
  if "l0 %2 == 1"
     {
  (p39:sp23 ph10) (d2 p21 ph11):f3
     }
  else
     {
  (p39:sp23 ph10) (d2 p21 ph21):f3
     }

  DELTA1
  4u
  p16:gp1
  d16
  (center (p40:sp24 ph1) (p22 ph12):f3 )
  4u
  p16:gp1
  d16

  if "l0 %2 == 1"
     {
#ifdef LABEL_CN
  (ralign (p40:sp24 ph16 DELTA3) (DELTA2 p21 ph13 d0 p21 ph1 d3 DELTA3):f3 (p8:sp13 ph1 d10):f2 )
#else
  (ralign (p40:sp24 ph16) (DELTA2 p21 ph13 d0 p21 ph1 d3):f3 )
  DELTA3
#endif /*LABEL_CN*/
     }
  else
     {
#ifdef LABEL_CN
  (DELTA3 p40:sp24 ph16) (DELTA3 d3 p21 ph23 d0 p21 ph1 DELTA2):f3 (d9 p8:sp13 ph1):f2
#else
  DELTA3
  (p40:sp24 ph16) (d3 p21 ph23 d0 p21 ph1 DELTA2):f3
#endif /*LABEL_CN*/
     }
  4u
  p16:gp2
  d16
  (center (p40:sp24 ph1) (p22 ph1):f3 )
  4u
  p16:gp2
  d16
  DELTA4 BLKGRAD
  (p21 ph14):f3

  go=2 ph31
#ifdef LABEL_CN
  d11 mc #0 to 2
     F1EA(iu0 & ip13*2 & ip14*2, id0 & id10 & id9 & ip10*2 & ip31*2)
#else
  d11 mc #0 to 2
     F1EA(iu0 & ip13*2 & ip14*2, id0 & ip10*2 & ip31*2)
#endif /*LABEL_CN*/

exit

ph1=0
ph10=0
ph11=2 0 3 1
ph21=2 0 1 3
ph12=0
#ifdef DQ
ph13=1 3 2 0
ph23=1 3 0 2
ph14=3
#else /* ZQ */
ph13=1 3 0 2
ph23=1 3 2 0
ph14=1
#endif
ph16=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph31=0 2 3 1 2 0 1 3

;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl26: f3 channel - power level for CPD/BB decoupling (low power)
;sp23: f1 channel - shaped pulse 90 degree (Pc9_4_90.1000)
;sp24: f1 channel - shaped pulse 180 degree (Reburp.1000)
;p16: homospoil/gradient pulse                       [1 msec]
;p21: f3 channel -  90 degree high power pulse
;p39: f1 channel - 90 degree shaped pulse for excitation
;                      Pc9_4_120.1000 (120o)    (1958us at 950 MHz)
;p40: f1 channel - 180 degree shaped pulse for refocussing
;                      Reburp.1000              (1432us at 950 MHz)
;d0 : incremented delay (2D) = in0/2-p21*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(4J)NH
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)  [8.2 ppm]
;cnst21: frequency (in Hz) for off-resonance presaturation
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_90.1000: 0.514
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntiEcho

;use gradient ratio:	gp 0 : gp 1 : gp 2
;			-16 :  11 :    7

;for z-only gradients:
;gpz0: -16%
;gpz1: 11%
;gpz2:  7%
;gpz3: -23%

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100

;Processing
;PHC0(F1): 90
;PHC1(F1): -180
;FCOR(F1): 1

;BEST-TROSY-H(Z/D)QC
;Chris Waudby, June 2018
;
;options:
; -DDQ = HDQC (otherwise runs HZQC)
; -DONE_D = first-row
; -DOFFRES_PRESAT = presat, pl9 on cnst21 (Hz bf)

prosol relations=<triple>

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

"d11=30m"
"d12=20u"
"d13=4u"
"d21=1s/(cnst4*4)"

"p22=p21*2"

"in0=inf1"
# ifdef ONE_D
"d0=2u"
#else
"d0=in0/2-p21*4/3.1415"
# endif /*ONE_D*/

"d2=p39-p39*cnst39-0.3633*p21"
"d3=0.5*p40-0.3633*p21"
"DELTA1=d21-p39*cnst39-p40*0.5-p16-d16-4u"
"DELTA2=d21-0.3633*p21-p16-d16-4u-0.5*p40"
"DELTA3=d21-p40-p16-d16-4u"
"DELTA4=d21-0.5*p40-p16-d16-4u-p21-de"
"acqt0=de"

#ifdef LABEL_CN
"d10=DELTA3+d3+p21+d0*0.5-p8*0.5"
"d9=DELTA3+d3+p21+d0*0.5-p8*0.5"
"in10=in0*0.5"
"in9=in0*0.5"
#endif

# ifdef OFFRES_PRESAT
  "TAU=d1-d11-60u-d12*2-d13-d12-50u-p21-2*p16-2*d16-12u"
# else
  "TAU=d1-d11-d12-50u-p21-2*p16-2*d16-12u"
# endif /*OFFRES_PRESAT*/

;"spoff23=bf1*(cnst19/1000000)-o1"
;"spoff24=bf1*(cnst19/1000000)-o1"
"spoff23=0" ; for amides on-resonance (recommended)
"spoff24=0"

"l0=1"  ; loop counter for shifting 1H 180 pulse between echo/anti-echoes

1 ze
  d11
2 d11

  4u UNBLKGRAD
  p16:gp3
  d16
  4u BLKGRAD

# ifdef OFFRES_PRESAT
  30u fq=cnst21(bf hz):f1
  d12 pl9:f1
  TAU cw:f1 ph1
  d13 do:f1
  d12 pl1:f1
  30u fq=0:f1
# else
  TAU
# endif /*OFFRES_PRESAT*/

3 d12 pl3:f3
  50u UNBLKGRAD

  ; purge Nz
  (p21 ph1):f3
  4u
  p16:gp0
  d16

  ; begin main sequence
  if "l0 %2 == 1"
     {
  ;(lalign (p39:sp23 ph10) (d2 p21 ph11):f3 )
  (p39:sp23 ph10) (d2 p21 ph11):f3
     }
  else
     {
  ;(lalign (p39:sp23 ph10) (d2 p21 ph21):f3 )
  (p39:sp23 ph10) (d2 p21 ph21):f3
     }

  DELTA1
  4u
  p16:gp1
  d16
  (center (p40:sp24 ph1) (p22 ph12):f3 )
  4u
  p16:gp1
  d16

  if "l0 %2 == 1"
     {
#ifdef LABEL_CN
  (ralign (p40:sp24 ph16 DELTA3) (DELTA2 p21 ph13 d0 p21 ph1 d3 DELTA3):f3 (p8:sp13 ph1 d10):f2 )
#else
  (ralign (p40:sp24 ph16) (DELTA2 p21 ph13 d0 p21 ph1 d3):f3 )
  DELTA3
#endif /*LABEL_CN*/
     }
  else
     {
#ifdef LABEL_CN
  (DELTA3 p40:sp24 ph16) (DELTA3 d3 p21 ph23 d0 p21 ph1 DELTA2):f3 (d9 p8:sp13 ph1):f2
#else
  DELTA3
  (p40:sp24 ph16) (d3 p21 ph23 d0 p21 ph1 DELTA2):f3
#endif /*LABEL_CN*/
     }
  4u
  p16:gp2
  d16
  (center (p40:sp24 ph1) (p22 ph1):f3 )
  4u
  p16:gp2
  d16
  DELTA4 BLKGRAD
  (p21 ph14):f3

  go=2 ph31
#ifdef LABEL_CN
  d11 mc #0 to 2
     F1EA(iu0 & ip13*2 & ip14*2, id0 & id10 & id9 & ip10*2 & ip31*2)
#else
  d11 mc #0 to 2
     F1EA(iu0 & ip13*2 & ip14*2, id0 & ip10*2 & ip31*2)
#endif /*LABEL_CN*/

exit

ph1=0
ph10=0
ph11=2 0 3 1
ph21=2 0 1 3
ph12=0
#ifdef DQ
ph13=1 3 2 0
ph23=1 3 0 2
ph14=3
#else /* ZQ */
ph13=1 3 0 2
ph23=1 3 2 0
ph14=1
#endif
ph16=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph31=0 2 3 1 2 0 1 3

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB decoupling (low power)
;sp23: f1 channel - shaped pulse 120 degree
;                   (Pc9_4_120.1000 or Q5.1000)
;sp24: f1 channel - shaped pulse 180 degree (Rsnob.1000)
;p16: homospoil/gradient pulse                       [1 msec]
;p21: f3 channel -  90 degree high power pulse
;p39: f1 channel - 120 degree shaped pulse for excitation
;                      Pc9_4_120.1000 (120o)    (3.0ms at 600.13 MHz)
;                  (or Q5.1000 (90o)            (2.0ms at 600.13 MHz) )
;p40: f1 channel - 180 degree shaped pulse for refocussing
;                      Rsnob.1000               (1.0ms at 600.13 MHz)
;d0 : incremented delay (2D) = in0/2-p21*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(4J)NH
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_90.1000: 0.514
;           Pc9_4_120.1000: 0.529
;inf1: 1/SW(N) = 2 * DW(N)
;in0: 1/ SW(N) = 2 * DW(N)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntiEcho

;use gradient ratio:	gp 0 : gp 1 : gp 2
;			-16 :  11 :    7

;for z-only gradients:
;gpz0: -16%
;gpz1: 11%
;gpz2:  7%
;gpz3: -23%

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100

;Processing

;PHC0(F1): 90
;PHC1(F1): -180
;FCOR(F1): 1


tidy up QQ_R2.cw

tidy up QQ_R2.cw

/* 1H QQ relaxation measurement in methyl groups
based on 2016 Yuwen sequence

    Assumes that sample is specifically 13CH3 labeled

        1H: O1 on methyls (0.8 ppm)
            pwh = p1 1H pw90 @ power level pl1 highest power

       13C: O2 centre at 20 ppm
            pwc = p2 13C pw90 @ power level pl2 highest power
            power level pl21 is used for 13C decoupling.
*/

prosol relations=<triple>

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

/***********************/
/*   Define pulses     */
/***********************/
define pulse dly_pg1     /* Messerle purge pulse */
  "dly_pg1=2m"
define pulse dly_pg2     /* Messerle purge pulse */
  "dly_pg2=3.4m"
define pulse pwh
  "pwh=p1"               /* 1H hard pulse at power level p1 (tpwr) */
define pulse pwc
  "pwc=p3"               /* 13C pulse at power level pl2 (dhpwr) */

/************************/
/*   Define delays      */
/************************/
"in0=inf2/2"
"d11=30m"

/************************/
/*   Define f1180       */
/************************/
  "d0=larger((in0)/2 - 2.0*pwh, 2e-7)"

define delay taua
  "taua=d3"              /* d3 ~ 1.8-2ms ~ 1.0s/(4*125.3)"  ~ 1 / 4J(CH) */
define delay taub
  "taub=d4"              /* d4 = 1/4JCH exactly */

"acqt0=0"              /* select 'DIGIMOD = baseopt' to execute */

aqseq 312

1 ze

2 d11 do:f2

  20u pl1:f1 pl2:f2

/******************/
/* Messerle purge */
/******************/
  20u pl11:f1
  (dly_pg1 ph26):f1
  20u
  (dly_pg2 ph27):f1

; off-resonance presat
30u fq=cnst10(bf hz):f1
30u pl9:f1
d1 cw:f1 ph26
4u do:f1
30u fq=0:f1
20u pl1:f1

/****************************************/
/* Destroy 13C equlibrium magnetization */
/****************************************/
  (pwc ph26):f2

  20u UNBLKGRAD

  2u
  p50:gp0
  d16

/***********************/
/* Create TQ coherence */
/***********************/

  (pwh ph1):f1

  2u
  p51:gp1
  d16

  "DELTA = taua - 2u - p51 - d16 - pwh*2.0/PI"
  DELTA

  (center (pwh*2 ph1):f1 (pwc*2 ph26):f2)

  2u
  p51:gp1
  d16

  "DELTA = taua - 2u - p51 - d16"
  DELTA

  (pwc ph3):f2

  2u
  p52:gp2
  d16

  "DELTA = taub - 2u - p52 - d16"
  DELTA

  (center (pwh*2 ph1):f1 (pwc*2 ph26):f2)

  2u
  p52:gp2
  d16

  "DELTA = taub - 2u - p52 - d16"
  DELTA

  ;(pwc ph26):f2

/*************/
/* Hahn echo */
/*************/
  (pwh ph1):f1

  ;2u
  ;p58:gp8*0
  ;d16
  vd*0.5

  (center (pwh ph29 pwh*2 ph26 pwh ph29):f1 (pwc*2 ph2):f2 )

  ;2u
  ;p58:gp8
  ;d16
  vd*0.5

  (pwh ph26):f1
  ;(pwc ph3):f2

  2u
  p53:gp3
  d16

  "DELTA = taub - 2u - p53 - d16"
  DELTA

/********/
/* HMQC */
/********/
  (pwc*2 ph26):f2

  d0
  (pwh ph29 pwh*2 ph26 pwh ph29):f1
  d0

  2u
  p53:gp3
  d16

  "DELTA = taub - 2u - p53 - d16"
  DELTA

  (pwc ph4):f2

  "DELTA = pwc*2.0"
  DELTA

  (pwh ph27):f1

  2u
  p54:gp4
  d16

/****************************************************************/
/* C->H back transfer, use wtg_flg for better water suppression */
/****************************************************************/
  20u pl1:f1

  (pwh ph26):f1

  2u
  p57:gp7
  d16
  "DELTA = taua - 2u - p57 - d16 - p10 - 1u - larger(pwh,pwc) - pwh*2.0/PI"
  DELTA
  (p10:sp10 ph28):f1
  1u pl1:f1
  (center (pwh*2 ph26):f1 (pwc*2 ph27):f2 )
  1u
  (p10:sp10 ph28):f1
  "DELTA = taua - p57 - d16 - p10 - 1u - larger(pwh,pwc) - 2*pwc - 8u"
  DELTA
  p57:gp7
  d16

  4u BLKGRAD

  (pwc ph26):f2
  (pwc ph5):f2

  4u pl21:f2             /* lower power for 13C decoupling */

/********************************/
/* Signal detection and looping */
/********************************/
  go=2 ph31 cpds2:f2
  d11 do:f2 mc #0 to 2
    F1I(ip1, 7, ip3, 3)
    F1QF(ivd)
    F2PH(ip4, id0); & ip31*2)
;    F1QF(calclc(l1,1))
;    F2PH(calph(ph4,-90), caldel(d0,+in0) & calph(ph31,+180))

HaltAcqu, 1m
exit

ph0=1
;ph1=(6) 0 1 2 3 4 5
ph1=(7) 0
ph2=0 2
ph3=(3) 0
ph4=0
ph5=0 2
ph26=0
ph27=1
ph28=2
ph29=3
ph31=0 2

;pl1 : tpwr - power level for pwh
;pl2 : dhpwr - power level for 13C pulse pwc (p2)
;pl9 : tsatpwr - power level for presat
;pl11 : tpwrmess - power level for Messerle purge
;pl21 : dpwr - power level for  13C decoupling cpd2
;p10 : 1000usec water flip-back
;sp10 : water flip-back (on H2O)
;spw14 : power level for eburp1 pulse
;spnam14: eburp1 pulse on water
;p1 : pwh
;p3 : pwc
;p14 : eburp1 pulse width, typically 7000u
;p50 : gradient pulse 50                                [1000 usec]
;p51 : gradient pulse 51                                [400 usec]
;p52 : gradient pulse 52                                [200 usec]
;p53 : gradient pulse 53                                [300 usec]
;p54 : gradient pulse 54                                [500 usec]
;p55 : gradient pulse 55                                [300 usec]
;p56 : gradient pulse 56                                [500 usec]
;p57 : gradient pulse 57                                [700 usec]
;pcpd2 : 13C pulse width for 13C decoupling
;d1 : Repetition delay D1
;d3 : taua ~1/(4*JCH)  ~1.8-2ms
;d4 : taub - set to 1/4JHC = 2.0 ms
;d11 : delay for disk i/o, 30ms
;d16 : gradient recovery delay, 200us
;cpd2 : 13C decoupling during t2 according to program defined by cpdprg2
;cpdprg2 : 13C decoupling during t2
;cnst10: water frequency for presat
;l1 : counter for the ncyc_cp values for cpmg
;l2 : actual value of ncyc_cp
;inf1 : 1/SW(X) = 2*DW(X)
;in0 : 1/(2*SW(x))=DW(X)
;nd0 : 2
;ns : 1*n
;FnMODE : States-TPPI, TPPI, States

;for z-only gradients:
;gpz0: 20%
;gpz1: 25%
;gpz2: 20%
;gpz3: -25%
;gpz4: 50%
;gpz5: -40%
;gpz6: -75%
;gpz7: -80%

;use gradient files:
;gpnam0: SMSQ10.32
;gpnam1: SMSQ10.32
;gpnam2: SMSQ10.32
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.32
;gpnam5: SMSQ10.32
;gpnam6: SMSQ10.32
;gpnam7: SMSQ10.32

/* 1H QQ relaxation measurement in methyl groups
based on 2016 Yuwen sequence

    Assumes that sample is specifically 13CH3 labeled

        1H: O1 on methyls (0.8 ppm)
            pwh = p1 1H pw90 @ power level pl1 highest power

       13C: O2 centre at 20 ppm
            pwc = p2 13C pw90 @ power level pl2 highest power
            power level pl21 is used for 13C decoupling.
*/

prosol relations=<triple>

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

/***********************/
/*   Define pulses     */
/***********************/
define pulse dly_pg1     /* Messerle purge pulse */
  "dly_pg1=2m"
define pulse dly_pg2     /* Messerle purge pulse */
  "dly_pg2=3.4m"
define pulse pwh
  "pwh=p1"               /* 1H hard pulse at power level p1 (tpwr) */
define pulse pwc
  "pwc=p3"               /* 13C pulse at power level pl2 (dhpwr) */

/************************/
/*   Define delays      */
/************************/
"in0=inf2/2"
"d11=30m"

/************************/
/*   Define f1180       */
/************************/
  "d0=larger((in0)/2 - 2.0*pwh, 2e-7)"

define delay taua
  "taua=d3"              /* d3 ~ 1.8-2ms ~ 1.0s/(4*125.3)"  ~ 1 / 4J(CH) */
define delay taub
  "taub=d4"              /* d4 = 1/4JCH exactly */

"acqt0=0"              /* select 'DIGIMOD = baseopt' to execute */

aqseq 312

1 ze

2 d11 do:f2

  20u pl1:f1 pl2:f2

/******************/
/* Messerle purge */
/******************/
  20u pl11:f1
  (dly_pg1 ph26):f1
  20u
  (dly_pg2 ph27):f1

; off-resonance presat
30u fq=cnst10(bf hz):f1
30u pl9:f1
d1 cw:f1 ph26
4u do:f1
30u fq=0:f1
20u pl1:f1

/****************************************/
/* Destroy 13C equlibrium magnetization */
/****************************************/
  (pwc ph26):f2

  20u UNBLKGRAD

  2u
  p50:gp0
  d16

/***********************/
/* Create TQ coherence */
/***********************/

  (pwh ph1):f1

  2u
  p51:gp1
  d16

  "DELTA = taua - 2u - p51 - d16 - pwh*2.0/PI"
  DELTA

  (center (pwh*2 ph1):f1 (pwc*2 ph26):f2)

  2u
  p51:gp1
  d16

  "DELTA = taua - 2u - p51 - d16"
  DELTA

  (pwc ph3):f2

  2u
  p52:gp2
  d16

  "DELTA = taub - 2u - p52 - d16"
  DELTA

  (center (pwh*2 ph1):f1 (pwc*2 ph26):f2)

  2u
  p52:gp2
  d16

  "DELTA = taub - 2u - p52 - d16"
  DELTA

  ;(pwc ph26):f2

/*************/
/* Hahn echo */
/*************/
  (pwh ph1):f1

  ;2u
  ;p58:gp8*0
  ;d16
  vd*0.5

  (center (pwh ph29 pwh*2 ph26 pwh ph29):f1 (pwc*2 ph2):f2 )

  ;2u
  ;p58:gp8
  ;d16
  vd*0.5

  (pwh ph26):f1
  ;(pwc ph3):f2

  2u
  p53:gp3
  d16

  "DELTA = taub - 2u - p53 - d16"
  DELTA

/********/
/* HMQC */
/********/
  (pwc*2 ph26):f2

  d0
  (pwh ph29 pwh*2 ph26 pwh ph29):f1
  d0

  2u
  p53:gp3
  d16

  "DELTA = taub - 2u - p53 - d16"
  DELTA

  (pwc ph4):f2

  "DELTA = pwc*2.0"
  DELTA

  (pwh ph27):f1

  2u
  p54:gp4
  d16

/****************************************************************/
/* C->H back transfer, use wtg_flg for better water suppression */
/****************************************************************/
  20u pl1:f1

  (pwh ph26):f1

  2u
  p57:gp7
  d16
  "DELTA = taua - 2u - p57 - d16 - p10 - 1u - larger(pwh,pwc) - pwh*2.0/PI"
  DELTA
  (p10:sp10 ph28):f1
  1u pl1:f1
  (center (pwh*2 ph26):f1 (pwc*2 ph27):f2 )
  1u
  (p10:sp10 ph28):f1
  "DELTA = taua - p57 - d16 - p10 - 1u - larger(pwh,pwc) - 2*pwc - 8u"
  DELTA
  p57:gp7
  d16

  4u BLKGRAD

  (pwc ph26):f2
  (pwc ph5):f2

  4u pl21:f2             /* lower power for 13C decoupling */

/********************************/
/* Signal detection and looping */
/********************************/
  go=2 ph31 cpds2:f2
  d11 do:f2 mc #0 to 2
    F1I(ip1, 7, ip3, 3)
    F1QF(ivd)
    F2PH(ip4, id0); & ip31*2)
;    F1QF(calclc(l1,1))
;    F2PH(calph(ph4,-90), caldel(d0,+in0) & calph(ph31,+180))

HaltAcqu, 1m
exit

ph0=1
;ph1=(6) 0 1 2 3 4 5
ph1=(7) 0
ph2=0 2
ph3=(3) 0
ph4=0
ph5=0 2
ph26=0
ph27=1
ph28=2
ph29=3
ph31=0 2

;pl1 : tpwr - power level for pwh
;pl2 : dhpwr - power level for 13C pulse pwc (p2)
;pl9 : tsatpwr - power level for presat
;pl11 : tpwrmess - power level for Messerle purge
;pl21 : dpwr - power level for  13C decoupling cpd2
;p10 : 1000usec water flip-back
;sp10 : water flip-back (on H2O)
;spw14 : power level for eburp1 pulse
;spnam14: eburp1 pulse on water
;p1 : pwh
;p3 : pwc
;p14 : eburp1 pulse width, typically 7000u
;p50 : gradient pulse 50                                [1000 usec]
;p51 : gradient pulse 51                                [400 usec]
;p52 : gradient pulse 52                                [600 usec]
;p53 : gradient pulse 53                                [300 usec]
;p54 : gradient pulse 54                                [500 usec]
;p55 : gradient pulse 55                                [300 usec]
;p56 : gradient pulse 56                                [500 usec]
;p57 : gradient pulse 57                                [800 usec]
;pcpd2 : 13C pulse width for 13C decoupling
;d1 : Repetition delay D1
;d3 : taua ~1/(4*JCH)  ~1.8-2ms
;d4 : taub - set to 1/4JHC = 2.0 ms
;d11 : delay for disk i/o, 30ms
;d16 : gradient recovery delay, 200us
;cpd2 : 13C decoupling during t2 according to program defined by cpdprg2
;cpdprg2 : 13C decoupling during t2
;cnst10: water frequency for presat
;l1 : counter for the ncyc_cp values for cpmg
;l2 : actual value of ncyc_cp
;inf1 : 1/SW(X) = 2*DW(X)
;in0 : 1/(2*SW(x))=DW(X)
;nd0 : 2
;ns : 6*n
;FnMODE : States-TPPI, TPPI, States

;for z-only gradients:
;gpz0: 20%
;gpz1: 25%
;gpz2: 30%
;gpz3: -25%
;gpz4: 50%
;gpz5: -40%
;gpz6: -75%
;gpz7: -80%

;use gradient files:
;gpnam0: SMSQ10.32
;gpnam1: SMSQ10.32
;gpnam2: SMSQ10.32
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.32
;gpnam5: SMSQ10.32
;gpnam6: SMSQ10.32
;gpnam7: SMSQ10.32


Update page.cw

Update page.cw

adding new keywords and arguments

### this is a comment
### keywords:
# textbox
# button
# btn-group
# btn-toolbar
# radio
# dropdown
# alert
# list
# navbar
# well
# panel
#

### parameters:
# id :: unique id of object
# name :: unique name of object
# class :: css class name
# isRequired :: true, false (default)
# inputSize :: length of input (default = 128)
# orientation :: vertical, horizontal (default), justified
#

# this is a comment
# keywords:
# textbox
# button
# radio
# dropdown
#
# parameters:
# id
# name
# css
# isRequired
# inputSize


Corrected and tested sfhmqcf2gpph_1HT2.2.cw sequence

;SOFAST-HMQC for methyl 1H T2 measurement
;with L2 filter

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf2"
"d0=in0/2-1.2732*p3"

define delay XI1
define delay XI2
"TAU=d1-d11-20u-d12-50u-p3-d13-p16-d16"
"DELTA1=d2-cnst39*p39"
"DELTA2=d2-d12-4u-de"
"XI1=d2*0.25-p40*0.5-p19-d19"
"XI2=d2*0.25-p3-p40*0.5-p19-d19"

define delay vdmin
"vdmin=4*(p1+p3+4u+p17+d17)+2*p40"

"spoff23=bf1*(cnst19/1000000)-o1"
"spoff24=bf1*(cnst19/1000000)-o1"

"acqt0=de"
baseopt_echo

aqseq 312

1 ze
  vdmin
  d11 pl12:f2
2 d11 do:f2

  20u
  "d3=d2*0.25-p40-p19-d19+d0*0.5"
  "d20=vd/4-p3-p17-d17"
  "d21=vd/4-p3-0.5*p40"
  "d22=vd/4-p3-p17-d17-0.5*p40"
  "d23=vd/4-p3"

  ; relaxation period
  ;"TAU=d1-d11-20u-d12-50u-p3-d13-p16-d16"
  TAU
  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD

  (p3 ph1):f2    ; crush eq'm 13C magnetisation
  d13
  p16:gp1
  d16

  ; start main sequence
  (p39:sp23 ph1):f1  ; INEPT
  ;"DELTA1=d2-p39*cnst39"
  DELTA1

  (p3 ph11):f2
  p19:gp3
  d19
  ;"XI1=d2*0.25-p40*0.5-p19-d19"
  XI1
  (center (p40:sp24 ph1):f1 (p4 ph1):f2 )
  p19:gp3
  d19
  ;"XI2=d2*0.25-p3-p40*0.5-p19-d19"
  ;"d3=d2*0.25-p40-p19-d19+d0*0.5"
  ;"d20=vd/4-p3-p17-d17"
  (lalign (d3 p40:sp24 ph14):f1 (XI2 p3 ph12 d0 p3 ph13 d20):f2 )
  p17:gp4
  d17
  (p4 ph1):f2
  ;"d21=vd/4-p3-0.5*p40"
  d21
  (p40:sp24 ph1):f1
  p17:gp4
  d17
  ;"d22=vd/4-p3-p17-d17-0.5*p40"
  d22
  (p4 ph1):f2
  ;"d23=vd/4-p3"
  d23

  ; back-transfer
  d12 pl12:f2
  4u BLKGRAD
  DELTA2

  ; acquisition
  go=2 ph31 cpd2:f2

  d11 do:f2 mc #0 to 2
       F1QF(ivd)
       F2PH(ip13, id0)

  ; repeat whole experiment
  lo to 2 times l0
  4u do:f2
  4u BLKGRAD
exit

ph1= 0
ph2= 1
ph11=0 2
ph12=1 1 3 3
ph13=0
ph14=0 0 0 0 2 2 2 2
ph29=0
ph31=0 2

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;sp23: f1 channel - shaped pulse 120 degree
;                   (Pc9_4_120.1000 or Q5.1000)
;sp24: f1 channel - shaped pulse 180 degree (Rsnob.1000)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p16: homospoil/gradient pulse
;p17: gradient pulse [100 usec]
;p19: gradient pulse [50 usec]
;p22 : f3 channel - 180 degree high power pulse
;p39: f1 channel - 120 degree shaped pulse for excitation
;                      Pc9_4_120.1000 (120o)    (3.0ms at 600.13 MHz)
;                  (or Q5.1000 (90o)            (2.0ms at 600.13 MHz) )
;p40: f1 channel - 180 degree shaped pulse for refocussing
;                      Rsnob.1000               (1.0ms at 600.13 MHz)
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d3 : 1/(8J)CH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;d17: shorter delay for gradient recovery [100 usec]
;d19: short delay for gradient recovery [100 usec]
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;cnst19: H(Me) chemical shift (offset, in ppm)
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;l0: number of repeats for entire experiment
;NS: 8 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 31%
;gpz3: -40%
;gpz4: 11%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SINE.10
;gpnam4: SINE.10
                                          ;preprocessor-flags-start
;SINGLEDWELL: for initial sampling delay of one dwell-time with
;	    option -DSINGLEDWELL (eda: ZGOPTNS)
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

;$Id: hmqcphpr,v 1.4 2007/04/11 13:34:30 ber Exp $