stebpgp1s19.kinetic.cw tested

stebpgp1s19.kinetic.cw tested

;pseudo-3D for kinetic measurements
; Delays in final spin-echo adjusted to give zero first-order phase corr.
; Use for flat baselines (with baseopt, Chris Waudby October 2016)
;
;stebpgp1s19
;avance-version (07/05/08)
;2D sequence for diffusion measurement using stimulated echo
;using bipolar gradient pulses for diffusion
;using 1 spoil gradient
;water suppression using 3-9-19 pulse sequence with gradients
;with added presat water suppression
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple_d>

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

;define list<gradient> diff=<Difframp>
;define list<gradient> diff={0.05 0.179 0.307 0.436 0.564 0.693 0.821 0.95}
define list<gradient> diff={0.15 0.95}

"p2=p1*2"
"d11=30m"

"DELTA1=d20-p1*2-p2-p30*2-d16*3-p19"

"TAU=0.6366*p1+8u"

"acqt0=0"
aqseq 321

1 ze
2 d11
  4u pl9:f1
  d1 cw:f1 ph1
  4u do:f1

  50u pl1:f1 UNBLKGRAD
  p1 ph1
  p30:gp6*diff
  d16
  p2 ph2
  p30:gp6*-1*diff
  d16
  p1 ph3
  p19:gp7

  d16 pl9:f1
  DELTA1 cw:f1 ph1
  1u do:f1
  4u pl1:f1
;  d16
;  DELTA1
  p1 ph4
  p30:gp6*diff
  d16
  p2 ph2
  p30:gp6*-1*diff
  d16
  p16:gp1
  d16 pl18:f1
  TAU
  p27*0.231 ph5
  d19*2
  p27*0.692 ph5
  d19*2
  p27*1.462 ph5
  d19*2
  p27*1.462 ph6
  d19*2
  p27*0.692 ph6
  d19*2
  p0*0.231 ph6
  4u
  p16:gp1
  d16
  4u BLKGRAD
  go=2 ph31
  d11 mc #0 to 2
    F2QF(igrad diff)
    F1QF(rgrad diff)
exit

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

;pl1: f1 channel - power level for pulse (default)
;pl9: f1 channel - power level for presaturation
;pl18: f1 channel - power level for 3-9-19-pulse (watergate)
;p0 : f1 channel -  90 degree pulse at pl18
;                      use for fine adjustment
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p16: gradient pulse (WATERGATE)
;p19: gradient pulse 2 (spoil gradient)
;p27: f1 channel -  90 degree pulse at pl18
;p30: gradient pulse (little DELTA * 0.5)
;d1 : relaxation delay; 1-5 * T1
;d16: delay for gradient recovery
;d19: delay for binomial water suppression
;     d19 = (1/(2*d)), d = distance of next null (in Hz) [106 us at 600 MHz]
;d20: diffusion time (big DELTA)
;NS : 8 * n
;DS : 4 * m
;td1: number of experiments
;FnMODE: QF
;        use xf2 and DOSY processing

;use gradient ratio:    gp 1 : gp 6 : gp7
;                        -20 :  100 : -17.13

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

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

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

;$Id: stebpgp1s19,v 1.4.6.1 2007/05/09 09:36:59 ber Exp $

;pseudo-3D for kinetic measurements
; Delays in final spin-echo adjusted to give zero first-order phase corr.
; Use for flat baselines (with baseopt, Chris Waudby October 2016)
;
;stebpgp1s19
;avance-version (07/05/08)
;2D sequence for diffusion measurement using stimulated echo
;using bipolar gradient pulses for diffusion
;using 1 spoil gradient
;water suppression using 3-9-19 pulse sequence with gradients
;with added presat water suppression
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple_d>

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

define list<gradient> diff=<Difframp>

"p2=p1*2"

"DELTA1=d20-p1*2-p2-p30*2-d16*3-p19"

"TAU=0.6366*p1+8u"

"acqt0=0"
aqseq 321

1 ze
2 d11
  4u pl9:f1
  d1 cw:f1 ph1
  4u do:f1

  50u pl1:f1 UNBLKGRAD
  p1 ph1
  p30:gp6*diff
  d16
  p2 ph2
  p30:gp6*-1*diff
  d16
  p1 ph3
  p19:gp7
  d16
  DELTA1
  p1 ph4
  p30:gp6*diff
  d16
  p2 ph2
  p30:gp6*-1*diff
  d16
  p16:gp1
  d16 pl18:f1
  TAU
  p27*0.231 ph5
  d19*2
  p27*0.692 ph5
  d19*2
  p27*1.462 ph5
  d19*2
  p27*1.462 ph6
  d19*2
  p27*0.692 ph6
  d19*2
  p0*0.231 ph6
  4u
  p16:gp1
  d16
  4u BLKGRAD
  go=2 ph31
  d1 mc #0 to 2
    F2QF(igrad diff)
    F1QF()
exit

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

;pl1: f1 channel - power level for pulse (default)
;pl9: f1 channel - power level for presaturation
;pl18: f1 channel - power level for 3-9-19-pulse (watergate)
;p0 : f1 channel -  90 degree pulse at pl18
;                      use for fine adjustment
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p16: gradient pulse (WATERGATE)
;p19: gradient pulse 2 (spoil gradient)
;p27: f1 channel -  90 degree pulse at pl18
;p30: gradient pulse (little DELTA * 0.5)
;d1 : relaxation delay; 1-5 * T1
;d16: delay for gradient recovery
;d19: delay for binomial water suppression
;     d19 = (1/(2*d)), d = distance of next null (in Hz)
;d20: diffusion time (big DELTA)
;NS : 8 * n
;DS : 4 * m
;td1: number of experiments
;FnMODE: QF
;        use xf2 and DOSY processing

;use gradient ratio:    gp 1 : gp 6 : gp7
;                        -20 :  100 : -17.13

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

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

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

;$Id: stebpgp1s19,v 1.4.6.1 2007/05/09 09:36:59 ber Exp $


trying to adapt hsqcrexetf3gpsi3d.ts3.cw for topspin 3.5pl7 - needs testing

;hsqcrexetf3gpsi3d.cw
;modifications for topspin 3.5pl7 (hopefully!)
;15N CW-CPMG HSQC
;avance-version (10/01/20)
;3D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;for measuring N-15 R(exchange) using a CPMG train
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;as pseudo3D
;
;D. Flemming Hansen, Pramodh Vallurupalli, and Lewis E. Kay
;J. Phys. Chem. B, 2008, 112 (19), 5898-5904
;
;
;Chris Waudby, Feb 2014
; updated to work in topspin 3
;
;Chris Waudby, Sep 2012
; 13C decoupling
; 1H CW temperature compensation for 2*d21
; off-resonance 15N temperature compensation
; corrected chi/zeta/equilibration delays, gradient strengths
; reduced 15N power
; power checks
;
;Wolfgang Bermel, Sep 2010
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

;----------------------------------------------------------
;d21 = T_relax / 2
;vd list, vCPMG field strength in Hz
;va list, CW decoupling power for vCW = 2 * k * vCPMG
;
;T_relax <= 40 ms
;vCPMG <= 1000 Hz (2kHz 15N pulsing)
;
;----------------------------------------------------------

;prosol relations=<triple>

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

define list<power> rflist=<$VALIST>
define list<delay> vd_list=<$VDLIST>  ; Feb 2014

define loopcounter COUNTER2
;define delay DELTA9

"p2=p1*2"
"p22=p21*2"
"p24=p25*0.5"
"d11=30m"
"d12=20u"
"d25=2.68m"
"d26=2.25m"
"d28=5.0m"  ; tau_eq
"d17=p16"

"d10=6u"

"in10=inf2/2"

"d31=0"  ; Feb 2014
"l11=0"  ; Feb 2014, loopcounter for cpmg

#   ifdef LABEL_CN
"DELTA1=d25-p16-d16+larger(p2,p8)+d10*2+10u"
#   else
"DELTA1=d25-p16-d16+p2+d10*2+10u"
#   endif /*LABEL_CN*/

"DELTA2=p16+d16+8u"
"DELTA4=p25*0.5-(p1*2/3.1416)" ;zeta
"DELTA5=(p45-4*p1)/3.1416" ;chi
"DELTA6=d26-p16-d16"
"DELTA7=d25-p16-d16"
"DELTA8=d28-p16-d16"
"DELTA9=(1 / (1000*4) ) - p25/2000000" ;shortest CPMG delay, for temperature comp.

"spoff1=0"  ; H2O flip-down on-resonance
"spoff13=bf2*((cnst21+cnst22)/2000000)-o2"  ; average of Ca/CO

"acqt0=0"    ; Feb 2014
baseopt_echo ; Feb 2014

aqseq 312

1 ze
  10m st0 ; interleaving
  d11

