fixing hsqcfpf3gpphwgia.cw

fixing hsqcfpf3gpphwgia.cw

;Modified to use half-dwell initial sampling delay by default (May 2013)
;
;With in-phase/anti-phase element, JK, July 2012
;Crushing equm 15N magnetisation
;
;Without refocusing for 0,0 phase correction
;Option for either (90,-180) or (180,-360) phase correction
;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)
;Renamed: hsqcfpf3gpphwg.3 --> hsqcfpf3gpphwg.3.jk (19/1/12)
;
;hsqcfpf3gpphwg
;avance-version (07/06/20)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;water suppression using watergate sequence
;similar to fhsqc
;(use parameterset )
;
;G. Bodenhausen & D.J. Ruben, Chem. Phys. Lett. 69, 185 (1980)
;M. Piotto, V. Saudek & V. Sklenar, J. Biomol. NMR 2, 661 - 666 (1992)
;V. Sklenar, M. Piotto, R. Leppik & V. Saudek, J. Magn. Reson.,
;   Series A 102, 241 -245 (1993)
;S. Mori, C. Abeygunawardana, M. O'Neil-Johnson & P.C.M. van Zijl,
;   J. Magn. Reson. B 108, 94-98 (1995)
;
;$CLASS=HighRes
;$DIM=2D
;$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"
"d26=1s/(cnst4*4)"

"in0=inf1/4"

"DELTA1=d26-p16-d16"
"DELTA2=d26-p19-d16-p11-12u"
"DELTA5=d26-p19-d16-p11-12u-de+0.63662*p1"

"DELTA3=d26/2-p19-d16-10u"
"DELTA4=d26-p19-d16-10u"

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

"l0=1"

1 ze
  d11 pl16:f3
2 d11 do:f3

# ifdef LABEL_CN
  if "4*d0-24u > p8"
  {
   d12
   "d60=d0-0.25*p8"
  }
  d12 pl0:f2
# endif /*LABEL_CN*/

  d1

3 d12 pl1:f1 pl3:f3
  50u UNBLKGRAD
  (p21 ph1):f3
  p16:gp1
  d16
  (p21 ph2):f3
  p16:gp1*0.7
  d16*2

  (p1 ph1)
  p16:gp2
  d16
  DELTA1
  (center (p2 ph2) (p22 ph6):f3 )
  DELTA1
  p16:gp2
  d16
  (p1 ph2)

  4u ;pl0:f1
  (p11:sp11 ph8:r):f1	; flipback(-x), -y -> +z
  4u
  p16:gp3
  d16 pl1:f1

; in-phase/anti-phase element

  if "l0 %2 == 1"      ; in-phase (refocusing)
    {
    (p21 ph10):f3
    d26*0.5
    (p2 ph5):f1
    10u
    DELTA3
    p19:gp4
    d16
    (p22 ph1):f3
    10u
    p19:gp4
    d16
    DELTA3
    (p2 ph5):f1
    d26*0.5
    (p21 ph10):f3
    }
  else                  ; anti-phase (evolving)
    {
    (p21 ph10):f3
    DELTA4
    10u
    p19:gp4
    d16
    (p2 ph5):f1
    2u
    (p22 ph1):f3
    10u
    p19:gp4
    d16
    DELTA4
    (p2 ph5):f1
    2u
    (p21 ph11):f3
    }

; end of IPAP element

  10u
  p16:gp5
  d16

# ifdef LABEL_CN

  if "4*d0-24u < p8"
  {
   (p21 ph3):f3
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p21 ph4):f3
  }
  else
  {
  (p21 ph3):f3
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   (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
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p21 ph4):f3

# endif /*LABEL_CN*/

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

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

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1I(iu0, 2)
	F1PH(ip3 & ip6, id0)
exit

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

;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)
;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
;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)
;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: 47%
;gpz2: 13%
;gpz3: 31%
;gpz4: 17%
;gpz5: 41%
;gpz6: 47%
;gpz7: 53%

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

;$Id: hsqcfpf3gpphwg,v 1.6.2.1 2007/07/04 13:41:19 ber Exp $

;Modified to use half-dwell initial sampling delay by default (May 2013)
;
;With in-phase/anti-phase element, JK, July 2012
;Crushing equm 15N magnetisation
;
;Without refocusing for 0,0 phase correction
;Option for either (90,-180) or (180,-360) phase correction
;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)
;Renamed: hsqcfpf3gpphwg.3 --> hsqcfpf3gpphwg.3.jk (19/1/12)
;
;hsqcfpf3gpphwg
;avance-version (07/06/20)
;HSQC
;2D H-1/X correlation via double inept transfer
;phase sensitive
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;water suppression using watergate sequence
;similar to fhsqc
;(use parameterset )
;
;G. Bodenhausen & D.J. Ruben, Chem. Phys. Lett. 69, 185 (1980)
;M. Piotto, V. Saudek & V. Sklenar, J. Biomol. NMR 2, 661 - 666 (1992)
;V. Sklenar, M. Piotto, R. Leppik & V. Saudek, J. Magn. Reson.,
;   Series A 102, 241 -245 (1993)
;S. Mori, C. Abeygunawardana, M. O'Neil-Johnson & P.C.M. van Zijl,
;   J. Magn. Reson. B 108, 94-98 (1995)
;
;$CLASS=HighRes
;$DIM=2D
;$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"
"d26=1s/(cnst4*4)"

"in0=inf1/4"

"DELTA1=d26-p16-d16"
"DELTA2=d26-p19-d16-p11-12u"
"DELTA5=d26-p19-d16-p11-12u-de+0.63662*p1"

"DELTA3=d26/2-p19-d16-10u"
"DELTA4=d26-p19-d16-10u"

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

"l0=1"

1 ze
  d11 pl16:f3
2 d11 do:f3

# ifdef LABEL_CN
  if "4*d0-24u > p8"
  {
   d12
   "d60=d0-0.25*p8"
  }
  d12 pl0:f2
# endif /*LABEL_CN*/

  d1

3 d12 pl1:f1 pl3:f3
  50u UNBLKGRAD
  (p21 ph1):f3
  p16:gp1
  d16
  (p21 ph2):f3
  p16:gp1*0.7
  d16*2

  (p1 ph1)
  p16:gp2
  d16
  DELTA1
  (center (p2 ph2) (p22 ph6):f3 )
  DELTA1
  p16:gp2
  d16
  (p1 ph2)

  4u pl0:f1
  (p11:sp11 ph8:r):f1	; flipback(-x), -y -> +z
  4u
  p16:gp3
  d16 pl1:f1

; in-phase/anti-phase element

  if "l0 %2 == 1"      ; in-phase (refocusing)
    {
    (p21 ph10):f3
    d26*0.5
    (p2 ph5):f1
    10u
    DELTA3
    p19:gp4
    d16
    (p22 ph1):f3
    10u
    p19:gp4
    d16
    DELTA3
    (p2 ph5):f1
    d26*0.5
    (p21 ph10):f3
    }
  else                  ; anti-phase (evolving)
    {
    (p21 ph10):f3
    DELTA4
    10u
    p19:gp4
    d16
    (p2 ph5):f1
    2u
    (p22 ph1):f3
    10u
    p19:gp4
    d16
    DELTA4
    (p2 ph5):f1
    2u
    (p21 ph11):f3
    }

; end of IPAP element

  10u
  p16:gp5
  d16

# ifdef LABEL_CN

  if "4*d0-24u < p8"
  {
   (p21 ph3):f3
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   2u
   d0 gron0
   d0 gron0*-1
   8u groff
   (p21 ph4):f3
  }
  else
  {
  (p21 ph3):f3
   2u
   d60 gron0
   d60 gron0*-1
   8u groff
   (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
  2u
  d0 gron0
  d0 gron0*-1
  8u groff
  (p21 ph4):f3

# endif /*LABEL_CN*/

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

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

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
	F1I(iu0, 2)
	F1PH(ip3 & ip6, id0)
exit

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

;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)
;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
;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)
;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: 47%
;gpz2: 13%
;gpz3: 31%
;gpz4: 17%
;gpz5: 41%
;gpz6: 47%
;gpz7: 53%

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

