testing hmqc_CH3_1Hcsa.cw

testing hmqc_CH3_1Hcsa.cw

;IPAP HMQC for measurement of 1H CSA via 1H CSA/1H-13C DD CCR
; set td1 = 2*number of relaxation time points
;Chris Waudby, July 2020
;
;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)"
"d3=1s/(cnst2*8)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf2/2"
"d0=in0/2-0.63662*p3-2*p1"

; loop counter for IPAP
"l1=0"

define delay vdmin
"vdmin=2*(p2+4u+p17+d16)"

"acqt0=0"
baseopt_echo

aqseq 312

1 ze
  vdmin
  d11 pl1:f1 pl2:f2
2 d11

  20u
  "TAU1=vd*0.25-4u-p17-d16-p3"
  "TAU2=vd*0.25-p3-p1"
  "TAU3=vd*0.25-p1-4u-p17-d16-p3"
  "TAU4=vd*0.25-p3"

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

  ; relaxation period
  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD

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

  ; start main sequence
  (p1 ph1):f1  ; INEPT
  "DELTA1=d2-p16-d16+0.6366*p1"
  DELTA1
  p16:gp2
  d16

  ; purge element
  (p3 ph11):f2
  "DELTA=d3-p17-d16-larger(p1,p3)"
  DELTA
  p17:gp3
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  DELTA
  p17:gp3
  d16
  (p3 ph12):f2

  ; t1 evolution
  d0
  (p1 ph13):f1
  (p2 ph14):f1
  (p1 ph13):f1
  d0
  (p3 ph15):f2

  ; relaxation period
  "TAU=vd*0.5-p17-d16-p2-4u"
  TAU
  4u
  p17:gp4
  d16
  (p1 ph1):f1
  (p2 ph2):f1
  (p1 ph1):f1
  4u
  p17:gp4
  d16
  TAU

  ; IPAP back-transfer
  if "l1 % 2 == 0" {
  ; IP
  "DELTA2=d2*0.5-p16-d16-p3"
  p16:gp2
  d16
  DELTA2
  p4:f2 ph1
  "DELTA3=d2*0.5-p3-4u"
  DELTA3
  4u BLKGRAD
  } else {
  ; AP
  "DELTA2=d2-p16-d16-p3-4u"
  p16:gp2
  d16
  DELTA2
  p3:f2 ph1
  4u BLKGRAD
  }

  ; acquisition
  go=2 ph31
  d11 mc #0 to 2
    F1I(iu1, 2)
    F1QF(ivd)
    F2PH(ip15, id0)

  4u BLKGRAD
exit

ph1= 0
ph2= 1
ph11=0 2
ph12=1 1 1 1 3 3 3 3
ph13=0 0 1 1 2 2 3 3
ph14=1 1 2 2 3 3 0 0
ph15=0
ph29=0
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
;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 [300 usec]
;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
;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: 8 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ

;for z-only gradients:
;gpz1: 31%
;gpz2: 7%
;gpz3: -40%
;gpz4: 29%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.32
                                          ;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 $

;IPAP HMQC for measurement of 1H CSA via 1H CSA/1H-13C DD CCR
; set td1 = 2*number of relaxation time points
;Chris Waudby, July 2020
;
;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)"
"d3=1s/(cnst2*8)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf2/2"
"d0=in0/2-0.63662*p3-2*p1"

; loop counter for IPAP
"l1=0"

define delay vdmin
"vdmin=2*(p2+4u+p17+d16)"

"acqt0=0"
baseopt_echo

aqseq 312

1 ze
  vdmin
  d11 ph1:f1 pl3:f2
2 d11

  20u
  "TAU1=vd*0.25-4u-p17-d16-p3"
  "TAU2=vd*0.25-p3-p1"
  "TAU3=vd*0.25-p1-4u-p17-d16-p3"
  "TAU4=vd*0.25-p3"

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

  ; relaxation period
  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD

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

  ; start main sequence
  (p1 ph1):f1  ; INEPT
  "DELTA1=d2-p16-d16+0.6366*p1"
  DELTA1
  p16:gp2
  d16

  ; purge element
  (p3 ph11):f2
  "DELTA=d3-p17-d16-larger(p1,p3)"
  DELTA
  p17:gp3
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  DELTA
  p17:gp3
  d16
  (p3 ph12):f2

  ; t1 evolution
  d0
  (p1 ph13):f1
  (p2 ph14):f1
  (p1 ph13):f1
  d0
  (p3 ph15):f2

  ; relaxation period
  "TAU=vd*0.5-p17-d16-p2-4u"
  TAU
  4u
  p17:gp4
  d16
  (p1 ph1):f1
  (p2 ph2):f1
  (p1 ph1):f1
  4u
  p17:gp4
  d16
  TAU

  ; IPAP back-transfer
  if "l1 % 2 == 0" {
  ; IP
  "DELTA2=d2*0.5-p16-d16-p3"
  p16:gp2
  d16
  DELTA2
  p4:f2 ph1
  "DELTA3=d2*0.5-p3-4u"
  DELTA3
  4u BLKGRAD
  } else {
  ; AP
  "DELTA2=d2-p16-d16-p3-4u"
  p16:gp2
  d16
  DELTA2
  p3:f2 ph1
  4u BLKGRAD
  }

  ; acquisition
  go=2 ph31
  d11 mc #0 to 2
    F1I(iu1, 2)
    F1QF(ivd)
    F2PH(ip15, id0)

  4u BLKGRAD
exit

ph1= 0
ph2= 1
ph11=0 2
ph12=1 1 1 1 3 3 3 3
ph13=0 0 1 1 2 2 3 3
ph14=1 1 2 2 3 3 0 0
ph15=0
ph29=0
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
;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 [300 usec]
;p22 : f3 channel - 180 degree high power pulse
;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
;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: 8 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ

;for z-only gradients:
;gpz1: 31%
;gpz2: 7%
;gpz3: -40%
;gpz4: 29%