;  if "d1 < 1.5s"
;    {
;    d11
;    print "error: recycle delay too short, d1 must be >= 1.5 s, aborting..."
;    goto stop
;    }
;
;  if "d21 > 20m"
;    {
;    d11
;    print "error: CPMG train too long, d21 must be <= 20 ms, aborting..."
;    goto stop
;    }
;
;  if "p25 < 90u"
;    {
;    d11
;    print "error: CPMG 180deg pulse too short, p25 must be >= 90 us, aborting..."
;    goto stop
;    }

  ;if "DELTA9 < 2*p25"
  ; {
  ;  d11
  ;  print "error: CPMG duty cycle too high, aborting..."
  ;  goto stop
  ;  }

  d11 pl16:f3
  d11 fq=cnst18(bf ppm):f1  ; 1H on H2O
2 d11 do:f3
3 d12
4 d12
5 d12 pl33:f1

  20u   ; Feb 2014
  "d31=vd_list[l11]"   ; Feb 2014
  10u
  "rflist.idx = l11"
  ; d31 replaces vd
  10u   ; Feb 2014

;  if "d31 > 1000"
;    {
;    d11
;    print "error: CPMG frequency too high, vd must be <= 1000 Hz, aborting..."
;    goto stop
;    }

if "l11==0" goto 71
; this branch - l11 > 0 - not reference plane
  20u
  "DELTA3=(1 / (d31*4) ) - p25/2000000"
  20u
  "COUNTER=d21*d31*2 + 0.5"
  20u
  goto 72
; this branch - l11 = 0 - reference plane
  20u
  "DELTA3=(1 / (1000*4) ) - p25/2000000"	;1000 = max. B1-field as defined in VDLIST
  20u
  "COUNTER=d21*1000*2 + 0.5"
  20u
72 10u

;  if "DELTA3 < 2*p25/1000000"
;    {
;    d11
;    print "error: CPMG duty cycle too high, aborting..."
;    goto stop
;    }

  if "l11 > 0" goto 73
     ; reference plane - temperature compensation
     (p11:sp1 ph2:r):f1  ; H2O flip-down
     2u fq=cnst19(bf ppm):f1  ; 1H on amides
     2u pl33:f1 pl23:f3
     d21*2 cpd1:f1 ph1  ; 1H decoupling at pl33
     2u do:f1
     2u fq=cnst18(bf ppm):f1  ; 1H on H2O
     (p11:sp1 ph4:r):f1  ; H2O flip-up
73   8u

  ; recycle delay
  d1  fq=cnst16(bf ppm):f3  ; 15N on-resonance

  ; 15N compensation
  ; initial delay to keep d1 constant:
  if "l11==0" goto 74
9   1000u  ; 2*(DELTA3+p25+DELTA3)
    lo to 9 times COUNTER
74  4u
  ; now the 15N compensation pulses (unless d31 is at max 1000 Hz frequency)
  if "d31 == 1000" goto 75
     ; keep total number of pulses constant throughout experiment
     ; (pulses applied at maximum frequency)
     20u
     "COUNTER2=d21*(1000-d31)*4 + 0.5"

     4u pl23:f3
     4u fq=cnst17(bf ppm):f3  ; 15N off-resonance

8    DELTA9
     (p25 ph2):f3
     DELTA9 ;ipp20
     lo to 8 times COUNTER2

     4u fq=cnst16(bf ppm):f3  ; 15N on-resonance
     4u ;rpp20
75  10u

  ; crush Boltzmann Nz
  50u UNBLKGRAD
  2u pl1:f1 pl3:f3
  (p21 ph1):f3
  p16:gp0
  d16

  ; main sequence starts
  (p11:sp1 ph4:r):f1
  2u pl1:f1

  (p1 ph1)
  p16:gp1
  d16
  DELTA6
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA6
  p16:gp1
  d16
  (p1 ph2)

  p16:gp2
  d16 pl1:f1

  (p21 ph1):f3
  p16:gp3
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp3
  d16
  (p2 ph1) (p21 ph2):f3

  p16:gp4
  d16 fq=cnst19(bf ppm):f1  ; 1H on amides
  DELTA8 pl23:f3  ; tau_eq (low power for 15N CPMG)

  (p1 ph5)
  DELTA5  ; chi
  (p1 ph1)
  DELTA4  ; zeta
  (p2 ph5)
  (p24 ph6):f3

  2u rflist:f1 ; Feb 2014

  if "l11 == 0" goto 76
     2u cpd1:f1 ph1
6    DELTA3
     (p25 ph2):f3
     DELTA3 ;ipp20
     lo to 6 times COUNTER
     2u do:f1
76  4u

  2u pl33:f1
   (center (p45 ph1) (p25 ph7):f3 )
  2u rflist:f1  ; Feb 2014

  if "l11 == 0" goto 77
     2u cpd1:f1 ph1
7    DELTA3
     (p25 ph2):f3
     DELTA3 ;ipp21
     lo to 7 times COUNTER
     2u do:f1
77   4u

  2u pl1:f1
  (p24 ph1):f3
  (p2 ph8)
  DELTA4 pl3:f3 ;rpp20  ; zeta (back to high power on 15N)
  (p1 ph1)
  DELTA5  ;rpp21  ; chi
  (p1 ph8)
  4u fq=cnst18(bf ppm):f1  ; 1H on H2O

  p16:gp5
  d16
  DELTA8  ; tau_eq

  (p21 ph9):f3
  d10 gron6
  5u groff
  p16:gp7*EA
  d16
  DELTA7
# ifdef LABEL_CN
  (center (p2 ph1) (p8:sp13 ph1):f2 )
# else
  (p2 ph1)
# endif /*LABEL_CN*/
  d10 gron6*-1
  5u groff
  (p22 ph1):f3
  p16:gp7*-1*EA
  d16
  DELTA1

  (center (p1 ph3) (p21 ph10):f3 )
  p16:gp8
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp8
  d16
  (center (p1 ph2) (p21 ph11):f3 )
  p16:gp9
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp9
  d16
  (p1 ph1)
  DELTA2
  (p2 ph1)
  4u
  p16:gp10
  d16 pl16:f3
  4u  BLKGRAD
  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
    F1QF(calclc(l11, 1))
    F2EA(calgrad(EA) & calph(ph11, +180), caldel(d10, in10) & calph(ph9, +180) & calph(ph31, +180))

stop, exit

;     F1QF(ivd & rflist.inc)
;     F2EA(igrad EA & ip11*2, id10 & ip9*2 & ip31*2)

;     F1QF(calclist(vd) & calclist(rflist))
;     F2EA(calgrad(EA) & calph(ph11, +180), caldel(d10, in10) & calph(ph9, +180) & calph(ph31, +180))

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

;pl0 : 120dB

;1H pulses

;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;pl1 : f1 channel - power level for pulse (default)

;p11: f1 channel -  90 degree shaped pulse (7ms EBURP1)
;sp1 : f1 channel - shaped pulse 90 degree

;p45 : f1 channel - CW 180 degree pulse at pl33
;;;rflist : f1 channel - CW decoupling power
;pl33 : f1 channel - CW decoupling power

;15N pulses

;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;pl3 : f3 channel - power level for pulse (default)

;p24: f3 channel -  90 degree pulse at pl23
;p25: f3 channel - 180 degree pulse at pl23
;pl23: f3 channel - power level for spinlock

;pl16: f3 channel - power level for CPD/BB decoupling

;vd : variable field strength, taken from vd-list

;13C pulses

;p8 : f2 channel - 180 degree shaped pulse
;sp13: f2 channel - shaped pulse 180 degree  (Ca and C=O, adiabatic)

;gradients

;p16: homospoil/gradient pulse

;d1 : relaxation delay; 1-5 * T1
;d10 : incremented delay                             [6 usec]
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d17: gradient pulse length
;d21: length of CPMG mixing time (T_relax / 2)
;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))
;d28: equilibration delay   [5 ms]
;cnst4: = J(YH)
;cnst16: o3p
;cnst17: o3p off-res. for compensation spinlock
;cnst18: water chemical shift (offset, in ppm), e.g. 4.7
;cnst19: centre of HN protons (offset, in ppm), e.g. 8.75
;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)
;inf2: 1/SW(X) = 2 * DW(X)
;in10: 1/(2 * SW(X)) = DW(X)
;nd10: 2
;NS: 8 * n
;DS: >= 16
;td1: number of delays in vd-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: 10%
;gpz1: 4%
;gpz2: -40%
;gpz3: -77.7%
;gpz4: 37.5%
;gpz5: -4.5%
;gpz6: 0.1%
;gpz7: 80%
;gpz8: 11.0%
;gpz9: 20.5%
;gpz10: 16.2%

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

;note: the values in the vd-list are interpreted as field-strength in Hz

;$Id: hsqcrexetf3gpsi3d,v 1.9 2009/07/17 16:37:47 ber Exp $

;hsqcrexetf3gpsi3d.cw
;15N CW-CPMG HSQC
;avance-version (10/01/20)
;3D H-1/X correlation via double inept transfer
;   using sensitivity improvement
;for measuring N-15 R(exchange) using a CPMG train
;phase sensitive using Echo/Antiecho-TPPI gradient selection
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;as pseudo3D
;
;D. Flemming Hansen, Pramodh Vallurupalli, and Lewis E. Kay
;J. Phys. Chem. B, 2008, 112 (19), 5898-5904
;
;
;Chris Waudby, Feb 2014
; updated to work in topspin 3
;
;Chris Waudby, Sep 2012
; 13C decoupling
; 1H CW temperature compensation for 2*d21
; off-resonance 15N temperature compensation
; corrected chi/zeta/equilibration delays, gradient strengths
; reduced 15N power
; power checks
;
;Wolfgang Bermel, Sep 2010
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

