;NOAH-2 (MB): HMQC and HMBC
;Topspin 3 version 2017/09/09
;WaveMaker supported version
;
;Ref: E. Kupce and T. Claridge, Angew.Chem.Int.Ed.Eng. 2017, v.56, pp. 11779-11783.
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"p4=p3*2" 
"d3=0.25s/cnst2"
"d2=d3*2.0"
"d4=0.5s/cnst13"
"d11=5m"
"d13=3u"
"d0=3u"
"in0=inf1/2"
"l0=td1/4"

"DELTA=p16+d16+(p2/2)+4u+d0-p3*2/3.14159"  
"DELTA1=d3-p14/2"
"DELTA2=d3+p14/2"
"DELTA12=DELTA2-p16-p3-de-p2/3.14-8u"  

"acqt0=0"
baseopt_echo

1 ze
  d11 pl12:f2
2 30m 
3 3m do:f2 
4 d13 UNBLKGRAD
  4u pl1:f1
  p16:gp0
  (p1 ph1)
  p16:gp0*1.37
  50u BLKGRAD
  d1 st0

  (p1 ph1)
  DELTA1 pl60:f2
  (p14:sp3 ph6):f2 
  (p2 ph1):f1 
  DELTA2 pl2:f2 UNBLKGRAD
  (p1 ph1):f1 
  (p3 ph5):f2
  DELTA  pl60:f2
  (p14:sp3 ph6):f2 
  4u
  p16:gp1*EA
  d16
  d0 
  (p2 ph4) 
  d0
  4u
  p16:gp1*EA
  d16
  (p14:sp3 ph6):f2 
  DELTA pl2:f2
  (p3 ph3):f2
  DELTA1 pl60:f2
  (p14:sp3 ph6):f2 
  (p2 ph1):f1 
  p16:gp2
  DELTA12 pl2:f2
  4u BLKGRAD  ;    
  (p3 ph1):f2
  4u pl12:f2
  goscnp ph31 cpd2:f2      ; HMQC
  4u do:f2
  4u pl2:f2  
  50u UNBLKGRAD
  p16:gp0*0.77
  2m st           ; arbitrary delay
  (p1 ph1) 
  d2              ; J-filter 
  (p3 ph6):f2 
  d4              
  (p3 ph5):f2
  DELTA  pl60:f2
  (p14:sp3 ph6):f2 
  4u
  p16:gp1*EA
  d16
  d0 
  (p2 ph4)
  d0
  4u
  p16:gp1*EA
  d16
  (p14:sp3 ph6):f2 
  DELTA pl2:f2
  (p3 ph3):f2
  4u
  p16:gp2
  d16

  go=2 ph31     ; HMBC
  30m wr #0 if #0 zd igrad EA

  lo to 3 times 2 
 
  1m id0
  1m ip3*2 
  1m ip31*2

  lo to 4 times l0  

exit

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

;pl0 : 0W
;pl60: 0W
;pl1 : f1 channel - power level for pulse (default)
;pl2 : f2 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;sp3: f2 channel - shaped pulse 180 degree
;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
;p14: f2 channel - 180 degree shaped pulse for inversion
;p16: homospoil/gradient pulse
;d0 : incremented delay (2D)                         [3 usec]
;d1 : relaxation delay; [e.g. 60ms]
;d11: delay for disk I/O                             [5 msec]
;d16: delay for homospoil/gradient recovery
;cnst2: = 1J(XH)
;cnst13: = nJ(XH)
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;nbl: 2
;ns: 1 * n
;ds: >= 16
;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 'wvm -a' command to create these shapes ~~~~~~
;sp3:wvm:wu180C13: cawurst-20(300 ppm, 0.5 ms)
;cpd2:wvm:wudec: cawurst_d-20(220 ppm, 1.4 ms)

;use gradient ratio:	gp 1 : gp 2
;			  80 : 40.2    for C-13
;			  80 : 16.2    for N-15

;for z-only gradients:
;gpz0: 17.13%
;gpz1: 80%
;gpz2: 40.2% for C-13, 16.2% for N-15

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