;use gradient files:
;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.32
;gpnam4: SMSQ10.32
                                          ;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 $


correcting project_ste sequence

correcting project_ste sequence

; project_ste.cw
; PROJECT-STE T2-D correlation sequence
;
; based on J.A. Aguilar, M. Nilsson, G. Bodenhausen and G. Morris
; Chem. Commun. (2012) 48 811-813
;
; run as pseudo-3D
; with presaturation
;
; Chris Waudby
; July 2018

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

prosol relations=<triple>

;define list<gradient> diff=<Difframp>
define list<gradient> diff={0.089 0.096 0.121 0.164 0.214 0.271 0.332 0.396 0.463 0.532 0.604 0.675 0.750 0.827 0.904 0.982}
;define list<loopcounter> ncyc = {0 1 2 4 6 8 10 13 16 19 22 26 29 33 37 41}
define list<loopcounter> ncyc = {0 41 1 37 2 33 4 29 6 26 8 22 10 19 13 16}

"p2=p1*2"
"d2=250u"
"d3=4*d2"  ; T2 time per loop
"d12=20u"
"DELTA1=d2-p1"
"DELTA2=d2-1.5*p1"
"TAU=d20-p30*2-p19-d16*3-p11-p1*4-8u"
"acqt0=-0.6366*p1"

; acquisition order = D then T2
aqseq 321

1 ze
2 30m pl9:f1
  d1 cw:f1 ph29
  4u do:f1
  d12 pl1:f1 UNBLKGRAD

  ; start PROJECT echos
  p1 ph11

3 DELTA1
  p2 ph2
  DELTA2
  p1 ph12
  DELTA2
  p2 ph2
  DELTA1
  lo to 3 times ncyc

  ; STE encoding
  p30:gp6*diff
  d16
  p2 ph14
  p30:gp6*-1*diff
  d16
  p1 ph15

  ; diffusion delay
  4u
  p19:gp7
  d16 ;pl9:f1
  TAU ;cw:f1 ph1
  4u ;do:f1

  ; water flip-down and STE decoding
  (p11:sp1 ph23:r)
  4u pl1:f1
  p1 ph13
  p30:gp6*diff
  d16
  p2 ph1
  p30:gp6*-1*diff
  d16
  4u BLKGRAD

  ; acquisition
  go=2 ph31
  30m mc #0 to 2
      F2QF(igrad diff)
      F1QF(ncyc.inc)
exit

ph1 =0
ph2 =1
ph11=0 2
ph12=1 1 3 3
ph13=0 0 0 0  3 3 3 3  2 2 2 2  1 1 1 1
ph23=2 2 2 2  1 1 1 1  0 0 0 0  3 3 3 3
ph14=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
ph15=0 0 0 0  0 0 0 0  0 0 0 0  0 0 0 0
     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
     2 2 2 2  2 2 2 2  2 2 2 2  2 2 2 2
ph29=0
ph31=0 2 0 2  1 3 1 3  2 0 2 0  3 1 3 1
     0 2 0 2  1 3 1 3  2 0 2 0  3 1 3 1
     2 0 2 0  3 1 3 1  0 2 0 2  1 3 1 3
     2 0 2 0  3 1 3 1  0 2 0 2  1 3 1 3

;pl1: f1 channel - power level for pulse (default)
;pl9: f1 channel - power level for presaturation
;p1 : f1 channel - 90 degree excitation pulse
;p2 : f1 channel - 180 degree refocusing pulse
;p19: gradient pulse 2 (spoil gradient)
;p30: gradient pulse (little DELTA * 0.5) [2.75ms]
;d1 : relaxation delay; 1-5 * T1
;d2 : tau (T2 time = 4*d2*vc)
;d3 : total T2 time per loop
;d12: delay for power switching [20 usec]
;d16: delay for gradient recovery
;d20: diffusion time (big DELTA)
;ds : 16
;ns : 32*n

;for z-only gradients:
;gpz6: 100%
;gpz7: -17.13% (spoil)

;use gradient files:
;gpnam6: SMSQ10.100
;gpnam7: SINE.100

;use AU-program dosy to calculate gradient-file Difframp

; project_ste.cw
; PROJECT-STE T2-D correlation sequence
;
; based on J.A. Aguilar, M. Nilsson, G. Bodenhausen and G. Morris
; Chem. Commun. (2012) 48 811-813
;
; run as pseudo-3D
; with presaturation
;
; Chris Waudby
; July 2018

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

prosol relations=<triple>

;define list<gradient> diff=<Difframp>
define list<gradient> diff={0.089 0.096 0.121 0.164 0.214 0.271 0.332 0.396 0.463 0.532 0.604 0.675 0.750 0.827 0.904 0.982}
;define list<loopcounter> ncyc = {0 1 2 4 6 8 10 13 16 19 22 26 29 33 37 41}
define list<loopcounter> ncyc = {0 41 1 37 2 33 4 29 6 26 8 22 10 19 13 16}

"p2=p1*2"
"d2=250u"
"d3=4*d2"  ; T2 time per loop
"d12=20u"
"DELTA1=d2-p1"
"DELTA2=d2-1.5*p1"
"TAU=d20-p30*2-p19-d16*3-p11-p1*4-8u"
"acqt0=-0.6366*p1"

; acquisition order = D then T2
aqseq 321

1 ze
2 30m pl9:f1
  d1 cw:f1 ph29
  4u do:f1
  d12 pl1:f1 UNBLKGRAD

  ; start PROJECT echos
  p1 ph11