;$Id: hsqcfpf3gpphwg,v 1.6.2.1 2007/07/04 13:41:19 ber Exp $


correcting hsqcphpr_1Hcoupled.4.cw

correcting hsqcphpr_1Hcoupled.4.cw

; 13C HSQC with 1H coupling during t1 for measurement of CCR
; Jan 2017
;
; with off-resonance presat
; ZZ/crusher periods, clean-up gradient pairs
; (90,-180) phase correction
; use baseopt
;
;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=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

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

"in0=inf2"
"d0=4u"

"DELTA=d4-p16-d16-larger(p1,p3)-0.6366*p1"
"DELTA1=d4-p19-d16-p10-p1-4u-0.6366*p1"
"DELTA2=d4-p19-d16-p10-p1-12u"
"acqt0=0"

define delay vdMin
"vdMin = 2*p19 + 2*d16"

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

aqseq 312

1 ze
  vdMin
  d11 pl12:f2
2 d11 do:f2
3 d12

  ; off-resonance presat
  30u pl9:f1
  30u fq=cnst21(bf hz):f1
  d1 cw:f1 ph1
  30u do:f1
  30u fq=0:f1

  ; purge equilibrium 13C
  30u UNBLKGRAD
  4u pl1:f1 pl2:f2
  (p3 ph1):f2
  p16:gp0
  d16

  ; begin main sequence
  (p1 ph1)
  p16:gp1
  d16
  DELTA
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA
  p16:gp1
  d16
  (p1 ph2)

  ; zz purge
  p16:gp2
  d16

  ; 13C t1
  (p3 ph11):f2
  d0
  "TAU = vd*0.5 - p19 - d16"
  TAU
  p19:gp5
  d16
  (p4 ph1):f2
  4u
  p19:gp5
  d16
  TAU
  (p3 ph12):f2

  ; zz purge
  p16:gp3
  d16

  ; final inept
  (p1 ph1)
  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
    F1QF(ivd)
    F2PH(ip11, id0)

exit

ph1=0
ph2=1
ph3=2
ph11=0 2
ph12=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)
;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)
;cnst21: off-resonance presaturation frequency (bf hz)
;inf1: 1/SW(X) = DW(X)
;in0: 1/SW(X) = DW(X)
;nd0: 1
;NS: 2 * 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: 300u

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

; 13C HSQC with 1H coupling during t1 for measurement of CCR
; Jan 2017
;
; with off-resonance presat
; ZZ/crusher periods, clean-up gradient pairs
; (90,-180) phase correction
; use baseopt
;
;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=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

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

"in0=inf2"
"d0=4u"

"DELTA=d4-p16-d16-larger(p1,p3)-0.6366*p1"
"DELTA1=d4-p19-d16-p10-p1-4u-0.6366*p1"
"DELTA2=d4-p19-d16-p10-p1-12u"
"acqt0=0"

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

1 ze
  d11 pl12:f2
2 d11 do:f2
3 d12

  ; off-resonance presat
  30u pl9:f1
  30u fq=cnst21(bf hz):f1
  d1 cw:f1 ph1
  30u do:f1
  30u fq=0:f1

  ; purge equilibrium 13C
  30u UNBLKGRAD
  4u pl1:f1 pl2:f2
  (p3 ph1):f2
  p16:gp0
  d16

  ; begin main sequence
  (p1 ph1)
  p16:gp1
  d16
  DELTA
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA
  p16:gp1
  d16
  (p1 ph2)

  ; zz purge
  p16:gp2
  d16

  ; 13C t1
  (p3 ph11):f2
  d0
  vd*0.5
  p19:gp5
  d16
  (p4 ph1):f2
  4u
  p19:gp5
  d16
  vd*0.5
  (p3 ph12):f2

  ; zz purge
  p16:gp3
  d16

  ; final inept
  (p1 ph1)
  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
    F1QF(ivd)
    F2PH(ip11, id0)

exit

ph1=0
ph2=1
ph3=2
ph11=0 2
ph12=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)
;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)
;cnst21: off-resonance presaturation frequency (bf hz)
;inf1: 1/SW(X) = DW(X)
;in0: 1/SW(X) = DW(X)
;nd0: 1
;NS: 2 * 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: 300u

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


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)
  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 $

;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"

"d31=(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
  d11 pl16:f3 st0
2 6m do:f3
3 3m
4 d1

  (p1 ph1)
  d26 pl3:f3
  (center (p2 ph1) (p22 ph1):f3 )
  d26 UNBLKGRAD
  (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
  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)
;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
;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 $


adding baseopt to sofast NUWS

adding baseopt to sofast NUWS

;sfhmqcf3gpph.nuws.cw
;1H,15N SOFAST HMQC
;with apodisation-weighted sampling
;with exorcycle on 1H 180
;phase sensitive
;with decoupling during acquisition
;
;set sampling schedule via vclist:
;  total number of scans = ns * c
;  add one to first point of vclist to allow for dummy scans
;
;modified Chris Waudby 10/10/16
;
;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>

define loopcounter myCounter
"myCounter=0"

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

"in0=inf1"

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

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

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

1 ze
  d11 pl26:f3
2 d1 do:f3
  d12 pl3:f3
  50u UNBLKGRAD

  p16:gp2
  d16

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

#   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*/

  DELTA2
  p16:gp1
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3

  if "myCounter==1" goto 10
  zd
  "myCounter=1"
10 4u

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

  d1 do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=0 0 0 0
ph3=0 2
ph4=0 0 2 2
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: 4 * 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 $

;sfhmqcf3gpph.nuws.cw
;1H,15N SOFAST HMQC
;with apodisation-weighted sampling
;with exorcycle on 1H 180
;phase sensitive
;with decoupling during acquisition
;
;set sampling schedule via vclist:
;  total number of scans = ns * c
;  add one to first point of vclist to allow for dummy scans
;
;modified Chris Waudby 10/10/16
;
;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>

define loopcounter myCounter
"myCounter=0"

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

"in0=inf1"

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

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

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

1 ze
  d11 pl26:f3
2 d1 do:f3
3 d12 pl3:f3
  50u UNBLKGRAD

  p16:gp2
  d16

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

#   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*/

  DELTA2
  p16:gp1
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3

  if "myCounter==1" goto 10
  zd
  "myCounter=1"
10 4u

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

  d1 do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph3=0 2
ph4=0 0 2 2
ph31=0 2 2 0 2 0 0 2

;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: 4 * 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 $


add offres presat to hzdqc.cw

add offres presat to hzdqc.cw

;H(Z/D)QC
;for 13C, same processing as SFHZDQC
;run as pseudo-3D (td1 = 2), add and subtract to obtain Z/D components
;TODO check which is Z and D!
;
;Added option for off-resonance presat (e.g. to suppress urea signal), 21/6/15
;
;With option for 1D (first row)
;
;sfhmqcf2gpph
;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)"

"p2=p1*2"

"in0=inf2"

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

"DELTA1=d21-1m-p16-d16-p1*0.6366"
"DELTA2=1m+p1*0.6366-de-4u"
"DELTA3=DELTA1-p2*0.5"
"acqt0=de"

"td1=2"
"l0=1"

aqseq 312

1 ze
  d11 pl12:f2
2 10m do:f2

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

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

  d12 pl1:f1 pl2:f2
  50u UNBLKGRAD

  ; purge equilibrium magnetisation
  (p3 ph1):f2
  p16:gp2
  d16

  ; begin main sequence
  (p1 ph11):f1
  1m
  p16:gp1
  d16

  if "l0 %2 == 1"
     {
  (lalign (DELTA3 p2 ph13) (DELTA1 p3 ph12 d0 p3 ph1 DELTA1):f2 )
     }
  else
     {
  (ralign (p2 ph13 DELTA3 ) (DELTA1 p3 ph12 d0 p3 ph1 DELTA1):f2 )
     }

  DELTA2
  p16:gp1
  d16 pl12:f2
  4u BLKGRAD

  go=2 ph31 cpd2:f2
  10m do:f2 mc #0 to 2
     F1QF(ip12)
     F2EA(rp12 & iu0, id0)