;----------------------------------------------------------
;d21 = T_relax / 2
;vd list, vCPMG field strength in Hz
;va list, CW decoupling power for vCW = 2 * k * vCPMG
;
;T_relax <= 40 ms
;vCPMG <= 1000 Hz (2kHz 15N pulsing)
;
;----------------------------------------------------------

prosol relations=<triple2>

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

define list<power> rflist=<$VALIST>
define list<delay> vd_list=<$VDLIST>  ; Feb 2014

define loopcounter COUNTER2
;define delay DELTA9

"p2=p1*2"
"p22=p21*2"
"p24=p25*0.5"
"d11=30m"
"d12=20u"
"d25=2.68m"
"d26=2.25m"
"d28=5.0m"  ; tau_eq
"d17=p16"

"d10=6u"

"in10=inf2/2"

"d31=0"  ; Feb 2014
"l11=0"  ; Feb 2014

#   ifdef LABEL_CN
"DELTA1=d25-p16-d16+larger(p2,p8)+d10*2+10u"
#   else
"DELTA1=d25-p16-d16+p2+d10*2+10u"
#   endif /*LABEL_CN*/

"DELTA2=p16+d16+8u"
"DELTA4=p25*0.5-(p1*2/3.1416)" ;zeta
"DELTA5=(p45-4*p1)/3.1416" ;chi
"DELTA6=d26-p16-d16"
"DELTA7=d25-p16-d16"
"DELTA8=d28-p16-d16"
"DELTA9=(1 / (1000*4) ) - p25/2000000" ;shortest CPMG delay, for temperature comp.

"spoff1=0"  ; H2O flip-down on-resonance
"spoff13=bf2*((cnst21+cnst22)/2000000)-o2"  ; average of Ca/CO

"acqt0=0"    ; Feb 2014
baseopt_echo ; Feb 2014

aqseq 312

1 ze
  d11

  if "d1 < 1.5s"
    {
    d11
    print "error: recycle delay too short, d1 must be >= 2.5 s, aborting..."
    goto stop
    }

  if "d21 > 20m"
    {
    d11
    print "error: CPMG train too long, d21 must be <= 20 ms, aborting..."
    goto stop
    }

  if "p25 < 90u"
    {
    d11
    print "error: CPMG 180deg pulse too short, p25 must be >= 90 us, aborting..."
    goto stop
    }

  ;if "DELTA9 < 2*p25"
  ; {
  ;  d11
  ;  print "error: CPMG duty cycle too high, aborting..."
  ;  goto stop
  ;  }

  d11 pl16:f3
  d11 fq=cnst18(bf ppm):f1  ; 1H on H2O
2 d11 do:f3
3 d12
4 d12
5 d12 pl33:f1

  20u   ; Feb 2014
  "d31=vd_list[l11]"   ; Feb 2014
  "rflist.idx = l11"
  ; d31 replaces vd
  20u   ; Feb 2014

  if "d31 > 1000"
    {
    d11
    print "error: CPMG frequency too high, vd must be <= 1000 Hz, aborting..."
    goto stop
    }

  if "d31 == 0"
     {
     20u
     "DELTA3=(1 / (1000*4) ) - p25/2000000"	;1000 = max. B1-field as defined in VDLIST
     20u
     "COUNTER=d21*1000*2 + 0.5"
     }
  else
     {
     20u
     "DELTA3=(1 / (d31*4) ) - p25/2000000"
     20u
     "COUNTER=d21*d31*2 + 0.5"
     }

  if "DELTA3 < 2*p25/1000000"
    {
    d11
    print "error: CPMG duty cycle too high, aborting..."
    goto stop
    }

  if "d31 == 0"
     {
     (p11:sp1 ph2:r):f1  ; H2O flip-down
     2u fq=cnst19(bf ppm):f1  ; 1H on amides
     2u pl33:f1 pl23:f3
     d21*2 cpd1:f1 ph1  ; 1H decoupling at pl33
     2u do:f1
     2u fq=cnst18(bf ppm):f1  ; 1H on H2O
     (p11:sp1 ph4:r):f1  ; H2O flip-up
     }
  else
     {
     8u
     }

  ; recycle delay
  d1  fq=cnst16(bf ppm):f3  ; 15N on-resonance

  ; 15N compensation
  ; initial delay to keep d1 constant:
  if "d31 == 0"
    {
    4u
    }
  else
    {
9   1000u  ; 2*(DELTA3+p25+DELTA3)
    lo to 9 times COUNTER
    4u
    }
  ; now the 15N compensation pulses
  if "d31 == 1000"
    {
    36u
    }
  else
    {
     ; keep total number of pulses constant throughout experiment
     ; (pulses applied at maximum frequency)
     20u
     "COUNTER2=d21*(1000-d31)*4 + 0.5"

     4u pl23:f3
     4u fq=cnst17(bf ppm):f3  ; 15N off-resonance

8    DELTA9
     (p25 ph2):f3
     DELTA9 ;ipp20
     lo to 8 times COUNTER2

     4u fq=cnst16(bf ppm):f3  ; 15N on-resonance
     4u ;rpp20
    }

  ; crush Boltzmann Nz
  50u UNBLKGRAD
  2u pl1:f1 pl3:f3
  (p21 ph1):f3
  p16:gp0
  d16

  ; main sequence starts
  (p11:sp1 ph4:r):f1
  2u pl1:f1

  (p1 ph1)
  p16:gp1
  d16
  DELTA6
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA6
  p16:gp1
  d16
  (p1 ph2)

  p16:gp2
  d16 pl1:f1

  (p21 ph1):f3
  p16:gp3
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp3
  d16
  (p2 ph1) (p21 ph2):f3

  p16:gp4
  d16 fq=cnst19(bf ppm):f1  ; 1H on amides
  DELTA8 pl23:f3  ; tau_eq (low power for 15N CPMG)

  (p1 ph5)
  DELTA5  ; chi
  (p1 ph1)
  DELTA4  ; zeta
  (p2 ph5)
  (p24 ph6):f3

  2u rflist:f1 ; Feb 2014

  if "d31 == 0"
     {
     4u
     }
  else
     {
     4u
     2u cpd1:f1 ph1
6    DELTA3
     (p25 ph2):f3
     DELTA3 ;ipp20
     lo to 6 times COUNTER
     2u do:f1
     }

  2u pl33:f1
   (center (p45 ph1) (p25 ph7):f3 )
  2u rflist:f1  ; Feb 2014

  if "d31 == 0"
     {
     4u
     }
  else
     {
     2u cpd1:f1 ph1
7    DELTA3
     (p25 ph2):f3
     DELTA3 ;ipp21
     lo to 7 times COUNTER
     4u
     2u do:f1
     }

  2u pl1:f1
 (p24 ph1):f3
  (p2 ph8)
  DELTA4 pl3:f3 ;rpp20  ; zeta (back to high power on 15N)
  (p1 ph1)
  DELTA5  ;rpp21  ; chi
  (p1 ph8)
  4u fq=cnst18(bf ppm):f1  ; 1H on H2O

  p16:gp5
  d16
  DELTA8  ; tau_eq

  (p21 ph9):f3
  d10 gron6
  5u groff
  p16:gp7*EA
  d16
  DELTA7
# ifdef LABEL_CN
  (center (p2 ph1) (p8:sp13 ph1):f2 )
# else
  (p2 ph1)
# endif /*LABEL_CN*/
  d10 gron6*-1
  5u groff
  (p22 ph1):f3
  p16:gp7*-1*EA
  d16
  DELTA1

  (center (p1 ph3) (p21 ph10):f3 )
  p16:gp8
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp8
  d16
  (center (p1 ph2) (p21 ph11):f3 )
  p16:gp9
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp9
  d16
  (p1 ph1)
  DELTA2
  (p2 ph1)
  4u
  p16:gp10
  d16 pl16:f3
  4u  BLKGRAD
  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
    F1QF(calclc(l11, 1))
    F2EA(calgrad(EA) & calph(ph11, +180), caldel(d10, in10) & calph(ph9, +180) & calph(ph31, +180))

stop, exit

;     F1QF(ivd & rflist.inc)
;     F2EA(igrad EA & ip11*2, id10 & ip9*2 & ip31*2)

;     F1QF(calclist(vd) & calclist(rflist))
;     F2EA(calgrad(EA) & calph(ph11, +180), caldel(d10, in10) & calph(ph9, +180) & calph(ph31, +180))

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

;pl0 : 120dB

;1H pulses

;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;pl1 : f1 channel - power level for pulse (default)

;p11: f1 channel -  90 degree shaped pulse (7ms EBURP1)
;sp1 : f1 channel - shaped pulse 90 degree