3 DELTA1
  p2 ph2
  DELTA2
  p1 ph12
  DELTA2
  p2 ph2
  DELTA1
  lo to 3 times ncyc

  ; STE encoding
  p30:gp6*diff
  d16
  p2 ph14
  p30:gp6*-1*diff
  d16
  p1 ph15

  ; diffusion delay
  4u
  p19:gp7
  d16 pl9:f1
  TAU cw:f1 ph1
  4u do:f1

  ; water flip-down and STE decoding
  (p11:sp1 ph23:r)
  4u pl1:f1
  p1 ph13
  p30:gp6*diff
  d16
  p2 ph1
  p30:gp6*-1*diff
  d16
  4u BLKGRAD

  ; acquisition
  go=2 ph31
  30m mc #0 to 2
      F2QF(igrad diff)
      F1QF(ncyc.inc)
exit

ph1 =0
ph2 =1
ph11=0 2
ph12=1 1 3 3
ph13=0 0 0 0  1 1 1 1  2 2 2 2  3 3 3 3
ph23=2 2 2 2  3 3 3 3  0 0 0 0  1 1 1 1
ph14={0}*16 {2}*16
ph15={0}*32 {2}*32
ph29=0
ph31={0 2 0 2  1 3 1 3  2 0 2 0  3 1 3 1}*2
     {2 0 2 0  3 1 3 1  0 2 0 2  1 3 1 3}*2

;pl1: f1 channel - power level for pulse (default)
;pl9: f1 channel - power level for presaturation
;p1 : f1 channel - 90 degree excitation pulse
;p2 : f1 channel - 180 degree refocusing pulse
;p19: gradient pulse 2 (spoil gradient)
;p30: gradient pulse (little DELTA * 0.5) [2.75ms]
;d1 : relaxation delay; 1-5 * T1
;d2 : tau (T2 time = 4*d2*vc)
;d3 : total T2 time per loop
;d12: delay for power switching [20 usec]
;d16: delay for gradient recovery
;d20: diffusion time (big DELTA)
;ds : 16
;ns : 32*n

;for z-only gradients:
;gpz6: 100%
;gpz7: -17.13% (spoil)

;use gradient files:
;gpnam6: SMSQ10.100
;gpnam7: SINE.100

;use AU-program dosy to calculate gradient-file Difframp


define cnst4=92Hz explicitly for ts3.5pl6

;Added option for off-resonance presat (e.g. to suppress urea signal), 21/6/15
;
;With option for 1D (first row)
;
;sfhmqcf3gpph
;avance-version (09/11/18)
;SOFAST HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;P.Schanda and B. Brutscher, J. Am. Chem. Soc. 127, 8014 (2005)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

"cnst4=92"

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

"in0=inf1"

# ifndef ONE_D

"d0=in0/2-p21*4/3.1415"

# endif /*ONE_D*/

"DELTA1=d21-p16-d16-p39*cnst39"
"DELTA2=p39*cnst39-de-4u"
"acqt0=de"

# ifdef OFFRES_PRESAT
  "TAU=d1-10m-60u-d12*2-d13"
# else
  "TAU=d1-10m"
# endif /*OFFRES_PRESAT*/

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

1 ze
  d11 pl26:f3
2 10m do:f3

# ifdef OFFRES_PRESAT

  30u fq=cnst21(bf hz):f1
  d12 pl9:f1
  TAU cw:f1 ph29
  d13 do:f1
  d12 pl1:f1
  30u fq=0:f1

# else

  TAU

# endif /*OFFRES_PRESAT*/

3 d12 pl3:f3
  50u UNBLKGRAD

  p16:gp2
  d16

  (p39:sp23 ph1):f1
  p16:gp1
  d16

# ifndef ONE_D

#   ifdef LABEL_CN
  (center (p40:sp24 ph2):f1 (p8:sp13 ph1):f2 (DELTA1 p21 ph3 d0 p21 ph4 DELTA1):f3 )
#   else
  (center (p40:sp24 ph2):f1 (DELTA1 p21 ph3 d0 p21 ph4 DELTA1):f3 )
#   endif /*LABEL_CN*/

# else

 (center (p40:sp24 ph2):f1 (DELTA1 p21 ph3 6u p21 ph4 DELTA1):f3 )

# endif /*ONE_D*/

  DELTA2
  p16:gp1
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3
  10m do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=0
ph3=0 2
ph4=0 0 2 2
ph29=0
ph31=0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB decoupling (low power)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;sp23: f1 channel - shaped pulse 120 degree
;                   (Pc9_4_120.1000 or Q5.1000)
;sp24: f1 channel - shaped pulse 180 degree (Rsnob.1000)
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;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/(2J)NH
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529
;           Q5.1000: -0.07
;inf1: 1/SW(N) = 2 * DW(N)
;in0: 1/ SW(N) = 2 * DW(N)
;nd0: 1
;NS: 2 * n
;DS: 16
;aq: <= 50 msec
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;          use pulse of >= 350 usec

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

;for z-only gradients:
;gpz1: 11%
;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)
                                          ;preprocessor-flags-end

;Processing

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

;$Id: sfhmqcf3gpph,v 1.1.2.8 2009/11/18 11:19:58 ber Exp $

;Added option for off-resonance presat (e.g. to suppress urea signal), 21/6/15
;
;With option for 1D (first row)
;
;sfhmqcf3gpph
;avance-version (09/11/18)
;SOFAST HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;P.Schanda and B. Brutscher, J. Am. Chem. Soc. 127, 8014 (2005)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

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

"in0=inf1"

# ifndef ONE_D

"d0=in0/2-p21*4/3.1415"

# endif /*ONE_D*/

"DELTA1=d21-p16-d16-p39*cnst39"
"DELTA2=p39*cnst39-de-4u"
"acqt0=de"

# ifdef OFFRES_PRESAT
  "TAU=d1-10m-60u-d12*2-d13"
# else
  "TAU=d1-10m"
# endif /*OFFRES_PRESAT*/

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

1 ze
  d11 pl26:f3
2 10m do:f3

# ifdef OFFRES_PRESAT

  30u fq=cnst21(bf hz):f1
  d12 pl9:f1
  TAU cw:f1 ph29
  d13 do:f1
  d12 pl1:f1
  30u fq=0:f1

# else

  TAU

# endif /*OFFRES_PRESAT*/