exit

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

;pl3 : f2 channel - power level for pulse (default)
;pl12: f2 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]
;p3: f2 channel -  90 degree high power pulse
;p1: f1 channel - 90 degree
;p2: f1 channel - 180 degree
;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)CH
;cnst4: = J(CH)
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 2 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62

;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

;Processing

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

;H(Z/D)QC
;for 13C, same processing as SFHZDQC
;run as pseudo-3D (td1 = 2), add and subtract to obtain Z/D components
;TODO check which is Z and D!
;
;Added option for off-resonance presat (e.g. to suppress urea signal), 21/6/15
;
;With option for 1D (first row)
;
;sfhmqcf2gpph
;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)"

"p2=p1*2"

"in0=inf2"

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

"DELTA1=d21-1m-p16-d16-p1*0.6366"
"DELTA2=1m+p1*0.6366-de-4u"
"DELTA3=DELTA1-p2*0.5"
"acqt0=de"

"td1=2"
"l0=1"

aqseq 312

1 ze
  d11 pl12:f2
2 10m do:f2

  d1

  d12 pl2:f2
  50u UNBLKGRAD

  ; purge equilibrium magnetisation
  (p3 ph1):f2
  p16:gp2
  d16

  ; begin main sequence
  (p1 ph11):f1
  1m
  p16:gp1
  d16

  if "l0 %2 == 1"
     {
  (lalign (DELTA3 p2 ph13) (DELTA1 p3 ph12 d0 p3 ph1 DELTA1):f2 )
     }
  else
     {
  (ralign (p2 ph13 DELTA3 ) (DELTA1 p3 ph12 d0 p3 ph1 DELTA1):f2 )
     }

  DELTA2
  p16:gp1
  d16 pl12:f2
  4u BLKGRAD

  go=2 ph31 cpd2:f2
  10m do:f2 mc #0 to 2
     F1QF(ip12)
     F2EA(rp12 & iu0, id0)

exit

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

;pl3 : f2 channel - power level for pulse (default)
;pl12: f2 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]
;p3: f2 channel -  90 degree high power pulse
;p1: f1 channel - 90 degree
;p2: f1 channel - 180 degree
;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)CH
;cnst4: = J(CH)
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 2 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62

;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

;Processing

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


updating wlogsy documentation

updating wlogsy documentation

;Water-LOGSY sequence for ligand-screening
;Water inversion using e-PHOGSY element with water-selective ReBURP pulse
;Suppression of auto-relaxed signals via phase-cycling of ReBURP pulse
;  and 180deg pulse during mixing time
;Gradients during mixing time to prevent radiation damping
;Water returned to z at end of sequence
;Water suppression using excitation sculpting with gradients
;Full EXORCYCLE on soft 180--hard 180 pulse pairs in water-DPFGSE element
;With spin-lock period for suppression of receptor signals
;John K, Jan 2012

;C. Dalvit & U. Hommel, J. Magn. Reson. Ser. B 109, 334-338 (1995)
;C. Dalvit et al, J. Biomol. NMR 18, 65-68 (2000)
;C. Dalvit et al, J. Biomol. NMR 21, 349-359 (2001)

;T.-L. Hwang & A.J. Shaka, J. Magn. Reson. Ser. A 112 275-279 (1995)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<logsy>

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

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

"d18=0"		; comment out to allow manual setting of d18

"TAU=0.5*(d8-p2-p16-d16-100u)"

"TAU1=de+0.63662*p1+50u"

"l0=1"

"p29=d29"

1 ze
2 d11
  d12 pl1:f1 BLKGRAD
  d1
  50u UNBLKGRAD

; e-PHOGSY

  (p1 ph1):f1
  p19:gp1
  d16 pl0:f1
  d18
  (p32:sp22 ph2:r):f1
  d18
  p19:gp1
  d16 pl1:f1
  (p1 ph3):f1

; Mixing time

  p16:gp2
  d16
  TAU gron0
  50u groff
  (p2 ph1):f1
  10u
  TAU gron0*-1
  40u groff

; Spin-lock

  (p1 ph10):f1
  4u pl10:f1
  (p29 ph11):f1
  4u pl1:f1
  (p1 ph12):f1
  p16:gp5
  d16

; Water flipback/down

  d12 pl0:f1
  if "l0%2 == 1"
     {
     (p11:sp1 ph4:r):f1		; flipback (phase +x), -z -> y
     }
  else
     {
     (p11:sp21 ph14:r):f1	; flipdown (phase -x), +z -> y
     }
  4u iu0
  d12 pl1:f1

; water-DPFGSE

  (p1 ph5):f1

  50u
  p16:gp3
  d16 pl0:f1
  (p12:sp11 ph6:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph7):f1
  p16:gp3
  d16

  TAU1

  p16:gp4
  d16 pl0:f1
  (p12:sp11 ph8:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph9):f1
  p16:gp4
  d16

  go=2 ph31
  d11 mc #0 to 2 F0(zd)
  d13 BLKGRAD

exit

ph1= 0
ph2= 0 1 2 3
ph3= 0
ph4= 0 2 0 2	; 90 deg flipback (0 _ 0 _)
ph14=0 2 0 2	; 90 deg flipdown (_ 2 _ 2)
ph5= 0

ph6= 0 0 0 0  2 2 2 2  0 0 0 0  2 2 2 2
     1 1 1 1  3 3 3 3  1 1 1 1  3 3 3 3
ph7= 2 2 2 2  0 0 0 0  2 2 2 2  0 0 0 0
     3 3 3 3  1 1 1 1  3 3 3 3  1 1 1 1

ph8= 0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
ph9= 2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1

ph10=1
ph11=0
ph12=3

ph31=0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl10 : f1 channel - power level for spin-lock
;sp1 : f1 channel - shaped pulse 90 degree [Eburp flipback]
;sp11 : f1 channel - shaped pulse 180 degree [Eburp flipdown]
;sp21 : f1 channel - shaped pulse 90 degree [flipdown]
;sp22 : f1 channel - shaped pulse 180 degree [e-PHOGSY]
;spnam1 : Eburp.1000
;spnam11 : Squa100.1000
;spnam21 : Eburp.1000
;spnam22 : Reburp.1000
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse (Eburp.1000)      [4 msec]
;p12: f1 channel - 180 degree shaped pulse (Squa100.1000)   [2 msec]
;p32: f1 channel - 180 degree shaped pulse (Reburp.1000)    [5-25 msec]
;p16: homospoil/gradient pulse			 [1 msec]
;p19: gradient pulse in e-PHOGSY		 [1 msec]
;d1 : relaxation delay; 1-5 * T1		 [2-5 sec]
;d8 : mixing time				 [1-2 sec]
;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      [200 usec]
;d18: delay for attenuation of receptor resonances at water shift
;d29: spin-lock time				 [20-200 msec]
;NS: 16 * n, total number of scans: NS * TD0
;DS: 8

;for z-only gradients:
;gpz0: 2%
;gpz1: 17%
;gpz2: 43%
;gpz3: 31%
;gpz4: 13%
;gpz5: 37%

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

;Water-LOGSY sequence for ligand-screening
;Water inversion using e-PHOGSY element with water-selective ReBURP pulse
;Suppression of auto-relaxed signals via phase-cycling of ReBURP pulse
;  and 180deg pulse during mixing time
;Gradients during mixing time to prevent radiation damping
;Water returned to z at end of sequence
;Water suppression using excitation sculpting with gradients
;Full EXORCYCLE on soft 180--hard 180 pulse pairs in water-DPFGSE element
;With spin-lock period for suppression of receptor signals
;John K, Jan 2012