;p45 : f1 channel - CW 180 degree pulse at pl33
;;;rflist : f1 channel - CW decoupling power
;pl33 : f1 channel - CW decoupling power

;15N pulses

;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;pl3 : f3 channel - power level for pulse (default)

;p24: f3 channel -  90 degree pulse at pl23
;p25: f3 channel - 180 degree pulse at pl23
;pl23: f3 channel - power level for spinlock

;pl16: f3 channel - power level for CPD/BB decoupling

;vd : variable field strength, taken from vd-list

;13C pulses

;p8 : f2 channel - 180 degree shaped pulse
;sp13: f2 channel - shaped pulse 180 degree  (Ca and C=O, adiabatic)

;gradients

;p16: homospoil/gradient pulse

;d1 : relaxation delay; 1-5 * T1
;d10 : incremented delay                             [6 usec]
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d17: gradient pulse length
;d21: length of CPMG mixing time (T_relax / 2)
;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))
;d28: equilibration delay   [5 ms]
;cnst4: = J(YH)
;cnst16: o3p
;cnst17: o3p off-res. for compensation spinlock
;cnst18: water chemical shift (offset, in ppm), e.g. 4.7
;cnst19: centre of HN protons (offset, in ppm), e.g. 8.75
;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)
;inf2: 1/SW(X) = 2 * DW(X)
;in10: 1/(2 * SW(X)) = DW(X)
;nd10: 2
;NS: 8 * n
;DS: >= 16
;td1: number of delays in vd-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: 10%
;gpz1: 4%
;gpz2: -40%
;gpz3: -77.7%
;gpz4: 37.5%
;gpz5: -4.5%
;gpz6: 0.1%
;gpz7: 80%
;gpz8: 11.0%
;gpz9: 20.5%
;gpz10: 16.2%

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

;note: the values in the vd-list are interpreted as field-strength in Hz

;$Id: hsqcrexetf3gpsi3d,v 1.9 2009/07/17 16:37:47 ber Exp $


testing sfnoesysfhmqcgpph_hch.3d.cw

testing sfnoesysfhmqcgpph_hch.3d.cw

;3D H[N/M]CMHM SF-NOESY-SFHMQC
;for amide/methyl-methyl NOES
; Rossi 2016 JBNMR

;F1(H,t1) ---NOE--> F1(H) -> F2(C[mq],t2) -> F1(H,t3)
;
;Indirect evolution order is t2, t1 (13C, 1Hnoe)
;Delays adjusted for zero first-order phase correction in acqusition dim

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

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

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

;------------options for first (in transfer pathway) 1H (F1)
"d0=3u"
"in0=inf1"

;------------options for second (in transfer pathway) 13C (F2)
"in10=inf2"
"d10=in10/2-p3*4/3.1415"

"spoff13=bf1*(cnst19/1000000)-o1" ; H[N] fd (p29)
"spoff14=bf1*(cnst19/1000000)-o1" ; H[N] 180 (p30)
"spoff15=bf1*(cnst19/1000000)-o1" ; H[N] fb (p29)
"spoal13=1"
"spoal14=0.5"
"spoal15=0"

"spoff23=bf1*(cnst20/1000000)-o1" ; H[M] fd (p39)
"spoff24=bf1*(cnst20/1000000)-o1" ; H[M] 180 (p40)
"spoal23=1"
"spoal24=0.5"

"TAU=d8-p16*2-d16*2-p3-14u"

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

aqseq 321	; for info only

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

  d1
  50u UNBLKGRAD
  p16:gp1
  d16

;-------------------------start 1H evolution

  20u pl16:f3
  4u cpd3:f3 ; 15N cpd
  (p29:sp13 ph11):f1
  d0
  (p30:sp14 ph13):f1
  3u
  (p29:sp15 ph14):f1
  4u do:f3

  ; purge residual magnetisation
  p16:gp1
  d16 pl2:f2
  (p3 ph1):f2
  10u
  p16:gp1*0.71
  d16

  TAU

;------------------------start second 13C HMQC element
  (p39:sp23 ph1):f1
  p16:gp2
  d16
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph12 d10 p3 ph15 DELTA1):f2 )
  DELTA2
  p16:gp2
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

  d11 do:f2 mc #0 to 2
	F2PH(ip15, id10)
	F1PH(rp15 & rd10 & ip14, id0)

  4u BLKGRAD

exit

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

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;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
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p29: f1 channel - 90 degree shaped pulse for excitation (amide)
;                      Pc9_4_90.1000 (90o)    (2657 us at 700 MHz)
;p30: f1 channel - 180 degree shaped pulse for refocussing (amide)
;                      Reburp.1000               (1943 us at 700 MHz)
;p39: f1 channel - 120 degree shaped pulse for excitation (methyl)
;                      Pc9_4_120.1000 (120o)    (2314 us at 700 MHz)
;p40: f1 channel - 180 degree shaped pulse for refocussing (methyl)
;                      Reburp.1000               (1693 us at 700 MHz)
;sp13: f1 channel - shaped pulse 90 degree (amide)
;                   (Pc9_4_90.1000 )
;sp14: f1 channel - shaped pulse 180 degree (Reburp.1000) (amide)
;sp23: f1 channel - shaped pulse 120 degree (methyl)
;                   (Pc9_4_120.1000 )
;sp24: f1 channel - shaped pulse 180 degree (Reburp.1000) (methyl)
;sp25: f1 channel - shaped pulse 120 degree (methyl)
;                   (Pc9_4_120.1000 )
;cnst19: H(N) chemical shift (offset, in ppm) [8.2 ppm]
;cnst20: H(methyl) chemical shift (offset, in ppm) [0.7 ppm]
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529

;p16: homospoil/gradient pulse                       [1 msec]
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (4D)
;d10: 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)
;inf1: 1/SW(H)
;inf2: 1/SW(C) = DW(C)
;in0: 1/(SW(H)) = DW(C)
;in10: 1/(2 * SW(C)) = 0.5 * DW(C)
;NS: 8 * 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
;cpd3: decoupling according to sequence defined by cpdprg2
;pcpd3: 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
;LABEL_CN: for 15N decoupling during indirect 13C evolution periods
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;NOE_SAT: for water saturation during NOE mixing time
;F2_plane: for zero 13C phase evolution in F3
;F3_plane: for zero 13C phase evolution in F2
;F2_SINGLEDWELL: for single-dwell first-point delay in F2
;F3_SINGLEDWELL: for single-dwell first-point delay in F3
;TRIMPULSE: to apply trim-pulses in second 13C HMQC element, set p28
;NUS: for non-uniform sampling (Topspin 3)
                                          ;preprocessor-flags-end

;3D H[N/M]CMHM SF-NOESY-SFHMQC
;for amide/methyl-methyl NOES
; Rossi 2016 JBNMR

;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"
"d12=20u"
"d13=4u"

;------------options for first (in transfer pathway) 1H (F1)
"d0=3u"
"in0=inf1"

;------------options for second (in transfer pathway) 13C (F2)
"d10=in10/2-p3*4/3.1415"
"in10=inf2"

"spoff13=bf1*(cnst19/1000000)-o1" ; H[N] fd (p29)
"spoff14=bf1*(cnst19/1000000)-o1" ; H[N] 180 (p30)
"spoff15=bf1*(cnst19/1000000)-o1" ; H[N] fb (p29)
"spoal13=1"
"spoal14=0.5"
"spoal15=0"

"spoff23=bf1*(cnst20/1000000)-o1" ; H[M] fd (p39)
"spoff24=bf1*(cnst20/1000000)-o1" ; H[M] 180 (p40)
"spoal23=1"
"spoal24=0.5"

"TAU=d8-p16*2-d16*2-p3-14u"

"DELTA1=d2-p16-d16"
"DELTA2=p39*cnst23-4u-de"
"acqt0=de"

aqseq 321	; for info only

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

  d1
  50u UNBLKGRAD
  p16:gp1
  d16

;-------------------------start 1H evolution

  20u pl16:f3
  4u cpd3:f3 ; 15N cpd
  (p29:sp13 ph11):f1
  d0
  (p30:sp14 ph13):f1
  3u
  (p29:sp15 ph14):f1
  4u do:f3

  ; purge residual magnetisation
  p16:gp1
  d16 pl2:f2
  (p3 ph1):f2
  10u
  p16:gp1*0.71
  d16

  TAU

;------------------------start second 13C HMQC element
  (p39:sp23 ph1):f1
  p16:gp2
  d16
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph12 d10 p3 ph15 DELTA1):f2 )
  DELTA2
  p16:gp2
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

  d11 do:f2 mc #0 to 2
	F2PH(ip15, id10)
	F1PH(rp15 & rd10 & ip14, id0)

  4u BLKGRAD

exit

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