3 d12 pl3:f3
  50u UNBLKGRAD

  p16:gp2
  d16

  (p39:sp23 ph1):f1
  p16:gp1
  d16

# ifndef ONE_D

#   ifdef LABEL_CN
  (center (p40:sp24 ph2):f1 (p8:sp13 ph1):f2 (DELTA1 p21 ph3 d0 p21 ph4 DELTA1):f3 )
#   else
  (center (p40:sp24 ph2):f1 (DELTA1 p21 ph3 d0 p21 ph4 DELTA1):f3 )
#   endif /*LABEL_CN*/

# else

 (center (p40:sp24 ph2):f1 (DELTA1 p21 ph3 6u p21 ph4 DELTA1):f3 )

# endif /*ONE_D*/

  DELTA2
  p16:gp1
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3
  10m do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=0
ph3=0 2
ph4=0 0 2 2
ph29=0
ph31=0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB decoupling (low power)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;sp23: f1 channel - shaped pulse 120 degree
;                   (Pc9_4_120.1000 or Q5.1000)
;sp24: f1 channel - shaped pulse 180 degree (Rsnob.1000)
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;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/(2J)NH
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529
;           Q5.1000: -0.07
;inf1: 1/SW(N) = 2 * DW(N)
;in0: 1/ SW(N) = 2 * DW(N)
;nd0: 1
;NS: 2 * n
;DS: 16
;aq: <= 50 msec
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;          use pulse of >= 350 usec

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

;for z-only gradients:
;gpz1: 11%
;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)
                                          ;preprocessor-flags-end

;Processing

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

;$Id: sfhmqcf3gpph,v 1.1.2.8 2009/11/18 11:19:58 ber Exp $


testing and correcting hsqct2etf3gpsi3d.cw

;tested on topspin 3.5pl6 - interleaving doesn't work!
;Clean-up gradient pairs added in SE block, bipolar gradients during t1
;Delays adjusted for zero first-order phase correction
;
;hsqct2etf3gpsi3d
;avance-version (07/04/04)
;3D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;for measuring N-15 T2 relaxation times
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;as pseudo3D
;(use parameterset HSQCT2ETF3GPSI3D)
;
;$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"
"d24=1s/(cnst4*cnst11)"
"d25=1s/(cnst4*cnst12)"
"d26=1s/(cnst4*4)"

"d21=450u"

define delay loopduration
"loopduration=(p30*16+d21*32)"

"d10=10u"

"in10=inf2/4"

"DELTA2=p16+d16+8u+d12+de-0.6366*p1"
"DELTA3=d21-p2/2"
"DELTA4=d25-p16-d16"
"DELTA5=d24-p16-d16-4u"
"DELTA6=d26-p16-d16-4u"

#   ifdef LABEL_CN
"DELTA1=d25-p16-d16-larger(p2,p8)-d10*2-p21*4/3.1415"
"spoff13=bf2*((cnst21+cnst22)/2000000)-o2"
#   else
"DELTA1=d25-p16-d16-p2-d10*2-p21*4/3.1415"
#   endif /*LABEL_CN*/

"spoff1=0"

aqseq 312

1 ze
  loopduration
  d11 pl16:f3 ;st0
2 6m
3 3m
4 d11 do:f3
  4u  BLKGRAD

  ; purge 1H magnetisation
  4u pl12:f1
  2mp ph1
  3mp ph2
  4u pl1:f1

  d1

  100u UNBLKGRAD
  (p1 ph1)
  d26 pl3:f3
  (center (p2 ph1) (p22 ph1):f3 )
  d26
  (p1 ph2)

  4u pl0:f1
  (p11:sp11 ph1:r):f1		; flipback(+x), +y -> +z
  4u

  p16:gp1
  d16 pl1:f1

  (p21 ph3):f3
  d25
  (center (p2 ph1) (p22 ph6):f3 )	; water -> -z
  d25 pl23:f3

6 d21
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  DELTA3
  (p2 ph1)				; water -> +z
  DELTA3
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  d21*2
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  DELTA3
  (p2 ph8)				; water -> -z
  DELTA3
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  d21
  lo to 6 times c

  p16:gp2*-1*EA
  d16
  DELTA4 pl3:f3
  (p22 ph6):f3

  2u
  d10 gron0
  d10 gron0*-1
  8u groff

#   ifdef LABEL_CN
  (center (p2 ph7) (p8:sp13 ph1):f2 )	; water -> +z
#   else
  (p2 ph7)
#   endif /*LABEL_CN*/

  2u
  d10 gron0
  d10 gron0*-1
  8u groff

  p16:gp2*EA
  d16
  DELTA1

  (center (p1 ph1) (p21 ph4):f3 )	; water -> -y
  4u
  p16:gp4
  d16
  DELTA5
  (center (p2 ph1) (p22 ph1):f3 )	; water -> +y
  DELTA5
  4u
  p16:gp4
  d16
  (center (p1 ph2) (p21 ph5):f3 )	; water -- +y
  4u
  p16:gp5
  d16
  DELTA6
  (center (p2 ph1) (p22 ph1):f3 )	; water -> -y
  DELTA6
  4u
  p16:gp5
  d16
  (p1 ph1)				; water -> -z
  DELTA2
  (p2 ph1)				; water -> +z
  4u
  p16:gp3
  d16
  d12 pl16:f3
  4u  BLKGRAD

  go=4 ph31 cpd3:f3
  d11 do:f3 mc #0 to 4
    F1QF(ivc)
    F2EA(igrad EA & ip5*2 & rpp3 rpp4 rpp5 rpp6 rpp7 rpp31, id10 & ip3*2 & ip6*2 & ip31*2)

; BROKEN INTERLEAVING (?)
;  goscnp ph31 cpd3:f3

;  3m do:f3
;  3m st ivc
;  lo to 3 times nbl

;  3m ipp3 ipp4 ipp5 ipp6 ipp7 ipp31
;  lo to 4 times ns