;C. Dalvit & U. Hommel, J. Magn. Reson. Ser. B 109, 334-338 (1995)
;C. Dalvit et al, J. Biomol. NMR 18, 65-68 (2000)
;C. Dalvit et al, J. Biomol. NMR 21, 349-359 (2001)

;T.-L. Hwang & A.J. Shaka, J. Magn. Reson. Ser. A 112 275-279 (1995)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<logsy>

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

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

"d18=0"		; comment out to allow manual setting of d18

"TAU=0.5*(d8-p2-p16-d16-100u)"

"TAU1=de+0.63662*p1+50u"

"l0=1"

"p29=d29"

1 ze
2 d11
  d12 pl1:f1 BLKGRAD
  d1
  50u UNBLKGRAD

; e-PHOGSY

  (p1 ph1):f1
  p19:gp1
  d16 pl0:f1
  d18
  (p32:sp22 ph2:r):f1
  d18
  p19:gp1
  d16 pl1:f1
  (p1 ph3):f1

; Mixing time

  p16:gp2
  d16
  TAU gron0
  50u groff
  (p2 ph1):f1
  10u
  TAU gron0*-1
  40u groff

; Spin-lock

  (p1 ph10):f1
  4u pl10:f1
  (p29 ph11):f1
  4u pl1:f1
  (p1 ph12):f1
  p16:gp5
  d16

; Water flipback/down

  d12 pl0:f1
  if "l0%2 == 1"
     {
     (p11:sp1 ph4:r):f1		; flipback (phase +x), -z -> y
     }
  else
     {
     (p11:sp21 ph14:r):f1	; flipdown (phase -x), +z -> y
     }
  4u iu0
  d12 pl1:f1

; water-DPFGSE

  (p1 ph5):f1

  50u
  p16:gp3
  d16 pl0:f1
  (p12:sp11 ph6:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph7):f1
  p16:gp3
  d16

  TAU1

  p16:gp4
  d16 pl0:f1
  (p12:sp11 ph8:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph9):f1
  p16:gp4
  d16

  go=2 ph31
  d11 mc #0 to 2 F0(zd)
  d13 BLKGRAD

exit

ph1= 0
ph2= 0 1 2 3
ph3= 0
ph4= 0 2 0 2	; 90 deg flipback (0 _ 0 _)
ph14=0 2 0 2	; 90 deg flipdown (_ 2 _ 2)
ph5= 0

ph6= 0 0 0 0  2 2 2 2  0 0 0 0  2 2 2 2
     1 1 1 1  3 3 3 3  1 1 1 1  3 3 3 3
ph7= 2 2 2 2  0 0 0 0  2 2 2 2  0 0 0 0
     3 3 3 3  1 1 1 1  3 3 3 3  1 1 1 1

ph8= 0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
ph9= 2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1

ph10=1
ph11=0
ph12=3

ph31=0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl10 : f1 channel - power level for spin-lock
;sp1 : f1 channel - shaped pulse 90 degree [flipback]
;sp11 : f1 channel - shaped pulse 180 degree [flipdown]
;sp21 : f1 channel - shaped pulse 90 degree [flipdown]
;sp22 : f1 channel - shaped pulse 180 degree [e-PHOGSY]
;spnam1 : Sinc.1000
;spnam11 : Squa100.1000
;spnam21 : Sinc.1000
;spnam22 : Reburp.1000
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse (ESnob.1000)      [4 msec]
;p12: f1 channel - 180 degree shaped pulse (Squa100.1000)   [2 msec]
;p32: f1 channel - 180 degree shaped pulse (Reburp.1000)    [5-25 msec]
;p16: homospoil/gradient pulse			 [1 msec]
;p19: gradient pulse in e-PHOGSY		 [1 msec]
;d1 : relaxation delay; 1-5 * T1		 [2-5 sec]
;d8 : mixing time				 [1-2 sec]
;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      [200 usec]
;d18: delay for attenuation of receptor resonances at water shift
;d29: spin-lock time				 [20-200 msec]
;NS: 16 * n, total number of scans: NS * TD0
;DS: 8

;for z-only gradients:
;gpz0: 2%
;gpz1: 17%
;gpz2: 43%
;gpz3: 31%
;gpz4: 13%
;gpz5: 37%

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


tidying methyl CCR sequences

tidying methyl CCR sequences

; For extraction of methyl order parameters by measurement of
; intra-methyl proton-proton dipolar cross-correlated relaxation rates.
; Lit. Tugarinov, Sprangers & Kay, JACS 129, 1743-1750 (2007)
;
; Use DOUBLE_QUANTUM flag to record DQ build-up experiment
; Otherwise, sequence measures decay of 1H SQ magnetisation

; Delays adjusted for zero first-order phase correction
;
; use baseopt
;_____________________________________________________________
;
;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
;
;solvent suppresion by selective pulse and crusher gradient
;Chris Waudby, April 2013
;
;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>

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

"p2=p1*2"
"p4=p3*2"
"d2=1.8m"		; tau_a
"d3=1m"			; tau_b

"in0=inf2/2"

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

"DELTA1=2*d2-p16-d16"
"DELTA2=2*d2-p16-d16-d12-de+0.6366*p1+p3"
"DELTA3=d3-p16-d16-larger(p1,p3)"
"acqt0=de"
aqseq 312

1 ze
2 d11 do:f2

  d12
   "TAU1=vd/4-p3-0.5*p1"
  d12
   "TAU2=vd/4-p19-d16-p3-0.5*p1"

  4u BLKGRAD

3 d12 ;pl9:f1
  d1 ;cw:f1 ph29
  d13 ;do:f1
  d12 pl0:f1 pl2:f2
  4u UNBLKGRAD

  (p11:sp2 ph5):f1    ; SOLVENT SUPPRESSION FLIP-DOWN
  2u

  (p3 ph6):f2  ; crush equilibrium carbon magnetisation
  d13 pl1:f1
  p16:gp1
  d16

  p1 ph1
  TAU1
  (p4 ph6):f2
  p19:gp2
  d16
  TAU2
  p2 ph1
  p19:gp2
  d16
  TAU2
  (p4 ph6):f2
  TAU1

#   ifdef DOUBLE_QUANTUM
  p1 ph1
  4u
  p1 ph2
#   else
  p1 ph2
#   endif /*DOUBLE_QUANTUM*/

  DELTA1
  p16:gp3
  d16
  (p3 ph3):f2
  p16:gp4
  d16
  DELTA3
  (center (p2 ph6) (p4 ph6):f2 )
  p16:gp4
  d16
  DELTA3
  (p3 ph4):f2

  d0
  p2 ph6
  d0

  (p3 ph5):f2
  4u
  p2 ph6

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

ph3= 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
ph4= 1 1 1 1 3 3 3 3
ph5= 0
ph6= 0
ph29=0

#   ifdef DOUBLE_QUANTUM
ph1= 0 1 2 3
ph2= 0 0 0 0 2 2 2 2
ph31=0 2 0 2 2 0 2 0 2 0 2 0 0 2 0 2
#   else
ph1= 0 2
ph2= 1 1 3 3
ph31=0 2 0 2 0 2 0 2 2 0 2 0 2 0 2 0
#   endif /*DOUBLE_QUANTUM*/

;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
;sp2: f1 channel - shaped pulse  90 degree (on H2O)
;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
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse 			     [500 usec]
;p19: short homospoil/gradient pulse 		     [50 usec]
;d0 : incremented delay (2D)
;d1 : relaxation delay; 1-5 * T1
;d2 : < 1/(4J)CH				     [1.8 msec]
;d3 : delay for purge element - 1/(8J)CH	     [1 msec]
;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
;vd : variable delay, taken from vd-list
;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

;use gradient ratio:    gp 1 : gp 2 : gp3 : gp4
;                         18 :  -36 : 18  : 7

;for z-only gradients:
;gpz1: 18%
;gpz2: -36%
;gpz3: 18%
;gpz4: 7%

