;gradhmbc; jshmbcgrad
;HMBC with gradient selection of echo and antiecho in 
;t1 for suppression of t1-noise. 
;cf. R.E. Hurd & B.K. John JMR 91 (1991), 648
;pure phases in f1 (cf. Davis et al. JMR 98 (1992), 207; Tolman 
;et al., ibid. 462; Boyd et al. ibid., 664
;J. Schleucher 1994
;BMRB Pulse Sequence Accession Number: 5

#include <Dmx.incl>

d12=p16+d16+6u+p2
d22=d2-p16-d16

1 ze 
2 d1 do:f2
3 3m
4 4u
  20u pl1:f1
  p1 ph1
  d8
  (p3 ph5):f2	; optional purging of 1J correlations 
  d22 pl2:f2		;d2=1/(2Jlong-range)
  GRADIENT(cnst21)
  d16
  (p3 ph3):f2
  d0
  p2 ph1
  d0
  GRADIENT(cnst21)
  d16
  (p4 ph1):f2
  d12
  (p3 ph4):f2
  ;3u			
  ;d2 pl12:f2		;optional refocussing 
  go=2 ph31 ;cpd2:f2 	;and decoupling
  d1 do:f2 wr #0 if #0 zd
  lo to 3 times 2
  3m id0
  lo to 4 times l1
exit 
  
  
ph1= 0 0 0 0 0 0 0 0 ;2 2 2 2 2 2 2 2  1 1 1 1 1 1 1 1  3 3 3 3 3 3 3 3
ph3= 0 2 0 2 0 2 0 2 ;2 0 2 0 2 0 2 0  1 3 1 3 1 3 1 3  3 1 3 1 3 1 3 1
ph4= 0 0 2 2 0 0 2 2 ;2 2 0 0 2 2 0 0  1 1 3 3 1 1 3 3  3 3 3 3 1 1 1 1
ph5= 0 0 0 0 2 2 2 2
ph31=0 2 2 0 0 2 2 0 ;2 0 0 2 2 0 0 2  1 3 3 1 1 3 3 1  3 1 1 3 3 1 1 3

;pl1:    high power level for protons
;p1, p2  90, 180 degree pulse on protons
;pl11:   high power level on X-nucleus
;p3,p4   90, 190 degree pulse pn X-nucleus
;pl12:   decoupling powr level for X-nucleus in refocussed experiment
;cpdprg2 and p31: parameters for cpd on X-nucleus
;d1	relaxation delay, 1 T1 of slowest-relaxing proton
;d8	0.5 * direct HX coupling to purge 1J correlations
;NS= 2, 4 or 8n
;DS=2*NS!, otherwise, echo and antiecho will be intermingled
;p16=500u - 1ms, d16=300u
;ND0=2, pp yields data equivalent to States method
;in0: increment of t1, SW(f1)=1/(2 in0)

;Comments:

;pp collects echo and antiecho in two transients, (lo to 3 times 2), it is
;therefore sqrt(2) less sensitive than a HMBC without gradients, However,
;spectra obtained with this pp are free of t1-noise, which normally more than
;compensates for the sqrt(2) loss in S/N. 
;Use "gradenh" to convert to States Format (F1 axis may be reversed) or process 
;with uxnmr using mc2(F1)=echo/antiecho. Use gradient program 2sineea (2 loops
;(times NS) containing gradients with strength cnst21, cnst22 and cnst23, 
;cnst24). Gradient strengths are (gH, gx gyromagnetic ratios/resonance 
;frequencies of H/the X nucleus):
; cnst21=gx+gH	cnst22=gH
; cnst23=gH-gx	cnst24=gH 
;example for carbon: cnst21=25 (gC=1 + gH=4), cnst22=20, cnst23=15, cnst24=20
;If strong gradients are needed (water suppression), the gradient ratios should
;be empirically optimized for best S/N.