;  d1 mc #0 to 4
;     F1QF()
;     F2EA(igrad EA & ip5*2 & rpp3 rpp4 rpp5 rpp6 rpp7 rpp31, id10 & ip3*2 & ip6*2 & ip31*2)
  4u
exit

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

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl12: f1 channel - 10 kHz purge pulse
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;pl23: f3 channel - power level for CPMG pulse train
;sp1 : f1 channel - shaped pulse  90 degree
;sp11: f1 channel - shaped pulse  90 degree water flip-back
;sp13: f2 channel - shaped pulse 180 degree  (Ca and C=O, adiabatic)
;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
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p30: f3 channel - 180 degree pulse at pl23 [80-90 usec]
;d1 : relaxation delay; 1-5 * T1
;d10 : incremented delay                             [3 usec]
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21: echo delay                                     [450 usec]
;d24: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d25: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d26: 1/(4J(YH))
;cnst4: = J(YH)
;cnst11: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst12: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst21: CO chemical shift (offset, in ppm)
;cnst22: Calpha chemical shift (offset, in ppm)
;vc : variable loop-coounter for T2 delay, taken from vc-list
;inf2: 1/SW(X) = 2 * DW(X)
;in10: 1/(2 * SW(X)) = DW(X)
;nd10: 2
;NS: 2 * n
;DS: >= 16
;td1: number of delays in vc-list
;td2: number of experiments in F2
;NBL: = td1
;FnMODE: QF in F1
;FnMODE: echo-antiecho 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: 30%
;gpz2: 80%
;gpz3: 16.2%
;gpz4: 7%
;gpz5: 11%

;use gradient files:
;gpnam1: SINE.100
;gpnam2: SINE.100
;gpnam3: SINE.100
;gpnam4: SINE.100
;gpnam5: SINE.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

;$Id: hsqct2etf3gpsi3d,v 1.5 2007/04/11 13:34:30 ber Exp $

;tested on topspin 3.5pl6 - interleaving doesn't work!
;Clean-up gradient pairs added in SE block, bipolar gradients during t1
;Delays adjusted for zero first-order phase correction
;
;hsqct2etf3gpsi3d
;avance-version (07/04/04)
;3D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;for measuring N-15 T2 relaxation times
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;as pseudo3D
;(use parameterset HSQCT2ETF3GPSI3D)
;
;$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"
"d24=1s/(cnst4*cnst11)"
"d25=1s/(cnst4*cnst12)"
"d26=1s/(cnst4*4)"

"d21=450u"

define delay loopduration
"loopduration=(p30*16+d21*32)"

"d10=10u"

"in10=inf2/4"

"DELTA2=p16+d16+8u+d12+de-0.6366*p1"
"DELTA3=d21-p2/2"
"DELTA4=d25-p16-d16"
"DELTA5=d24-p16-d16-4u"
"DELTA6=d26-p16-d16-4u"

#   ifdef LABEL_CN
"DELTA1=d25-p16-d16-larger(p2,p8)-d10*2-p21*4/3.1415"
"spoff13=bf2*((cnst21+cnst22)/2000000)-o2"
#   else
"DELTA1=d25-p16-d16-p2-d10*2-p21*4/3.1415"
#   endif /*LABEL_CN*/

"spoff1=0"

aqseq 312

1 ze
  loopduration
  d11 pl16:f3 ;st0
2 6m
3 3m
4 d11 do:f3
  4u  BLKGRAD

  ; purge 1H magnetisation
  4u pl12:f1
  2mp ph1
  3mp ph2
  4u pl1:f1

  d1

  100u UNBLKGRAD
  (p1 ph1)
  d26 pl3:f3
  (center (p2 ph1) (p22 ph1):f3 )
  d26
  (p1 ph2)

  4u pl0:f1
  (p11:sp11 ph1:r):f1		; flipback(+x), +y -> +z
  4u

  p16:gp1
  d16 pl1:f1

  (p21 ph3):f3
  d25
  (center (p2 ph1) (p22 ph6):f3 )	; water -> -z
  d25 pl23:f3

6 d21
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  DELTA3
  (p2 ph1)				; water -> +z
  DELTA3
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  d21*2
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  DELTA3
  (p2 ph8)				; water -> -z
  DELTA3
  (p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6 d21*2 p30 ph6):f3
  d21
  lo to 6 times c

  p16:gp2*-1*EA
  d16
  DELTA4 pl3:f3
  (p22 ph6):f3

  2u
  d10 gron0
  d10 gron0*-1
  8u groff

#   ifdef LABEL_CN
  (center (p2 ph7) (p8:sp13 ph1):f2 )	; water -> +z
#   else
  (p2 ph7)
#   endif /*LABEL_CN*/

  2u
  d10 gron0
  d10 gron0*-1
  8u groff

  p16:gp2*EA
  d16
  DELTA1

  (center (p1 ph1) (p21 ph4):f3 )	; water -> -y
  4u
  p16:gp4
  d16
  DELTA5
  (center (p2 ph1) (p22 ph1):f3 )	; water -> +y
  DELTA5
  4u
  p16:gp4
  d16
  (center (p1 ph2) (p21 ph5):f3 )	; water -- +y
  4u
  p16:gp5
  d16
  DELTA6
  (center (p2 ph1) (p22 ph1):f3 )	; water -> -y
  DELTA6
  4u
  p16:gp5
  d16
  (p1 ph1)				; water -> -z
  DELTA2
  (p2 ph1)				; water -> +z
  4u
  p16:gp3
  d16
  d12 pl16:f3
  4u  BLKGRAD

  go=4 ph31 cpd3:f3
  d11 do:f3 mc #0 to 4
    F1QF(ivc)
    F2EA(igrad EA & ip5*2 & rpp3 rpp4 rpp5 rpp6 rpp7 rpp31, id10 & ip3*2 & ip6*2 & ip31*2)

; BROKEN INTERLEAVING (?)
;  goscnp ph31 cpd3:f3

