;ht_noesygpph
;avance-version (17/08/18)
;Hadamard NOESY
;homonuclear correlation via dipolar coupling 
;based on noesgpph
;dipolar coupling may be due to noe or chemical exchange.
;phase sensitive
;with gradient pulses in mixing time
;
;E. Kupce & R. Freeman, J. Magn. Reson. 162, 300-310 (2003)
;J. Jeener, B.H. Meier, P. Bachmann & R.R. Ernst, J. Chem. Phys. 71,
;     4546-4553 (1979)
;R. Wagner & S. Berger, J. Magn. Reson. 123 A, 119-121 (1996)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=
;
;Experiment Setup:
;(1) use had_pl au-program to get the peak list
;(2) execute the 'wvm -a' command
;(3) start the experiment
;(4) use proc_had au-program for processing


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


;define list<shape> SPL=<$VALIST>
define list<frequency> f1_list=<$FQ1LIST>
define list<frequency> f1_zero={sfo hz, 0.0}
define list<frequency> f3_list=<$FQ3LIST>
define list<frequency> f3_zero={sfo hz, 0.0}
define list<loopcounter> Loops=<$VCLIST>

define pulse pCP

"p2=p1*2"
"cnst23=cnst23"
"TAU=p1*2/3.1416-(p1-p1)*0.231-de+46u"
;"TAU=39u"

"l3=0"

"acqt0=-p1*2/PI"


1 ze
2 d1 do:f3 BLKGRAD
1m iu3
50u UNBLKGRAD
3  
	;4u pl10:f1 pl11:f3

	;4u vanam:f1	vanam.inc
	;4u vanam:f3 
	if "Loops > 10"
	{
	4u pl8:f1 pl9:f3
	"DELTA=d8"
	"pCP=p7"
	}
	else
	{
	4u pl10:f1 pl11:f3
	"DELTA=d9"
	"pCP=p8"
	}

4 4u
  if "l3%2 > 0" 
  {
	10u f1_list:f1 
	10u f3_list:f3
  ;20u fq=cnst18(bf ppm):f1 fq=cnst20(bf ppm):f3
	(pCP ph23):f1 (pCP ph24):f3
  }
  else
  {
	10u f1_list:f1 
	10u fq=cnst21(bf ppm):f3
  ;20u fq=cnst18(bf ppm):f1 fq=cnst21(bf ppm):f3
	(pCP ph23):f1 (pCP ph24):f3
  }
	p16:gp1
  DELTA
  lo to 4 times Loops



	10u f1_zero:f1
	10u f3_zero:f3
  (p29:sp11 ph5):f1
  2u
  4u pl1:f1
  (p1 ph6)
  50u
  p16:gp3
  d16 
  (p1*0.231 ph3)
  d19*2
  (p1*0.692 ph3)
  d19*2
  (p1*1.462 ph3)
  d19*2
  (p1*1.462 ph4)
  d19*2
  (p1*0.692 ph4)
  d19*2
  (p1*0.231 ph4)
  TAU
  p16:gp3
  d16 pl13:f3
	4u BLKGRAD
  go=2 ph31 cpds3:f3
  1m ru3
	1m Loops.inc
	;1m delist.inc
	;vanam.inc
  d1 do:f3 mc #0 to 2 F1QF(f1_list.inc, f3_list.inc)
exit


ph2=0

ph3=0 0 
ph4=2 2 
ph5=0 0 
ph6=2 2 
ph23=0
ph24=0
ph31=0 2


;pl1 : f1 channel - power level for pulse (default)
;pl8: f1 channel - power level for stronger CP
;pl9: f3 channel - power level for stronger CP
;pl10: f1 channel - power level for weaker CP
;pl11: f3 channel - power level for weaker CP
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p7 : stronger CP contact time
;p8 : weaker CP contact time
;p16: homospoil/gradient pulse                       [1 msec]
;p34: f1 channel - 180 degree shaped pulse for Hadamard experiment
;d1 : relaxation delay; 1-5 * T1
;d8 : stronger CP, NOE mixing time per loop
;d9 : weaker CP, NOE mixing time per loop
;d16: delay for homospoil/gradient recovery
;cnst22: BW of for Hadamard inversion encoding pulses
;cnst40: Correction for shaped pulse evolution e.g. 0.529 for PC9; 0.35 for sinc1
;cnst54: H(N) chemical shift (offset, in ppm)  e.g. 8.5 ppm (current default for protein use)
;cnst55: H(N) bandwidth (in ppm)               e.g. 4.5 ppm (current default for protein use)
;ns: 1 * n
;ds: 4
;td1: size of Hadamard matrix, power of 2 (> # of peaks);
;FnMODE: QF


;for z-only gradients (optional):
;gpz1: 40%

;use gradient files (optional):   
;gpnam1: SMSQ10.100

; ~~~~~~~~~~~~~~~~ WaveMaker Shapes ~~~~~~~~~~~~~~~~~
;sp15(pl13, p62):wvm:wudecN:f3 cawurst-20(100 ppm, 1.3 ms; Q=3)




;$Id: ht_noesygpph,v 1.2 2017/11/23 10:49:08 ber Exp $