;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl12: f2 channel - power level for CPD/BB decoupling
;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
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p29: f1 channel - 90 degree shaped pulse for excitation (amide)
;                      Pc9_4_90.1000 (90o)    (2657 us at 700 MHz)
;p30: f1 channel - 180 degree shaped pulse for refocussing (amide)
;                      Reburp.1000               (1943 us at 700 MHz)
;p39: f1 channel - 120 degree shaped pulse for excitation (methyl)
;                      Pc9_4_120.1000 (120o)    (1598 us at 700 MHz)
;p40: f1 channel - 180 degree shaped pulse for refocussing (methyl)
;                      Reburp.1000               (1259 us at 700 MHz)
;sp13: f1 channel - shaped pulse 90 degree (amide)
;                   (Pc9_4_90.1000 )
;sp14: f1 channel - shaped pulse 180 degree (Reburp.1000) (amide)
;sp23: f1 channel - shaped pulse 120 degree (methyl)
;                   (Pc9_4_120.1000 )
;sp24: f1 channel - shaped pulse 180 degree (Reburp.1000) (methyl)
;sp25: f1 channel - shaped pulse 120 degree (methyl)
;                   (Pc9_4_120.1000 )
;cnst19: H(N) chemical shift (offset, in ppm) [8.2 ppm]
;cnst20: H(methyl) chemical shift (offset, in ppm) [0.7 ppm]
;cnst39: compensation of chemical shift evolution during p39
;           Pc9_4_120.1000: 0.529

;p16: homospoil/gradient pulse                       [1 msec]
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (4D)
;d10: 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)
;inf1: 1/SW(H)
;inf2: 1/SW(C) = DW(C)
;in0: 1/(SW(H)) = DW(C)
;in10: 1/(2 * SW(C)) = 0.5 * DW(C)
;NS: 8 * 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
;cpd3: decoupling according to sequence defined by cpdprg2
;pcpd3: 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
;LABEL_CN: for 15N decoupling during indirect 13C evolution periods
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;NOE_SAT: for water saturation during NOE mixing time
;F2_plane: for zero 13C phase evolution in F3
;F3_plane: for zero 13C phase evolution in F2
;F2_SINGLEDWELL: for single-dwell first-point delay in F2
;F3_SINGLEDWELL: for single-dwell first-point delay in F3
;TRIMPULSE: to apply trim-pulses in second 13C HMQC element, set p28
;NUS: for non-uniform sampling (Topspin 3)
                                          ;preprocessor-flags-end


testing HCconh_tocsy.cw

testing HCconh_tocsy.cw


fix phase cycling in hmqcet.cw

fix phase cycling in hmqcet.cw

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

prosol relations=<triple>

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

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

"in0=inf1/2"

"d0=3u"

"DELTA=p3*0.6366+p17+d17-p1-d0"
"DELTA1=d21-p1*0.6366"
"DELTA2=d21-p17-d16-4u"
"acqt0=0"

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

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

  (p1 ph1):f1
  DELTA1

  (p3 ph3):f2
  p17:gp1
  d17
  (p4 ph1):f2
  DELTA

  d0
  (p2 ph2):f1
  d0

  DELTA
  (p4 ph1):f2
  p17:gp1
  d17
  (p3 ph4):f2

  DELTA2
  p17:gp2*EA
  d16 pl12:f2
  4u BLKGRAD

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

;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling (low power)
;p16: homospoil/gradient pulse                       [1 msec]
;p1:  f1 channel -  90 degree high power pulse
;p3:  f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D) = in0/2-p3*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntoEcho
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

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

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

prosol relations=<triple>

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

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

"in0=inf1/2"

"d0=3u"

"DELTA=p3*0.6366+p17+d17-p1-d0"
"DELTA1=d21-p1*0.6366"
"DELTA2=d21-p17-d16-4u"
"acqt0=0"

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

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

  (p1 ph1):f1
  DELTA1

  (p3 ph3):f2
  p17:gp1
  d17
  (p4 ph2):f2
  DELTA

  d0
  (p2 ph1):f1
  d0

  DELTA
  (p4 ph1):f2
  p17:gp1
  d17
  (p3 ph4):f2

  DELTA2
  p17:gp2*EA
  d16 pl12:f2
  4u BLKGRAD

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