;  3m do:f3
;  3m st ivc
;  lo to 3 times nbl

;  3m ipp3 ipp4 ipp5 ipp6 ipp7 ipp31
;  lo to 4 times ns

;  d1 mc #0 to 4
;     F1QF()
;     F2EA(igrad EA & ip5*2 & rpp3 rpp4 rpp5 rpp6 rpp7 rpp31, id10 & ip3*2 & ip6*2 & ip31*2)
  d31
exit

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

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl12: f1 channel - 10 kHz purge pulse
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;pl23: f3 channel - power level for TOCSY-spinlock
;sp1 : f1 channel - shaped pulse  90 degree
;sp11: f1 channel - shaped pulse  90 degree water flip-back
;sp13: f2 channel - shaped pulse 180 degree  (Ca and C=O, adiabatic)
;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
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p30: f3 channel - 180 degree pulse at pl23
;d1 : relaxation delay; 1-5 * T1
;d10 : incremented delay                             [3 usec]
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21: echo delay                                     [450 usec]
;d24: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d25: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d26: 1/(4J(YH))
;d31: length of single cpmg loop
;cnst4: = J(YH)
;cnst11: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst12: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst21: CO chemical shift (offset, in ppm)
;cnst22: Calpha chemical shift (offset, in ppm)
;vc : variable loop-coounter for T2 delay, taken from vc-list
;inf2: 1/SW(X) = 2 * DW(X)
;in10: 1/(2 * SW(X)) = DW(X)
;nd10: 2
;NS: 2 * n
;DS: >= 16
;td1: number of delays in vc-list
;td2: number of experiments in F2
;NBL: = td1
;FnMODE: QF in F1
;FnMODE: echo-antiecho 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: 30%
;gpz2: 80%
;gpz3: 16.2%
;gpz4: 7%
;gpz5: -5%

;use gradient files:
;gpnam1: SINE.100
;gpnam2: SINE.100
;gpnam3: SINE.100
;gpnam4: SINE.100
;gpnam5: SINE.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

;$Id: hsqct2etf3gpsi3d,v 1.5 2007/04/11 13:34:30 ber Exp $


fix and test hqqcetpr.cw

fix and test hqqcetpr.cw

; HQQC (gradient-selected)
; Chris Waudby Jul 2019
;

#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"
"d0=in0/2"

define list<grad_scalar> gl1 = { 0.13 }
define list<grad_scalar> gl2 = { 0.1 }
define list<grad_scalar> gl3 = { -0.737 0.65 }

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

1 ze
  d11 pl12:f2
2 d11 do:f2
  4u BLKGRAD

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

  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  30u fq=0:f1

  ; purge Cz
  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD
  (p3 ph1):f2
  4u
  p16:gp1
  d16*2

  ; begin main sequence
  (p1 ph11):f1
  ; note this is NOT an inept transfer - delays are 1/2J - transfer to CxHyHzHz
  DELTA1 ; 1/2J
  p16:gp2*gl1
  d16
  (center (p2 ph1):f1 (p3 ph12):f2 )
  p16:gp2*gl1
  d16
  DELTA1

  ; CxHyHzHz -> CxHyHxHx [4QC]
  p1 ph1
  d0
  p16:gp2*gl2
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  p16:gp2*gl2*-1
  d16
  p1 ph1

  p16:gp2*gl3
  d16
  DELTA1
  (center (p2 ph1):f1 (p3 ph1):f2 )
  p16:gp2*gl1
  d16 pl12:f2
  DELTA1 BLKGRAD

  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2 F1EA(gl3.inc, id0)
  4u BLKGRAD
exit

ph1=0
ph2=1
ph3=2
ph11=0 2
ph12=0 0 2 2
ph13=0
ph29=0
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
;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

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

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

; HQQC (gradient-selected)
; Chris Waudby Jul 2019
;

#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"
"d0=in0"

define list<grad_scalar> gl1 = { 0.13 }
define list<grad_scalar> gl2 = { 0.1 }
define list<grad_scalar> gl3 = { -0.87 0.73 }

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

1 ze
  d11 pl12:f2
2 d11 do:f2
  4u BLKGRAD

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

  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
  30u fq=0:f1

  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD
  (p3 ph1):f2
  4u
  p16:gp1
  d16*2

  (p1 ph1):f1

  ; note this is NOT an inept transfer - delays are 1/2J - transfer to CxHyHzHz
  DELTA1 ; 1/2J
  p16:gp2*gl1
  d16
  (center (p2 ph1):f1 (p3 ph1):f2 )
  p16:gp2*gl1
  d16
  DELTA1

  ; CxHyHzHz -> CxHyHxHx [4QC]
  p1 ph1
  d0
  p16:gp2*gl2
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  p16:gp2*gl2*-1
  d16
  p1 ph3

  p16:gp2*gl3
  d16
  DELTA1
  (center (p2 ph1):f1 (p3 ph1):f2 )
  p16:gp2*gl1
  d16 pl12:f2
  DELTA1 BLKGRAD

  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2 F1EA(gl3.inc, id0)
  4u BLKGRAD
exit

ph1=0
ph3=2
ph29=0
ph31=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

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

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


adding 13C decoupling to b_trosy_hzdqc.cw

;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

;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 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"
     {
  (ralign (p40:sp24 ph16) (DELTA2 p21 ph13 d0 p21 ph1 d3):f3 )
  DELTA3
     }
  else
     {
  DELTA3
  ;(lalign (p40:sp24 ph16) (d3 p21 ph23 d0 p21 ph1 DELTA2):f3 )
  (p40:sp24 ph16) (d3 p21 ph23 d0 p21 ph1 DELTA2):f3
     }
  4u
  p16:gp2
  d16
  (center (p40:sp24 ph1) (p22 ph1):f3 )
  4u
  p16:gp2
  d16
  DELTA4 BLKGRAD
  (p21 ph14):f3

  go=2 ph31
  d11 mc #0 to 2
     F1EA(iu0 & ip13*2 & ip14*2, id0 & ip10*2 & ip31*2)

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