;use gradient files:
;gpnam1: SINE.10
;gpnam2: SINE.10
;gpnam3: SINE.10
;gpnam4: SINE.10

                                          ;preprocessor-flags-start
;HALFDWELL: for initial sampling delay of half a dwell-time with
;	    option -DHALFDWELL (eda: ZGOPTNS)
;DOUBLE_QUANTUM: for measurement of build-up of DQ coherence with
;	    option -DDOUBLE_QUANTUM (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

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


tidying up sfhmqcnoesysfhmqcgpph.4d.cw

tidying up sfhmqcnoesysfhmqcgpph.4d.cw

;4D HCCH SFHMQC-NOESY-SFHMQC
;for methyl-methyl NOES
;Option for NUS using Topspin 3
;Chris Waudby, 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 NUS
  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]
;p39: f1 channel - 120 degree shaped pulse for excitation
;                      Pc9_4_120.1000 (120o)
;p40: f1 channel - 180 degree shaped pulse for refocussing
;                      Rsnob.1000  /  Reburp
;p41: f1 channel - 90 degree shaped pulse for excitation
;                      Pc9_4_90.1000
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529
;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"

;------------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


fix some pulse labels for wlogsy

fix some pulse labels for wlogsy

;Water-LOGSY sequence for ligand-screening
;Water inversion using e-PHOGSY element with water-selective ReBURP pulse
;Suppression of auto-relaxed signals via phase-cycling of ReBURP pulse
;  and 180deg pulse during mixing time
;Gradients during mixing time to prevent radiation damping
;Water returned to z at end of sequence
;Water suppression using excitation sculpting with gradients
;Full EXORCYCLE on soft 180--hard 180 pulse pairs in water-DPFGSE element
;With spin-lock period for suppression of receptor signals
;John K, Jan 2012

;C. Dalvit & U. Hommel, J. Magn. Reson. Ser. B 109, 334-338 (1995)
;C. Dalvit et al, J. Biomol. NMR 18, 65-68 (2000)
;C. Dalvit et al, J. Biomol. NMR 21, 349-359 (2001)

;T.-L. Hwang & A.J. Shaka, J. Magn. Reson. Ser. A 112 275-279 (1995)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<logsy>

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

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

"d18=0"		; comment out to allow manual setting of d18

"TAU=0.5*(d8-p2-p16-d16-100u)"

"TAU1=de+0.63662*p1+50u"

"l0=1"

"p29=d29"

1 ze
2 d11
  d12 pl1:f1 BLKGRAD
  d1
  50u UNBLKGRAD

; e-PHOGSY

  (p1 ph1):f1
  p19:gp1
  d16 pl0:f1
  d18
  (p32:sp22 ph2:r):f1
  d18
  p19:gp1
  d16 pl1:f1
  (p1 ph3):f1

; Mixing time

  p16:gp2
  d16
  TAU gron0
  50u groff
  (p2 ph1):f1
  10u
  TAU gron0*-1
  40u groff

; Spin-lock

  (p1 ph10):f1
  4u pl10:f1
  (p29 ph11):f1
  4u pl1:f1
  (p1 ph12):f1
  p16:gp5
  d16

; Water flipback/down

  d12 pl0:f1
  if "l0%2 == 1"
     {
     (p11:sp1 ph4:r):f1		; flipback (phase +x), -z -> y
     }
  else
     {
     (p11:sp21 ph14:r):f1	; flipdown (phase -x), +z -> y
     }
  4u iu0
  d12 pl1:f1

; water-DPFGSE

  (p1 ph5):f1

  50u
  p16:gp3
  d16 pl0:f1
  (p12:sp11 ph6:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph7):f1
  p16:gp3
  d16

  TAU1

  p16:gp4
  d16 pl0:f1
  (p12:sp11 ph8:r):f1		; 180deg flipdown
  d12 pl1:f1
  (p2 ph9):f1
  p16:gp4
  d16

  go=2 ph31
  d11 mc #0 to 2 F0(zd)
  d13 BLKGRAD

exit

ph1= 0
ph2= 0 1 2 3
ph3= 0
ph4= 0 2 0 2	; 90 deg flipback (0 _ 0 _)
ph14=0 2 0 2	; 90 deg flipdown (_ 2 _ 2)
ph5= 0

ph6= 0 0 0 0  2 2 2 2  0 0 0 0  2 2 2 2
     1 1 1 1  3 3 3 3  1 1 1 1  3 3 3 3
ph7= 2 2 2 2  0 0 0 0  2 2 2 2  0 0 0 0
     3 3 3 3  1 1 1 1  3 3 3 3  1 1 1 1

ph8= 0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     0 0 0 0  0 0 0 0  2 2 2 2  2 2 2 2
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
     1 1 1 1  1 1 1 1  3 3 3 3  3 3 3 3
ph9= 2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     2 2 2 2  2 2 2 2  0 0 0 0  0 0 0 0
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1
     3 3 3 3  3 3 3 3  1 1 1 1  1 1 1 1

ph10=1
ph11=0
ph12=3

ph31=0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     2 0 2 0  2 0 2 0  2 0 2 0  2 0 2 0
     0 2 0 2  0 2 0 2  0 2 0 2  0 2 0 2

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl10 : f1 channel - power level for spin-lock
;sp1 : f1 channel - shaped pulse 90 degree [ESnob flipback]
;sp11 : f1 channel - shaped pulse 180 degree [flipdown]
;sp21 : f1 channel - shaped pulse 90 degree [ESnob flipdown]
;sp22 : f1 channel - shaped pulse 180 degree [e-PHOGSY]
;spnam1 : ESnob.1000
;spnam11 : Squa100.1000
;spnam21 : ESnob.1000
;spnam22 : Reburp.1000
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse (ESnob.1000)      [4 msec]
;p12: f1 channel - 180 degree shaped pulse (Squa100.1000)   [2 msec]
;p32: f1 channel - 180 degree shaped pulse (Reburp.1000)    [5-25 msec]
;p16: homospoil/gradient pulse			 [1 msec]
;p19: gradient pulse in e-PHOGSY		 [1 msec]
;d1 : relaxation delay; 1-5 * T1		 [2-5 sec]
;d8 : mixing time				 [1-2 sec]
;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      [200 usec]
;d18: delay for attenuation of receptor resonances at water shift
;d29: spin-lock time				 [20-200 msec]
;NS: 16 * n, total number of scans: NS * TD0
;DS: 8

;for z-only gradients:
;gpz0: 2%
;gpz1: 17%
;gpz2: 43%
;gpz3: 31%
;gpz4: 13%
;gpz5: 37%

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


correcting hmqcgpphpr_MQT2.cw

correcting hmqcgpphpr_MQT2.cw

; Measurement of methyl MQ relaxation
; using purge element to suppress outer lines
;
; 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>

define delay XI1
define delay XI2
define delay vdMin

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

"DELTA1=d2-0.6366*p1-p3"
"DELTA2=d2-d12-4u"
"XI1=d2/4-p17-d17-larger(p1,p3)"
"XI2=d2/4-p17-d17-p3-larger(p1,p3)"
"vdMin=4*p19+4*d17+4*p3"

"in0=inf2/2"
"d0=in0/2-p1"

"acqt0=0"
baseopt_echo
aqseq 312

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

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

  ; recycle delay - calculate new delays for relaxation in this time
  d12 pl9:f1
  d1 cw:f1 ph29
  "d20=vd/4-p3-p19-d17"
  "d21=vd/4-p3"
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD

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

  (p1 ph1):f1
  ;"DELTA1=d2-0.6366*p1-p3"
  DELTA1
  ;p16:gp2
  ;d16

  (p3 ph11):f2

  ;begin purge element
  ;"XI1=d2/4-p17-d17-larger(p1,p3)
  XI1
  p17:gp1
  d17
  (center (p2 ph1):f1 (p4 ph1):f2 )
  p17:gp1
  d17
  ;"XI2=d2/4-p17-d17-p3-larger(p1,p3)"
  XI2
  (p3 ph12):f2

  ;begin relaxation/t1 evolution
  ;"d20=vd/4-p3-p19-d17"
  d20
  p19:gp2
  d17
  (p4 ph1):f2
  ;"d21=vd/4-p3"
  d21
  ;(center (p2 ph1):f1 (d0):f2 )
  d0
  (p2 ph1):f1
  d0
  d20
  p19:gp2
  d17
  (p4 ph1):f2
  d21
  (p2 ph13):f1 (p3 ph14):f2

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

  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2
       F1QF(ivd)
       F2PH(ip14, id0)
  4u BLKGRAD