;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling (low power)
;p16: homospoil/gradient pulse                       [1 msec]
;p1:  f1 channel -  90 degree high power pulse
;p3:  f2 channel -  90 degree high power pulse
;d0 : incremented delay (2D) = in0/2-p3*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;inf1: 1/SW(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: Echo-AntoEcho
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

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


hard coding inept transfer periods

hard coding inept transfer periods

;Mar 2017: added CPD and baseopt
;
;Sep 2014: added option for alternative gradient ramp file
;
;May 2013: separate power levels for water flipback and flipdown pulses
;Adjusted delays for zero first-order phase correction
;
;With possibility for multiple acquistion blocks when NS > phase cycle
;  => set TD0 > 1 (total scans = TD0*NS)
;
;From MH_XSte
;Modified to use convention that d20 is equal to big delta
;Reduced time between gradient pulses in bipolar pairs (tau):
;    tau = d16 + p22
;
;H-1/X correlation via double refocused inept transfer
;ste during the transfer steps and storage of the magnetization on the X-nucleus during the diffusion delay
;watergate after the decoding gradients for use with z-only gradient probes
;1D version
;written by Fabien Ferrage, last modification November 22nd 2004
;
;Ferrage et al., JACS (2004) 126:5654

prosol relations=<triple_d>

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

# ifdef ALT_RAMP
define list<gradient> diff=<Difframp2>
# else
define list<gradient> diff=<Difframp>
# endif /*ALT_RAMP*/

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

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

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

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

1 ze
  d11
  d12 BLKGRAD
2 d11 do:f3
3 d11
4 d11

# ifdef CRUSHER

  50u UNBLKGRAD
  p19:gp0
  d16
  10u pl1:f1
  (p1 ph4):f1				; +x
  4u pl0:f1
  (p11:sp11 ph9:r):f1			; flipback(-x): -y -> +z
  4u
  p19:gp0*0.71
  d16
  4u BLKGRAD

# endif /*CRUSHER*/

# ifdef PRESAT
  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
# else
  d1
# endif /*PRESAT*/

  d12 pl3:f3
  (p21 ph4):f3
  d15 UNBLKGRAD
  p19:gp4                     		;Eqm Nz spoiler
  d16 pl0:f1
  (p11:sp1 ph2:r):f1		; flipdown(-x): +z -> +y
  d12 pl1:f1
  (p1 ph4):f1
  d4
  p30:gp6*diff                		;gradient encoding
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient encoding
  d16
  d4
  (p1 ph1):f1
  d12 pl0:f1
  (p11:sp1 ph3:r):f1		; flipdown(-y): -x -> -z
  d15
  p19:gp2                     		;2HzNz spoiler
  d16
  (p21 ph4):f3
  d5
  p19:gp8                     		;spoiler (echo)
  d16 pl1:f1
  (center (p2 ph2):f1 (p22 ph4):f3)
  d5
  p19:gp8                     		;spoiler (echo)
  d16
  (p21 ph5):f3
  d15
  p19:gp3                     		;Nz spoiler
  d16 BLKGRAD
  DELTA1
  (p21 ph6):f3
  d5 UNBLKGRAD
  p19:gp9                     		;spoiler (echo)
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  d6
  p19:gp9                     		;spoiler (echo)
  d16 pl0:f1
  (p11:sp11 ph4:r):f1		; flipback(+x): -z -> +y
  d12 pl1:f1
  (p21 ph2):f3
  d13
  (p1 ph2):f1
  d4
  p30:gp6*diff                     	;gradient decoding
  d16
  (center (p2 ph2):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient decoding
  d16
  d4

; Watergate detection

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

  4u BLKGRAD
  go=2 ph31 cpd3:f3
  4u do:f3
  d11 wr #0 if #0 zd igrad diff
  lo to 3 times td1
  d11 rf #0
  lo to 4 times td0
exit

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

;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl16: f3 channel - power level for CPD/BB decoupling
;pl18: f1 channel - high power pulse, fine-tuning for watergate
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p21 : f3 channel -  90 degree high power pulse
;p22 : f3 channel - 180 degree high power pulse
;p11 : f1 channel - water flipdown/back [1-2 ms]
;p27: f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p0 : f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p30 : encode/decode gradient [small delta = 2*p30]
;p16 : watergate gradient
;p19 : spoiler gradient [500-1000 us]
;sp1 : f1 channel - power level for water flipdown
;sp11 : f1 channel - power level for water flipback
;spnam1 : sinc1.1000
;spnam11 : sinc1.1000
;d1 : relaxation delay; 1-5 * T1
;d16 : gradient recovery delay [200usec]
;d19 : delay for binomial water suppression
;     d19 = (1/(2*d)), d = distance of next null (in Hz)
;d20 : diffusion delay (big delta)
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;cnst4: = J(NH)
;NS: 4 * n
;DS: 8
;td0: dimension of accumulation loop (no. of acqusition blocks)
;td1: number of experiments

;gpz0: d1 crusher [73.73 %]
;gpz1: Watergate [-53 %]
;gpz2: 2HzNz crush [17 %]
;gpz3: Nz crush [13 %]
;gpz4: Eqm Nz crush [11 %]
;gpz6: Diffusion [100 %]
;gpz8: 180 pair [9 %]
;gpz9: 180 pair [15 %]

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

;Mar 2017: added CPD and baseopt
;
;Sep 2014: added option for alternative gradient ramp file
;
;May 2013: separate power levels for water flipback and flipdown pulses
;Adjusted delays for zero first-order phase correction
;
;With possibility for multiple acquistion blocks when NS > phase cycle
;  => set TD0 > 1 (total scans = TD0*NS)
;
;From MH_XSte
;Modified to use convention that d20 is equal to big delta
;Reduced time between gradient pulses in bipolar pairs (tau):
;    tau = d16 + p22
;
;H-1/X correlation via double refocused inept transfer
;ste during the transfer steps and storage of the magnetization on the X-nucleus during the diffusion delay
;watergate after the decoding gradients for use with z-only gradient probes
;1D version
;written by Fabien Ferrage, last modification November 22nd 2004
;
;Ferrage et al., JACS (2004) 126:5654

prosol relations=<triple_d>

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

# ifdef ALT_RAMP
define list<gradient> diff=<Difframp2>
# else
define list<gradient> diff=<Difframp>
# endif /*ALT_RAMP*/

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

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

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

1 ze
  d11
  d12 BLKGRAD
2 d11 do:f3
3 d11
4 d11

# ifdef CRUSHER

  50u UNBLKGRAD
  p19:gp0
  d16
  10u pl1:f1
  (p1 ph4):f1				; +x
  4u pl0:f1
  (p11:sp11 ph9:r):f1			; flipback(-x): -y -> +z
  4u
  p19:gp0*0.71
  d16
  4u BLKGRAD

# endif /*CRUSHER*/

# ifdef PRESAT
  d12 pl9:f1
  d1 cw:f1 ph29
  d13 do:f1
# else
  d1
# endif /*PRESAT*/

  d12 pl3:f3
  (p21 ph4):f3
  d15 UNBLKGRAD
  p19:gp4                     		;Eqm Nz spoiler
  d16 pl0:f1
  (p11:sp1 ph2:r):f1		; flipdown(-x): +z -> +y
  d12 pl1:f1
  (p1 ph4):f1
  d4
  p30:gp6*diff                		;gradient encoding
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient encoding
  d16
  d4
  (p1 ph1):f1
  d12 pl0:f1
  (p11:sp1 ph3:r):f1		; flipdown(-y): -x -> -z
  d15
  p19:gp2                     		;2HzNz spoiler
  d16
  (p21 ph4):f3
  d5
  p19:gp8                     		;spoiler (echo)
  d16 pl1:f1
  (center (p2 ph2):f1 (p22 ph4):f3)
  d5
  p19:gp8                     		;spoiler (echo)
  d16
  (p21 ph5):f3
  d15
  p19:gp3                     		;Nz spoiler
  d16 BLKGRAD
  DELTA1
  (p21 ph6):f3
  d5 UNBLKGRAD
  p19:gp9                     		;spoiler (echo)
  d16
  (center (p2 ph4):f1 (p22 ph4):f3)
  d6
  p19:gp9                     		;spoiler (echo)
  d16 pl0:f1
  (p11:sp11 ph4:r):f1		; flipback(+x): -z -> +y
  d12 pl1:f1
  (p21 ph2):f3
  d13
  (p1 ph2):f1
  d4
  p30:gp6*diff                     	;gradient decoding
  d16
  (center (p2 ph2):f1 (p22 ph4):f3)
  p30:gp6*-1*diff                     ;gradient decoding
  d16
  d4

; Watergate detection

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

  4u BLKGRAD
  go=2 ph31 cpd3:f3
  4u do:f3
  d11 wr #0 if #0 zd igrad diff
  lo to 3 times td1
  d11 rf #0
  lo to 4 times td0
exit

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

;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl9 : f1 channel - power level for presaturation
;pl16: f3 channel - power level for CPD/BB decoupling
;pl18: f1 channel - high power pulse, fine-tuning for watergate
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p21 : f3 channel -  90 degree high power pulse
;p22 : f3 channel - 180 degree high power pulse
;p11 : f1 channel - water flipdown/back [1-2 ms]
;p27: f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p0 : f1 channel -  90 degree high power pulse, fine-tuning for watergate
;p30 : encode/decode gradient [small delta = 2*p30]
;p16 : watergate gradient
;p19 : spoiler gradient [500-1000 us]
;sp1 : f1 channel - power level for water flipdown
;sp11 : f1 channel - power level for water flipback
;spnam1 : sinc1.1000
;spnam11 : sinc1.1000
;d1 : relaxation delay; 1-5 * T1
;d16 : gradient recovery delay [200usec]
;d19 : delay for binomial water suppression
;     d19 = (1/(2*d)), d = distance of next null (in Hz)
;d20 : diffusion delay (big delta)
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;cnst4: = J(NH)
;NS: 4 * n
;DS: 8
;td0: dimension of accumulation loop (no. of acqusition blocks)
;td1: number of experiments

;gpz0: d1 crusher [73.73 %]
;gpz1: Watergate [-53 %]
;gpz2: 2HzNz crush [17 %]
;gpz3: Nz crush [13 %]
;gpz4: Eqm Nz crush [11 %]
;gpz6: Diffusion [100 %]
;gpz8: 180 pair [9 %]
;gpz9: 180 pair [15 %]

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


Fixed sample

Fixed sample

-- Simple number guessing program

var number = rand(1,100);  -- Create new variable called number and write a random number between 1 and 100 into it
var found = 0;   -- Has the value been found
var guess_no = 1;   -- Guess number
while guess_no <= 3 && found == 0   -- For loop from 1 to 3
    var guess = input_number();   -- Sample function that prompts the user to input a number
    if guess == number
        found = 1;
        print("Found!");   -- Sample function to output a string
    elseif guess < number
        print("Too low!");
        guess_no = guess_no + 1;   -- Increment number
    elseif guess > number
        print("Too high!");
        guess_no = guess_no + 1;
    end   -- End of if
end   -- End of while

-- Simple number guessing program

var number = rand(1,100);  -- Create new variable called number and write a random number between 1 and 100 into it
var found = 0;   -- Has the value been found
var guess_no = 1;   -- Guess number
while guess_no <= 3 && found == 0 do   -- For loop from 1 to 3
    var guess = input_number();   -- Sample function that prompts the user to input a number
    if guess == number
        found = 1;
        print("Found!");   -- Sample function to output a string
    elseif guess < number
        print("Too low!");
        guess_no = guess_no + 1;   -- Increment number
    elseif guess > number
        print("Too high!");
        guess_no = guess_no + 1;
    end   -- End of if
end   -- End of while


set acqt0 for sfhmqcf2gpph.nuws.cw

set acqt0 for sfhmqcf2gpph.nuws.cw

;sfhmqcf2gpph.nuws.cw
;1H,13C SOFAST HMQC
;switch on NUWS with -DNUWS
;option for first-increment only with -DONE_D
;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>

#ifdef NUWS
define loopcounter dsFlag
; dsFlag starts as 1, will be set to zero after first set of dummy scans is completed
"dsFlag=1"
#endif /* NUWS */

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

"in0=inf1"

"d0=in0/2-p3*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 pl12:f2
2 d1 do:f2
3 d12 pl2:f2
  50u UNBLKGRAD

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

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

#ifdef ONE_D
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph3 0.1u p3 ph4 DELTA1):f2 )
#else
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph3 d0 p3 ph4 DELTA1):f2 )
#endif /* ONE_D */

  DELTA2
  p16:gp1
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

#ifdef NUWS
  if "dsFlag==0" goto 10
  zd
  "dsFlag=0"
  goto 2
10 4u

  ; repeat acquisition block according to schedule in vclist
  lo to 2 times c
  30u ivc
#endif /* NUWS */

  d1 do:f2 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

;pl2 : 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
;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-p3*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;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(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;aq: <= 50 msec
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

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

                                          ;preprocessor-flags-start
                                          ;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 $

;sfhmqcf2gpph.nuws.cw
;1H,13C SOFAST HMQC
;switch on NUWS with -DNUWS
;option for first-increment only with -DONE_D
;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>

#ifdef NUWS
define loopcounter dsFlag
; dsFlag starts as 1, will be set to zero after first set of dummy scans is completed
"dsFlag=1"
#endif /* NUWS */

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

"in0=inf1"

"d0=in0/2-p3*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 pl12:f2
2 d1 do:f2
3 d12 pl2:f2
  50u UNBLKGRAD

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

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

#ifdef ONE_D
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph3 0.1u p3 ph4 DELTA1):f2 )
#else
  (center (p40:sp24 ph2):f1 (DELTA1 p3 ph3 d0 p3 ph4 DELTA1):f2 )
#endif /* ONE_D */

  DELTA2
  p16:gp1
  d16 pl12:f2
  4u BLKGRAD
  go=2 ph31 cpd2:f2

#ifdef NUWS
  if "dsFlag==0" goto 10
  zd
  "dsFlag=0"
  goto 2
10 4u

  ; repeat acquisition block according to schedule in vclist
  lo to 2 times c
  30u ivc
#endif /* NUWS */

  d1 do:f2 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