gs-NOE for better solvent suppression

gs-NOE for better solvent suppression

;13C_NOE
; 13C het-NOE measurement
; starting with equilibrium 13Cz magnetisation
;
; with option for pseudo-2D measurement (-DONE_D), set td2=1
;
;avance-version (15/02/27)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;constant time version
;using trim pulses in inept transfer
;using shaped pulses for inversion on f2 - channel
;
;(G.W. Vuister & A. Bax, J. Magn. Reson. 98, 428-435 (1992))
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

"p2=p1*2"
"p0=p1*125/90" ; NOE saturation 125 degree pulse
"p4=p3*2"
"d3=1s/(cnst2*6.58)"
"d4=1s/(cnst2*4)"
"d11=30m"
"d12=20u"

"in0=inf2"
#ifdef ONE_D
"d0=0.1u"
#else
"d0=in0/2-p3*0.6366"
#endif

"DELTA1=d3-4u-p17-d16-larger(p2,p3)"
"DELTA2=d4-4u-p17-d16-larger(p1,p3)"

; calculate offset for WFB
"spoff1=cnst21-o1"

; loop counters for NOE during recycle period
"l0=1"
"d30=2.5m-p0*0.5"
"l4=d31/(p0+2*d30)"

"acqt0=0.6366*p1"
baseopt_echo

1 ze
  d11 pl12:f2
2 d1 do:f2

  4u UNBLKGRAD
  4u pl1:f1 pl2:f2

  ; NOE buildup
  if "l0 %2 == 1"
  {
4 d30
  (p0 ph1)
  d30
  lo to 4 times l4
  }
  else
  {
  d31
  }

  ; t1 evolution (with 1H CPD)
  d16 pl8:f1
  (p3 ph11):f2
  d0 cpd1:f1

  ; back-transfer
  4u do:f1
  p17:gp1
  d16
  DELTA1 pl1:f1
  (center (p1 ph2 p2 ph1 p1 ph2) (p4 ph1):f2 )
  4u
  DELTA1
  p17:gp2
  d16
  (p3 ph12):f2

  ; zz-filter
  4u
  p16:gp3
  d16

  ; water flip-back
  (p11:sp1 ph3):f1
  4u pl1:f1

  ; second INEPT back-transfer
  (p1 ph1):f1
  4u
  p17:gp4
  d16
  DELTA2
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA2
  p17:gp5
  d16 pl12:f2
  4u BLKGRAD

  ; acquisition
  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2
     F1QF(iu0)
     F2PH(ip11, id0)
     F0()
exit

ph1 =0
ph2 =1
ph3 =2
ph11=0 2
ph12=1 1 3 3
ph31=0 2 2 0

;pl0 : 0W
;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
;sp1 : f1 channel - 90 degree WFB
;sp3 : f2 channel - shaped pulse 180 degree (on resonance)
;sp5 : f2 channel - shaped pulse 180 degree (off resonance)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p11: f1 channel - 90 degree WFB
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse
;p17: gradient pulse [300 usec]
;d0 : incremented delay (2D)
;d1 : relaxation delay; 1-5 * T1
;d31: saturation period
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(XH)
;cnst21: off-resonance presat frequency (bf hz)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(SW(X)) = DW(X)
;ns: 4 * n
;ds: 4
;td1: number of experiments
;FnMODE: states-tppi
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:    gp 1 : gp 2
;                         80 : 20.1    for C-13
;                         80 :  8.1    for N-15

;for z-only gradients:
;gpz1: 60%
;gpz2: -20%
;gpz3: 35% (zz filters)
;gpz4: 13%
;gpz5: 33.1%

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

;$Id: hsqcctetgpsp,v 1.8.2.1 2015/03/03 11:21:23 ber Exp $

;13C_NOE
; 13C het-NOE measurement
; starting with equilibrium 13Cz magnetisation
;
; with option for pseudo-2D measurement (-DONE_D), set td2=1
;
;avance-version (15/02/27)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;constant time version
;using trim pulses in inept transfer
;using shaped pulses for inversion on f2 - channel
;
;(G.W. Vuister & A. Bax, J. Magn. Reson. 98, 428-435 (1992))
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

"p2=p1*2"
"p0=p1*125/90" ; NOE saturation 125 degree pulse
"p4=p3*2"
"d3=1s/(cnst2*6.58)"
"d4=1s/(cnst2*4)"
"d11=30m"
"d12=20u"

"in0=inf2"
#ifdef ONE_D
"d0=0.1u"
#else
"d0=in0/2-p3*0.6366"
#endif

"DELTA1=d3-4u-p17-d16-larger(p1,p3)"
"DELTA2=d4-4u-p16-d16-larger(p1,p3)"

; calculate offset for WFB
"spoff1=cnst21-o1"

; loop counters for NOE during recycle period
"l0=1"
"d30=2.5m-p0*0.5"
"l4=d31/(p0+2*d30)"

"acqt0=0.6366*p1"
baseopt_echo

1 ze
  d11 pl12:f2
2 d1 do:f2

  4u UNBLKGRAD
  4u pl1:f1 pl2:f2

  ; NOE buildup
  if "l0 %2 == 1"
  {
4 d30
  (p0 ph1)
  d30
  lo to 4 times l4
  }
  else
  {
  d31
  }

  ; t1 evolution (with 1H CPD)
  d16 pl8:f1
  (p3 ph11):f2
  d0 cpd1:f1

  ; back-transfer
  4u do:f1
  p17:gp2
  d16
  DELTA1 pl1:f1
  (center (p2 ph1) (p4 ph1):f2 )
  4u
  DELTA1
  p17:gp2
  d16
  (p3 ph12):f2

  ; zz-filter
  4u
  p16:gp3
  d16

  ; water flip-back
  (p11:sp1 ph3):f1
  4u pl1:f1

  ; second INEPT back-transfer
  (p1 ph1):f1
  4u
  p16:gp4
  d16
  DELTA2
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA2
  p16:gp4
  d16 pl12:f2
  4u BLKGRAD

  ; acquisition
  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2
     F1QF(iu0)
     F2PH(ip11, id0)
     F0()