exit

ph1= 0
ph11=0 2
ph12=1 1 3 3
ph13=0 0 0 0 2 2 2 2
ph14=0
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
;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]
;p19: gradient pulse [200 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
;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 [200 usec]
;d17: short delay for gradient recovery [100 usec]
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;nd1: 1
;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:
;gpz0: -40%
;gpz1: 31%
;gpz2: 11%

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.32
;gpnam2: SINE.20

                                          ;preprocessor-flags-start
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

; Measurement of methyl MQ relaxation
; using purge element to suppress outer lines
;
; 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>

define delay XI1
define delay XI2
define delay vdMin

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

"DELTA1=d2-0.6366*p1-p3"
"DELTA2=d2-d12-4u"
"XI1=d2/4-p17-d17-larger(p2,p4)"
"XI2=d2/4-p17-d17-p3-larger(p2,p4)"
"vdMin=4*p19+4*d17+4*p3"

"in0=inf2"
"d0=in0/2"

"acqt0=0"
baseopt_echo
aqseq 312

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

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

  ; recycle delay - calculate new delays for relaxation in this time
  d12 pl9:f1
  d1 cw:f1 ph29
  "d20=vd-p3-p19-d17"
  "d21=vd-p3"
  d13 do:f1
  d12 pl1:f1 pl2:f2
  30u fq=0:f1
  50u UNBLKGRAD

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

  (p1 ph1):f1
  ;"DELTA1=d2-0.6366*p1-p3"
  DELTA1
  ;p16:gp2
  ;d16

  (p3 ph11):f2

  ;begin purge element
  ;"XI1=d2/4-p17-d17-larger(p2,p4)"
  XI1
  p17:gp1
  d17
  (center (p2 ph1):f1 (p4 ph1):f2 )
  p17:gp1
  d17
  ;"XI2=d2/4-p17-d17-p3-larger(p2,p4)"
  XI2
  (p3 ph12):f2

  ;begin relaxation/t1 evolution
  ;"d20=vd-p3-p19-d17"
  d20
  p19:gp2
  d17
  (p4 ph1):f2
  ;"d21=vd-p3"
  d21
  (center (p2 ph1):f1 (d0):f2 )
  d20
  p19:gp2
  d17
  (p4 ph1):f2
  d21
  (p2 ph13):f1 (p3 ph14):f2

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

  go=2 ph31 cpd2:f2
  d11 do:f2 mc #0 to 2
       F1QF(ivd)
       F2PH(ip14, id0)
  4u BLKGRAD
exit

ph1= 0
ph11=0 2
ph12=1 1 3 3
ph13=0 0 0 0 2 2 2 2
ph14=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
;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]
;p19: gradient pulse [200 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
;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 [200 usec]
;d17: short delay for gradient recovery [100 usec]
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;nd1: 1
;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:
;gpz0: -40%
;gpz1: 31%
;gpz2: 11%

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.32
;gpnam2: SINE.20

                                          ;preprocessor-flags-start
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end


adding acqt0 to b_hsqcf3gpph.cw

adding acqt0 to b_hsqcf3gpph.cw

;BEST-15N HSQC, using PC-9 shapes for all 90deg pulses on Hn
;Chris W, Aug 2018
;
;b_hsqcf3gpph.cw
;avance-version (08/01/24)
;(best)-HSQC
;2D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;with gradients in back-inept
;
;(A.G. Palmer III, J. Cavanagh, P.E. Wright & M. Rance, J. Magn.
;   Reson. 93, 151-170 (1991) )
;(L.E. Kay, P. Keifer & T. Saarinen, J. Am. Chem. Soc. 114,
;   10663-5 (1992) )
;(J. Schleucher, M. Schwendinger, M. Sattler, P. Schmidt,
;   O. Schedletzky, S.J. Glaser, O.W. Sorensen & C. Griesinger,
;   J. Biomol. NMR 4, 301-306 (1994) )
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

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

"d0=inf1/2-2*0.6366*p21"
"in0=inf1"

"DELTA1=d26-p19-d16-p41*cnst41-p42*cnst42"
"DELTA2=DELTA1+p41*cnst41-4u-de"

"spoff25=bf1*(cnst19/1000000)-o1"
"spoff26=bf1*(cnst19/1000000)-o1"
"spoff27=bf1*(cnst19/1000000)-o1"
"d42=p42"

"acqt0=de"

1 ze
  d11 pl26:f3 pl0:f1
2 d11 do:f3
  d1
  50u UNBLKGRAD
  4u pl3:f3

  ; first INEPT
  (p41:sp25 ph1)
  DELTA1
  p19:gp1
  d16
  (center (p42:sp26 ph1) (p22 ph1):f3 )
  DELTA1
  p19:gp1
  d16
  (p41:sp27 ph2):f1

  ; zz filter
  p16:gp2
  d16

  ; t1 evolution
#   ifdef LABEL_CN
  (center
    (p42:sp26 ph5):f1
    (p8:sp13 ph1):f2
    (d42*0.5 p21 ph3 d0 p21 ph4 d42*0.5):f3
  )
#   else
  (center
    (p42:sp26 ph5):f1
    (d42*0.5 p21 ph3 d0 p21 ph4 d42*0.5):f3
  )
#   endif /*LABEL_CN*/

  ; zz filter
  p16:gp3
  d16

  ; retro-INEPT
  (p41:sp25 ph1)
  DELTA1
  p19:gp1
  d16
  (center (p42:sp26 ph1) (p22 ph1):f3 )
  DELTA2 pl26:f3
  p19:gp1
  d16
  4u BLKGRAD

  ; acquisition
  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=1
ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph31=0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB low power decoupling
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;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
;sp30: f1 channel - shaped pulse 180 degree (Bip720,50,20.1)
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p16: homospoil/gradient pulse                         [1 msec]
;p19: gradient pulse 2                                 [500 usec]
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p29: gradient pulse 3                                 [250 usec]
;p41: f1 channel -  90 degree shaped pulse for excitation
;                      Pc9_4_90.1000             (2230 usec at 600 MHz)
;p42: f1 channel - 180 degree shaped pulse for refocusing
;                      Reburp.1000               (1680 usec at 600 MHz)
;p43: f1 channel -  90 degree shaped pulse for excitation
;                      Bip720,50,20.1            (200us at 600 MHz)
;d0 : incremented delay (2D)                           [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                               [30 msec]
;d16: delay for homospoil/gradient recovery
;d26: 1/(4J(NH))
;d63: set to zero unless DELTA becomes negative
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst41: compensation of coupling evolution during p41
;           Pc9_4_90.1000: 0.514
;cnst42: compensation of coupling evolution during p42
;           Reburp.1000: 0.475
;NS: 2 * n
;DS: >= 16
;aq: <= 50 msec (or <100ms with d1>100ms)
;td1: number of experiments
;FnMODE: echo-antiecho
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 8%
;gpz2: 13% for N-15
;gpz3: -7%

;use gradient files:
;gpnam1: SMSQ10.50
;gpnam2: SMSQ10.50
;gpnam3: SMSQ10.50

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

;BEST-15N HSQC, using PC-9 shapes for all 90deg pulses on Hn
;Chris W, Aug 2018
;
;b_hsqcf3gpph.cw
;avance-version (08/01/24)
;(best)-HSQC
;2D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;with gradients in back-inept
;
;(A.G. Palmer III, J. Cavanagh, P.E. Wright & M. Rance, J. Magn.
;   Reson. 93, 151-170 (1991) )
;(L.E. Kay, P. Keifer & T. Saarinen, J. Am. Chem. Soc. 114,
;   10663-5 (1992) )
;(J. Schleucher, M. Schwendinger, M. Sattler, P. Schmidt,
;   O. Schedletzky, S.J. Glaser, O.W. Sorensen & C. Griesinger,
;   J. Biomol. NMR 4, 301-306 (1994) )
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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

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

"d0=inf1/2-2*0.6366*p21"
"in0=inf1"

"DELTA1=d26-p19-d16-p41*cnst41-p42*cnst42"
"DELTA2=DELTA1+p41*cnst41-4u-de"

"spoff25=bf1*(cnst19/1000000)-o1"
"spoff26=bf1*(cnst19/1000000)-o1"
"spoff27=bf1*(cnst19/1000000)-o1"
"d42=p42"

1 ze
  d11 pl26:f3 pl0:f1
2 d11 do:f3
  d1
  50u UNBLKGRAD
  4u pl3:f3

  ; first INEPT
  (p41:sp25 ph1)
  DELTA1
  p19:gp1
  d16
  (center (p42:sp26 ph1) (p22 ph1):f3 )
  DELTA1
  p19:gp1
  d16
  (p41:sp27 ph2):f1

  ; zz filter
  p16:gp2
  d16

  ; t1 evolution
#   ifdef LABEL_CN
  (center
    (p42:sp26 ph5):f1
    (p8:sp13 ph1):f2
    (d42*0.5 p21 ph3 d0 p21 ph4 d42*0.5):f3
  )
#   else
  (center
    (p42:sp26 ph5):f1
    (d42*0.5 p21 ph3 d0 p21 ph4 d42*0.5):f3
  )
#   endif /*LABEL_CN*/

  ; zz filter
  p16:gp3
  d16

  ; retro-INEPT
  (p41:sp25 ph1)
  DELTA1
  p19:gp1
  d16
  (center (p42:sp26 ph1) (p22 ph1):f3 )
  DELTA2 pl26:f3
  p19:gp1
  d16
  4u BLKGRAD

  ; acquisition
  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
     F1PH(ip3, id0)
exit

ph1=0
ph2=1
ph3=0 2
ph4=0 0 2 2
ph5=0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
ph31=0 2 2 0

;pl3 : f3 channel - power level for pulse (default)
;pl26: f3 channel - power level for CPD/BB low power decoupling
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;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
;sp30: f1 channel - shaped pulse 180 degree (Bip720,50,20.1)
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p16: homospoil/gradient pulse                         [1 msec]
;p19: gradient pulse 2                                 [500 usec]
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p29: gradient pulse 3                                 [250 usec]
;p41: f1 channel -  90 degree shaped pulse for excitation
;                      Pc9_4_90.1000             (2230 usec at 600 MHz)
;p42: f1 channel - 180 degree shaped pulse for refocusing
;                      Reburp.1000               (1680 usec at 600 MHz)
;p43: f1 channel -  90 degree shaped pulse for excitation
;                      Bip720,50,20.1            (200us at 600 MHz)
;d0 : incremented delay (2D)                           [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                               [30 msec]
;d16: delay for homospoil/gradient recovery
;d26: 1/(4J(NH))
;d63: set to zero unless DELTA becomes negative
;cnst4: = J(NH)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst41: compensation of coupling evolution during p41
;           Pc9_4_90.1000: 0.514
;cnst42: compensation of coupling evolution during p42
;           Reburp.1000: 0.475
;NS: 2 * n
;DS: >= 16
;aq: <= 50 msec (or <100ms with d1>100ms)
;td1: number of experiments
;FnMODE: echo-antiecho
;cpd3: decoupling according to sequence defined by cpdprg3: garp4.p62
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;for z-only gradients:
;gpz1: 8%
;gpz2: 13% for N-15
;gpz3: -7%

;use gradient files:
;gpnam1: SMSQ10.50
;gpnam2: SMSQ10.50
;gpnam3: SMSQ10.50

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


New sample

New sample

--pong 128

--ball
var ballx = 64
var bally = 64
var dx = 1 --true
var dy = 1 --true

-- peddle left
var lx = 5
var ly = 1
var lw = 5
var lh = 10

-- peddle right
var rx = 118
var ry = 1
var rw = 5
var rh = 10

var gameloop = 1 --true
while gameloop
	update()
	draw()
end

function draw()
	circle(ballx,bally,4) --(x,y,radius)
	rect(lx,ly,lw,lh) --(x,y,width,height)
	rect(rx,ry,rw,rh) --(x,y,width,height)
	line(64,0,64,128)
end

function update()
	if dx --if true
		ballx += 1
	else
		ballx -= 1

	if dy --if true
		bally += 1
	else
		bally -= 1

	if ballx < 1 || ballx > 127
		dx = !dx
	if bally < 1 || bally > 127
		dy = !dy

	if bally < ly
		ly -= 1
	elseif bally > ly+lh
		ly +=1

	if bally < ry
		ry -= 1
	elseif bally > ry+rh
		ry +=1

	if ballx > lx && ballx < lx+lw && bally > ly && bally < ly+lh
		dx = 1 --true
	if ballx > rx && ballx < rx+rw && bally > ry && bally < ry+rh
		dx = 0 --false
end


correcting cpmghmqcet.cw

correcting cpmghmqcet.cw


fixing b-zq-trosy

fixing b-zq-trosy

;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-p16-d16-4u"
# else
  "TAU=d1-d11-d12-50u-p21-p16-d16-4u"
# endif /*OFFRES_PRESAT*/

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

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

1 ze
  d11
2 d11

# 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 ph1) (d2 p21 ph11):f3 )
     }
  else
     {
  (lalign (p39:sp23 ph1) (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 ph1) (DELTA2 p21 ph13 d0 p21 ph1 d3):f3 )
  DELTA3
     }
  else
     {
  DELTA3
  (lalign (p40:sp24 ph1) (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)

exit

ph1=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
ph31=0 2 3 1

;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%

;use gradient files:
;gpnam0: SMSQ10.100
;gpnam1: SMSQ10.100
;gpnam2: 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-p16-d16-4u"
# else
  "TAU=d1-d11-d12-50u-p21-p16-d16-4u"
# endif /*OFFRES_PRESAT*/

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

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

1 ze
  d11
2 d11

# 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

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

  ; begin main sequence
  if "l0 %2 == 1"
     {
  (lalign (p39:sp23 ph1) (d2 p21 ph11):f3 )
     }
  else
     {
  (lalign (p39:sp23 ph1) (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 ph1) (DELTA2 p21 ph13 d0 p21 ph1 d3):f3 )
  DELTA3
     }
  else
     {
  DELTA3
  (lalign (p40:sp24 ph1) (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)

exit

ph1=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
ph31=0 2 3 1

;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%

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

;Processing

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


tweaking Nz exsy for baseopt and calculating vdmin

;hsqc_Nz_exsy.cw
;Nz exchange
;
;Chris Waudby, Sep 2012
;
;adapted from Farrow et al. (1994)
;
;run as pseudo-3D
;mixing times in seconds from vd-list

prosol relations=<triple>

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

;$DIM=3D
aqseq 312

define delay vdmin

"p2=p1*2"
"p22=p21*2"
"d4=1s/(cnst4*4)-p19-d16-larger(p21,p1)"
"d5=1s/(cnst4*4)-p19-d16-p11-4u-larger(p21,p1)"
"d11=30m"
"d12=20u"
"d15=50u"

"d0=0u"

"DELTA1=1s/(cnst4*4)-p19-d16-p21"

"in0=inf2"

"vdmin=8u+2*p19+2*d16"

"acqt0=0.6366*p1"

1 ze
  vdmin
  d11 pl16:f3
  d12  BLKGRAD
2 d1 do:f3
3 d12 pl3:f3

  ; calculate time for exchange delay
  10u
  "d21=vd-8u-2*p19-2*d16"
  10u

  ; Nz spoiler
  (p21 ph4):f3
  d15 UNBLKGRAD
  p19:gp1
  d16 pl1:f1

  ; first INEPT transfer
  (p1 ph4):f1
  p19:gp2
  d16
  d4
  (center (p2 ph4):f1 (p22 ph4):f3)
  d4
  p19:gp2
  d16

  (p1 ph1):f1
  4u pl0:f1
  (p11:sp1 ph2):f1
  4u pl1:f1

  p19:gp3
  d16

  (p21 ph5):f3

  p19:gp8
  d16

#ifdef LABEL_CN
  (center
    (p2 ph4):f1
    (p8:sp13 ph1):f2
    (DELTA1 d0 p22 ph6 DELTA1):f3
  )
#else
  (center
    (p2 ph4):f1
    (DELTA1 d0 p22 ph6 DELTA1):f3
  )
#endif /*LABEL_CN*/

  p19:gp8
  d16

  (p21 ph1):f3

  4u
  p19:gp4         ;Nz spoiler
  d16 BLKGRAD

  d21             ;EXSY exchange delay

  4u UNBLKGRAD
  p19:gp5         ;Nz spoiler
  d16

  (p21 ph4):f3

  p19:gp6
  d16
  d4
  (center (p2 ph4):f1 (p22 ph4):f3)
  d4
  p19:gp6
  d16

  (p21 ph1):f3
  4u pl0:f1
  (p11:sp1 ph7):f1
  4u pl1:f1
  (p1 ph8):f1

  p19:gp7
  d16
  d5 pl0:f1
  (p11:sp1 ph9):f1
  4u pl1:f1
  (center (p2 ph10):f1 (p22 ph4):f3 )
  4u pl0:f1
  (p11:sp1 ph9):f1
  d5 pl16:f3
  p19:gp7
  d16 BLKGRAD

  go=2 ph31 cpd3:f3
  d1 do:f3 mc #0 to 2
    F1QF(ivd)
    F2PH(ip5, id0)

exit

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

;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
;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)
;p21 : f3 channel -  90 degree high power pulse
;p22 : f3 channel - 180 degree high power pulse
;p11 : f1 channel - water flipback [1 ms]
;p16 : watergate gradient
;p19 : spoiler gradient [500-900 us]
;sp1 : f1 channel - power level for water flipback
;spnam1 : sinc1.1000
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;d1 : relaxation delay; 1-5 * T1
;d16 : gradient recovery delay [200usec]
;d21 : exsy exchange delay (set from vdlist)
;cnst4: = J(NH)
;inf2: 1/SW(X) = 2 * DW(X)
;in0: 1/(1 * SW(X)) = 2 * DW(X)
;nd0: 1
;NS: 6 * n (strange bug despite phase cycle)
;DS: 6 * n
;td1: number of experiments
;FnMODE: States-TPPI
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;gpz1: Eqm Nz crush [5 %]
;gpz2: 180 pair [8 %]
;gpz3: HzNz spoil [15 %]
;gpz4: Nz spoil [-20 %]
;gpz5: Nz spoil [-20 %]
;gpz6: 180 pair [16 %]
;gpz7: HzNz crush [51 %]
;gpz8: 180 pair [13.17 %]

;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100
;gpnam7: SMSQ10.100
;gpnam8: SMSQ10.100

;hsqc_Nz_exsy.cw
;Nz exchange
;
;Chris Waudby, Sep 2012
;
;adapted from Farrow et al. (1994)
;
;run as pseudo-3D
;mixing times in seconds from vd-list

prosol relations=<triple_d>

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

;$DIM=3D
aqseq 312

"p2=p1*2"
"p22=p21*2"
"d4=1s/(cnst4*4)-p19-d16-larger(p21,p1)"
"d5=1s/(cnst4*4)-p19-d16-p11-4u-larger(p21,p1)"
"d11=30m"
"d12=20u"
"d15=50u"

"d0=0u"

"DELTA1=1s/(cnst4*4)-p19-d16-p21"

"in0=inf2"

1 ze
  d11 pl16:f3
  d12  BLKGRAD
2 d1 do:f3
3 d12 pl3:f3

  ; calculate time for exchange delay
  10u
  "d21=vd-8u-2*p19-2*d16"
  10u

  ; Nz spoiler
  (p21 ph4):f3
  d15 UNBLKGRAD
  p19:gp1
  d16 pl1:f1

  ; first INEPT transfer
  (p1 ph4):f1
  p19:gp2
  d16
  d4
  (center (p2 ph4):f1 (p22 ph4):f3)
  d4
  p19:gp2
  d16

  (p1 ph1):f1
  4u pl0:f1
  (p11:sp1 ph2):f1
  4u pl1:f1

  p19:gp3
  d16

  (p21 ph5):f3

  p19:gp8
  d16

#ifdef LABEL_CN
  (center
    (p2 ph4):f1
    (p8:sp13 ph1):f2
    (DELTA1 d0 p22 ph6 DELTA1):f3
  )
#else
  (center
    (p2 ph4):f1
    (DELTA1 d0 p22 ph6 DELTA1):f3
  )
#endif /*LABEL_CN*/

  p19:gp8
  d16

  (p21 ph1):f3

  4u
  p19:gp4         ;Nz spoiler
  d16 BLKGRAD

  d21             ;EXSY exchange delay

  4u UNBLKGRAD
  p19:gp5         ;Nz spoiler
  d16

  (p21 ph4):f3

  p19:gp6
  d16
  d4
  (center (p2 ph4):f1 (p22 ph4):f3)
  d4
  p19:gp6
  d16

  (p21 ph1):f3
  4u pl0:f1
  (p11:sp1 ph7):f1
  4u pl1:f1
  (p1 ph8):f1

  p19:gp7
  d16
  d5 pl0:f1
  (p11:sp1 ph9):f1
  4u pl1:f1
  (center (p2 ph10):f1 (p22 ph4):f3 )
  4u pl0:f1
  (p11:sp1 ph9):f1
  d5 pl16:f3
  p19:gp7
  d16 BLKGRAD

  go=2 ph31 cpd3:f3
  d1 do:f3 mc #0 to 2
    F1QF(ivd)
    F2PH(ip5, id0)

exit

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

;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
;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)
;p21 : f3 channel -  90 degree high power pulse
;p22 : f3 channel - 180 degree high power pulse
;p11 : f1 channel - water flipback [1 ms]
;p16 : watergate gradient
;p19 : spoiler gradient [500-900 us]
;sp1 : f1 channel - power level for water flipback
;spnam1 : sinc1.1000
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;d1 : relaxation delay; 1-5 * T1
;d16 : gradient recovery delay [200usec]
;d21 : exsy exchange delay (set from vdlist)
;cnst4: = J(NH)
;inf2: 1/SW(X) = 2 * DW(X)
;in0: 1/(1 * SW(X)) = 2 * DW(X)
;nd0: 1
;NS: 6 * n (strange bug despite phase cycle)
;DS: 6 * n
;td1: number of experiments
;FnMODE: States-TPPI
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence

;gpz1: Eqm Nz crush [5 %]
;gpz2: 180 pair [8 %]
;gpz3: HzNz spoil [15 %]
;gpz4: Nz spoil [-20 %]
;gpz5: Nz spoil [-20 %]
;gpz6: 180 pair [16 %]
;gpz7: HzNz crush [51 %]
;gpz8: 180 pair [13.17 %]

;gpnam1: SMSQ10.100
;gpnam2: SMSQ10.100
;gpnam3: SMSQ10.100
;gpnam4: SMSQ10.100
;gpnam5: SMSQ10.100
;gpnam6: SMSQ10.100
;gpnam7: SMSQ10.100
;gpnam8: SMSQ10.100