;pl2 : 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
;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-p3*4/3.1415
;d1 : relaxation delay
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d21 : 1/(2J)NH
;cnst2: = J(CH) [125 Hz for methyls]
;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(C) = 2 * DW(C)
;in0: 1/ SW(C) = 2 * DW(C)
;nd0: 1
;NS: 4 * n
;DS: 16
;aq: <= 50 msec
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEC
;cpd2: decoupling according to sequence defined by cpdprg2: garp4
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

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

                                          ;preprocessor-flags-start
                                          ;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 $


fill in missing gradient pulse documentation

;methyl 1H T2 measurement
;L2 line (Tugarinov & Kay 2006)
;
;avance-version (07/04/04)
;HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;A. Bax, R.H. Griffey & B.L. Hawkins, J. Magn. Reson. 55, 301 (1983)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d3=1s/(cnst2*8)-p17-d16-larger(p1,p3)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf2/2"

#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-2*p1"
#   else
    "d0=in0/2-0.63662*p3-2*p1"
#   endif /*SINGLEDWELL*/

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

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

"acqt0=de"
baseopt_echo
aqseq 312

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

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

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

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

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

  ; start main sequence
  (p1 ph1):f1  ; INEPT
  DELTA1
  p16:gp2
  d16

  ; purge element
  (p3 ph11):f2
  d3
  p17:gp3
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  d3
  p17:gp3
  d16
  (p3 ph12):f2

  ; t1 evolution
  d0
  (p1 ph2):f1
  (p2 ph1):f1
  (p1 ph2):f1
  d0
  (p3 ph13):f2

  ; relaxation period
  4u
  p17:gp4
  d16
  TAU1
  (p4 ph1):f2
  TAU2
  (p2 ph1):f1
  4u
  p17:gp4
  d16
  TAU3
  (p4 ph1):f2
  TAU4

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

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

ph1= 0
ph2= 1
ph11= 0 2
ph12= 1 1 3 3
ph13= 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]
;p22 : f3 channel - 180 degree high power pulse
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d3 : 1/(8J)CH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

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

;methyl 1H T2 measurement
;L2 line (Tugarinov & Kay 2006)
;
;avance-version (07/04/04)
;HMQC
;2D H-1/X correlation via heteronuclear zero and double quantum
;   coherence
;phase sensitive
;with decoupling during acquisition
;
;A. Bax, R.H. Griffey & B.L. Hawkins, J. Magn. Reson. 55, 301 (1983)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2"
"d2=1s/(cnst2*2)"
"d3=1s/(cnst2*8)-p17-d16-larger(p1,p3)"
"d11=30m"
"d12=20u"
"d13=4u"

"in0=inf2/2"

#   ifdef SINGLEDWELL
    "d0=in0-0.63662*p3-2*p1"
#   else
    "d0=in0/2-0.63662*p3-2*p1"
#   endif /*SINGLEDWELL*/

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

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

"acqt0=de"
baseopt_echo
aqseq 312

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

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

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

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

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

  ; start main sequence
  (p1 ph1):f1  ; INEPT
  DELTA1
  p16:gp2
  d16

  ; purge element
  (p3 ph11):f2
  d3
  p17:gp3
  d16
  (center (p2 ph1):f1 (p4 ph1):f2 )
  d3
  p17:gp3
  d16
  (p3 ph12):f2

  ; t1 evolution
  d0
  (p1 ph2):f1
  (p2 ph1):f1
  (p1 ph2):f1
  d0
  (p3 ph13):f2

  ; relaxation period
  4u
  p17:gp4
  d16
  TAU1
  (p4 ph1):f2
  TAU2
  (p2 ph1):f1
  4u
  p17:gp4
  d16
  TAU3
  (p4 ph1):f2
  TAU4

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

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

ph1= 0
ph2= 1
ph11= 0 2
ph12= 1 1 3 3
ph13= 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]
;p22 : f3 channel - 180 degree high power pulse
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d2 : 1/(2J)CH
;d3 : 1/(8J)CH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d13: short delay                                    [4 usec]
;d16: delay for homospoil/gradient recovery
;cnst2: = J(CH)
;cnst21: frequency in Hz for off-res presat
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 4 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence

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

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

                                          ;preprocessor-flags-start
;SINGLEDWELL: for initial sampling delay of one dwell-time with
;	    option -DSINGLEDWELL (eda: ZGOPTNS)
;OFFRES_PRESAT: for off-resonance presaturation, set cnst21=o1(water)
;	    option -DOFFRES_PRESAT (eda: ZGOPTNS)
                                          ;preprocessor-flags-end

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


Update page.cw

Update page.cw

objects and parameters are updated

### this is a comment
### keywords:
# textbox
# button
# radio
# checkbox

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

### sample codes:
textbox --name=username --id=username --class=regForm inputSize=128 --text=Username
textbox --name=password --id=password --class=regForm inputSize=128 --text=Password

### this is a comment
### keywords:
# textbox
# button
# radio
# checkbox
# dropdown
# alert
# list
# navbar
# well
# panel

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


13C purge added

13C purge added

;hsqcctetgpsisp2.cw
;avance-version (05/10/28)
;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
;constant time version
;using trim pulses in inept transfer
;using shaped pulses for inversion on f2 - channel
;
;(G.W. Vuister & A. Bax, J. Magn. Reson. 98, 428-435 (1992))
;(A.G. Palmer III, J. Cavanagh, P.E. Wright & M. Rance, J. Magn.
;   Reson. 93, 151-170 (1991))
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

;$OWNER=nmrsu
prosol relations=<triple>

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

;list of CEST saturation frequencies
;give values in Hz relative to sfo1
define list<frequency> H1sat = <$FQ1LIST>

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

"in0=inf2/2"

"in20=in0"

"d20=d23-p16-d16-p14*1.5-4u-d12"
"d31=d20"
"l31=2*d31/in20"

"DELTA1=p16+d16+8u"
"DELTA2=d4-larger(p2,p8)/2-4u-p16-d16"
"DELTA3=d23-d0-p14/2-larger(p14,p22)-4u"
"DELTA4=d24-p19-d16"
"DELTA5=d4-larger(p2,p8)/2-4u-p16-d16"

"acqt0=0"

"spoff3=0"
"spoff5=bf2*(cnst21/1000000)-o2"
"spoff13=0"

aqseq 312

1 ze
  d11 pl12:f2 pl26:f3
2 d1 do:f2 do:f3

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

  ; CEST period
  4u pl8:f1
  4u H1sat:f1
  4u LOCKH_ON
  d18 cw:f1 ph1
  4u do:f1
  4u LOCKH_OFF
  4u pl1:f1 pl2:f2 pl3:f3
  4u fq=0:f1

#ifdef INEPT
  ; first INEPT
  (p1 ph1)
  p16:gp5
  d16
  DELTA2 pl0:f2
  4u
  (center (p2 ph1) (p8:sp13 ph6):f2 )
  4u
  DELTA2 pl2:f2 ;UNBLKGRAD
  p16:gp5
  d16
  (p1 ph2)
#endif

; zz
  4u
  p16:gp6
  d16

  (p3 ph3):f2
  d0
  (center (p2 ph7) (p14:sp5 ph1):f2 (p22 ph1):f3 )  ; CO
  4u
  DELTA3 pl0:f2
  (p14:sp3 ph4):f2  ; Cali
  d20
  p16:gp1*EA*-1
  d16 pl0:f2
  (p14:sp5 ph1):f2   ; CO
  4u
  d12 pl2:f2

  (ralign (p1 ph1) (p3 ph4):f2 )
  p19:gp3
  d16
  DELTA4
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA4
  p19:gp3
  d16
  (center (p1 ph2) (p3 ph5):f2 )
  p16:gp4
  d16
  DELTA4 pl0:f2
  (center (p2 ph1) (p8:sp13 ph1):f2 )
  DELTA4
  p16:gp4
  d16
  (p1 ph1)  ; final echo for gradient selection
  DELTA1
  (p2 ph1)
  4u
  p16:gp2
  d16 pl12:f2 pl26:f3
  4u BLKGRAD

  go=2 ph31 cpd2:f2 cpd3:f3
  d1 do:f2 do:f3 mc #0 to 2
     F1QF(H1sat.inc)
     F2EA(igrad EA & ip5*2, id0 & dd20 & ip3*2 & ip6*2 & ip31*2)
d31
exit

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

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;pl26: f3 channel - power level for CPD/BB decoupling
;sp3 : f2 channel - shaped pulse 180 degree (on resonance)
;sp5 : f2 channel - shaped pulse 180 degree (off resonance)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: 2nd homospoil/gradient pulse
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d20 : = d23
;d23: d23 = T : 13.3 or 26.6 msec
;     2T (constant time period) = n/J(CC)
;d24: 1/(8J)XH for all multiplicities
;     1/(4J)XH for XH
;cnst2: = J(XH)
;cnst21: CO chemical shift (offset, in ppm)
;in0: 1/(2 * SW(X)) = DW(X)
;in20: 1/(2 * SW(X)) = DW(X) = in0
;nd0: 2
;NS: 4 * n
;DS: 32
;td1: number of experiments
;FnMODE: echo-antiecho
;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
;                         80 : 20.1 : 11  : -5   for C-13
;                         80 :  8.1 : 11  : -5   for N-15