exit

ph1 =0
ph2 =1
ph3 =2
ph11=0 2
ph12=1 1 3 3
ph31=0 2 2 0

;pl0 : 0W
;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
;sp1 : f1 channel - 90 degree WFB
;sp3 : f2 channel - shaped pulse 180 degree (on resonance)
;sp5 : f2 channel - shaped pulse 180 degree (off resonance)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p11: f1 channel - 90 degree WFB
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse
;p17: gradient pulse [300 usec]
;d0 : incremented delay (2D)
;d1 : relaxation delay; 1-5 * T1
;d31: saturation period
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(XH)
;cnst21: off-resonance presat frequency (bf hz)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(SW(X)) = DW(X)
;ns: 4 * n
;ds: 4
;td1: number of experiments
;FnMODE: states-tppi
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:    gp 1 : gp 2
;                         80 : 20.1    for C-13
;                         80 :  8.1    for N-15

;for z-only gradients:
;gpz1: 80%
;gpz2: 30.1% for C-13
;gpz3: 35% (zz filters)
;gpz4: 13% (180 refocusing)
;gpz5: 10% (180 refocusing)

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

;$Id: hsqcctetgpsp,v 1.8.2.1 2015/03/03 11:21:23 ber Exp $


fixes for cpmghmqcet.cw

fixes for cpmghmqcet.cw

;CPMG-HMQC with gradient selection
;hmqcet.cw
;1H,13C HMQC
;phase sensitive using Echo/Anti-Echo (Hurd & John 1991)
; Modern Instrumental Analysis, edited by Satinder Ahuja, Neil Jespersen, p286
;with decoupling during acquisition
;
;modified Chris Waudby 25/11/18

prosol relations=<triple>

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

"d11=30m"
"d12=20u"
"d21=1s/(cnst2*2)"
"p2=p1*2"

"in0=inf1/2"

"d0=3u"
"DELTA1=d21/32-larger(p1,p3)"
"DELTA=DELTA*2"

"DELTA2=p17+d17-p1*0.6366"
"TAU=p3*0.6366+p17+d17-p1-d0"
"acqt0=0"
baseopt_echo

1 ze
  d11 pl12:f2
2 d1 do:f2
  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD

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

  ; begin main sequence
  (p1 ph1):f1

#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
  d21
#endif /* CPMG1 */

  ; begin t1 period
  (p3 ph13):f2

  ; first spin-echo for gradient selection
  p17:gp1
  d17
  (p4 ph12):f2
  TAU

  ; t1 and central refocusing pulse
  d0
  (p2 ph1):f1
  d0

  ; second spin-echo for gradient selection
  TAU
  (p4 ph1):f2
  p17:gp1
  d17
  (p3 ph14):f2
  ; end t1 period

#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
#else
  d21
#endif /* CPMG2 */

  ; extra spin-echo for gradient selection
  p17:gp2*EA
  d17 pl12:f2
  (p2 ph2):f1
  DELTA2 BLKGRAD

  ; acqusition
  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2
     F1EA(igrad EA, id0 & ip13*2 & ip31*2)
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

;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling (low power)
;p16: homospoil/gradient pulse                       [1 msec]
;p1:  f1 channel -  90 degree high power pulse
;p3:  f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D) = in0/2-p3*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/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntoEcho
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:	gp 1 : gp 2
;			  40 :    20.1

;for z-only gradients:
;gpz1: 40%
;gpz2: 20.1%
;gpz3: 31%

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

;CPMG-HMQC with gradient selection
;hmqcet.cw
;1H,13C HMQC
;phase sensitive using Echo/Anti-Echo (Hurd & John 1991)
; Modern Instrumental Analysis, edited by Satinder Ahuja, Neil Jespersen, p286
;with decoupling during acquisition
;
;modified Chris Waudby 25/11/18

prosol relations=<triple>

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

"d11=30m"
"d12=20u"
"d21=1s/(cnst2*2)"
"p2=p1*2"

"in0=inf1/2"

"d0=3u"
"DELTA1=d21/32-larger(p1,p3)"
"DELTA=DELTA*2"

"DELTA2=p17+d17-p1*0.6366"
"TAU=p3*0.6366+p17+d17-p1-d0"
"acqt0=0"
baseopt_echo

1 ze
  d11 pl12:f2
2 d1 do:f2
  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD

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

  ; begin main sequence
  (p1 ph1):f1

#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
  d21
#endif /* CPMG1 */

  ; begin t1 period
  (p3 ph13):f2

  ; first spin-echo for gradient selection
  p17:gp1
  d17
  (p4 ph1):f2
  TAU

  ; t1 and central refocusing pulse
  d0
  (p2 ph12):f1
  d0

  ; second spin-echo for gradient selection
  TAU
  (p4 ph1):f2
  p17:gp1
  d17
  (p3 ph14):f2
  ; end t1 period

#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
#else
  d21
#endif /* CPMG2 */

  ; extra spin-echo for gradient selection
  p17:gp2*EA
  d17 pl12:f2
  (p2 ph1):f1
  DELTA2 BLKGRAD

  ; acqusition
  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2
     F1EA(igrad EA, id0 & ip13*2 & ip31*2)
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

;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling (low power)
;p16: homospoil/gradient pulse                       [1 msec]
;p1:  f1 channel -  90 degree high power pulse
;p3:  f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D) = in0/2-p3*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/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntoEcho
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

;use gradient ratio:	gp 1 : gp 2
;			  40 :    20.1

;for z-only gradients:
;gpz1: 40%
;gpz2: 20.1%
;gpz3: 31%

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