;for z-only gradients:
;gpz1: 80%
;gpz2: 20.1% for C-13, 8.1% for N-15
;gpz3: 11%
;gpz4: -5%

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

;$Id: hsqcctetgpsisp,v 1.4 2005/11/10 12:16:59 ber Exp $

;hsqcctetgpsisp2.cw
;avance-version (05/10/28)
;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
;constant time version
;using trim pulses in inept transfer
;using shaped pulses for inversion on f2 - channel
;
;(G.W. Vuister & A. Bax, J. Magn. Reson. 98, 428-435 (1992))
;(A.G. Palmer III, J. Cavanagh, P.E. Wright & M. Rance, J. Magn.
;   Reson. 93, 151-170 (1991))
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

;$OWNER=nmrsu
prosol relations=<triple>

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

;list of CEST saturation frequencies
;give values in Hz relative to sfo1
define list<frequency> H1sat = <$FQ1LIST>

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

"in0=inf2/2"

"in20=in0"

"d20=d23-p16-d16-p14*1.5-4u-d12"
"d31=d20"
"l31=2*d31/in20"

"DELTA1=p16+d16+8u"
"DELTA2=d4-larger(p2,p8)/2-4u-p16-d16"
"DELTA3=d23-d0-p14/2-larger(p14,p22)-4u"
"DELTA4=d24-p19-d16"
"DELTA5=d4-larger(p2,p8)/2-4u-p16-d16"

"acqt0=0"

"spoff3=0"
"spoff5=bf2*(cnst21/1000000)-o2"
"spoff13=0"

aqseq 312

1 ze
  d11 pl12:f2
2 d1 do:f2

  ; CEST period
  4u pl8:f1
  4u H1sat:f1
  4u LOCKH_ON
  d18 cw:f1 ph1
  4u do:f1
  4u LOCKH_OFF
  4u pl1:f1 pl2:f2
  4u fq=0:f1

#ifdef INEPT
  ; first INEPT
  (p1 ph1)
  p16:gp5
  d16
  DELTA2 pl0:f2
  4u
  (center (p2 ph1) (p8:sp13 ph6):f2 )
  4u
  DELTA2 pl2:f2 UNBLKGRAD
  p16:gp5
  d16
  (p1 ph2)
#endif

; zz
  4u
  p16:gp6
  d16

  (p3 ph3):f2
  d0
  (center (p2 ph7) (p14:sp5 ph1):f2 (p22 ph1):f3 )  ; CO
  4u
  DELTA3 pl0:f2
  (p14:sp3 ph4):f2  ; Cali
  d20
  p16:gp1*EA*-1
  d16 pl0:f2
  (p14:sp5 ph1):f2   ; CO
  4u
  d12 pl2:f2

  (ralign (p1 ph1) (p3 ph4):f2 )
  p19:gp3
  d16
  DELTA4
  (center (p2 ph1) (p4 ph1):f2 )
  DELTA4
  p19:gp3
  d16
  (center (p1 ph2) (p3 ph5):f2 )
  p16:gp4
  d16
  DELTA4 pl0:f2
  (center (p2 ph1) (p8:sp13 ph1):f2 )
  DELTA4
  p16:gp4
  d16
  (p1 ph1)  ; final echo for gradient selection
  DELTA1
  (p2 ph1)
  4u
  p16:gp2
  d16 pl12:f2
  4u BLKGRAD

  go=2 ph31 cpd2:f2
  d1 do:f2 mc #0 to 2
     F1QF(H1sat.inc)
     F2EA(igrad EA & ip5*2, id0 & dd20 & ip3*2 & ip6*2 & ip31*2)
d31
exit

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

;pl0 : 120dB
;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;sp3 : f2 channel - shaped pulse 180 degree (on resonance)
;sp5 : f2 channel - shaped pulse 180 degree (off resonance)
;sp13: f2 channel - shaped pulse 180 degree (adiabatic)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel - 180 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p14: f2 channel - 180 degree shaped pulse
;p16: homospoil/gradient pulse
;p19: 2nd homospoil/gradient pulse
;p22: f3 channel - 180 degree high power pulse
;p28: f1 channel - trim pulse                        [1 msec]
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d4 : 1/(4J)XH
;d11: delay for disk I/O                             [30 msec]
;d12: delay for power switching                      [20 usec]
;d16: delay for homospoil/gradient recovery
;d20 : = d23
;d23: d23 = T : 13.3 or 26.6 msec
;     2T (constant time period) = n/J(CC)
;d24: 1/(8J)XH for all multiplicities
;     1/(4J)XH for XH
;cnst2: = J(XH)
;cnst21: CO chemical shift (offset, in ppm)
;in0: 1/(2 * SW(X)) = DW(X)
;in20: 1/(2 * SW(X)) = DW(X) = in0
;nd0: 2
;NS: 4 * n
;DS: 32
;td1: number of experiments
;FnMODE: echo-antiecho
;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
;                         80 : 20.1 : 11  : -5   for C-13
;                         80 :  8.1 : 11  : -5   for N-15

;for z-only gradients:
;gpz1: 80%
;gpz2: 20.1% for C-13, 8.1% for N-15
;gpz3: 11%
;gpz4: -5%

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

;$Id: hsqcctetgpsisp,v 1.4 2005/11/10 12:16:59 ber Exp $


coding up b_hncocacbgp3d.2.nuws.cw

coding up b_hncocacbgp3d.2.nuws.cw

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

prosol relations=<triple>

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

define loopcounter dsFlag
"dsFlag=1"

"d11=30m"

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

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

"p29=250u"

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

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

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

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

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

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

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

"TAU=larger(p14,p44)"

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

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

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

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

aqseq 312

"acqt0=0"
baseopt_echo

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

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

  p16:gp4
  d16 pl3:f3

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

  p16:gp5
  d16

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

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

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

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

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

  p16:gp6
  d16 pl3:f3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

prosol relations=<triple>

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

"d11=30m"

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

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

"p29=250u"

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

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

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

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

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

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

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

"TAU=larger(p14,p44)"

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

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

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

aqseq 321

"acqt0=0"
baseopt_echo

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

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

  p16:gp4
  d16 pl3:f3

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

  p16:gp5
  d16

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

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

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

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

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

  p16:gp6
  d16 pl3:f3

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

  (p43:sp29 ph2)
  p29:gp8
  d16
  DELTA4
  (center (p42:sp26 ph1) (p56:sp39 ph1):f3 )
  DELTA4
  p29:gp8
  d16
  (p43:sp28 ph1)
  DELTA5
  (p42:sp26 ph1)
  4u
  p16:gp2
  d16 pl26:f3
  4u BLKGRAD
  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2
     F1PH(calph(ph9, -90) & calph(ph10, -90), caldel(d0, +in0) & calph(ph9, +180))
     F2EA(calgrad(EA) & calph(ph6, +180), caldel(d10, +in10) & caldel(d29, +in29) & caldel(d30, -in30) & calph(ph8, +180) & calph(ph31, +180))
  TAU
exit

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

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

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

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

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

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


fixing power levels

fixing power levels

;zg with two selective flipdowns for solvent suppression
;avance-version (12/01/11)
;1D sequence
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=
;$RECOMMEND=y

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

"acqt0=-p1*2/3.1416"

1 ze
2 30m
  4u BLKGRAD
  d1
  20u UNBLKGRAD

(p11:sp11):f1
4u
p16:gp1
d16

(p12:sp12):f1
4u
p16:gp2
d16
4u BLKGRAD
4u pl1:f1

  p1 ph1
  go=2 ph31
  30m mc #0 to 2 F0(zd)
exit

ph1=0 2 2 0 1 3 3 1
ph31=0 2 2 0 1 3 3 1

;pl1 : f1 channel - power level for pulse (default)
;p1 : f1 channel -  90 degree high power pulse
;d1 : relaxation delay; 1-5 * T1
;ns: 1 * n, total number of scans: NS * TD0

;$Id: zg30,v 1.12 2012/01/31 17:49:31 ber Exp $

;zg with two selective flipdowns for solvent suppression
;avance-version (12/01/11)
;1D sequence
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=
;$RECOMMEND=y

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

"acqt0=-p1*2/3.1416"

1 ze
2 30m
  4u BLKGRAD
  d1
  20u UNBLKGRAD

(p11:sp11):f1
4u
p16:gp1
d16

(p12:sp12):f1
4u
p16:gp2
d16
4u BLKGRAD

  p1 ph1
  go=2 ph31
  30m mc #0 to 2 F0(zd)
exit

ph1=0 2 2 0 1 3 3 1
ph31=0 2 2 0 1 3 3 1

;pl1 : f1 channel - power level for pulse (default)
;p1 : f1 channel -  90 degree high power pulse
;d1 : relaxation delay; 1-5 * T1
;ns: 1 * n, total number of scans: NS * TD0

;$Id: zg30,v 1.12 2012/01/31 17:49:31 ber Exp $