# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
;cest_etf3gpsitc_b1calib.dm
;avance-version (15/09/22)
;pseudo2D H-1/X correlation via double inept transfer
;for calibrating N-15 weak B1 in CEST experiments
;phase sensitive
;with decoupling during acquisition
;using f3 - channel
;using flip-back pulse
;as pseudo3D
;first experiment is used as reference
;(use parameterset )
;
;P. Vallurupalli, G. Bouvignies & L.E. Kay, 
;   J. Am. Chem. Soc. 134, 8148-8161 (2012)
;
;$CLASS=HighRes
;$DIM=3D
;$TYPE=
;$SUBTYPE=
;$COMMENT=


prosol relations=<triple>
# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Avance.incl" 1
;Avance3.incl
;   for AV III
;
;avance-version (13/06/17)
;
;$CLASS=HighRes Incl
;$COMMENT=


# 169 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Avance.incl"
;$Id: Avance3.incl,v 1.9.8.3 2013/08/30 09:44:49 ber Exp $
# 26 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm" 2

# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Grad.incl" 1
;Grad2.incl  -  include file for Gradient Spectroscopy
;   for TCU3
;
;avance-version (07/01/17)
;
;$CLASS=HighRes Incl
;$COMMENT=

# 27 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Grad.incl"
define list<gradient> EA=<EA>


# 31 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Grad.incl"
;$Id: Grad2.incl,v 1.13.8.1 2012/01/31 17:56:17 ber Exp $
# 27 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm" 2

# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl" 1
;Delay.incl  -  include file for commonly used delays
;
;version (13/08/07)
;
;$CLASS=HighRes Incl
;$COMMENT=

# 9 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl"
;general delays

define delay DELTA
define delay DELTA1
define delay DELTA2
define delay DELTA3
define delay DELTA4
define delay DELTA5
define delay DELTA6
define delay DELTA7
define delay DELTA8
define delay DELTA9
define delay DELTA10
define delay DELTA11
define delay DELTA12
define delay DELTA13
define delay DELTA14
define delay DELTA15
define delay DELTA16

define delay TAU
define delay TAU1
define delay TAU2
define delay TAU3
define delay TAU4
define delay TAU5
define delay TAU6
define delay TAU7
define delay TAU8
define delay TAU9
# 40 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl"
define delay INCR1
define delay INCR2
define delay INCR3
define delay INCR4
define delay INCR5
define delay INCR6


;delays for centering pulses
# 50 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl"
define delay CEN_HN1
define delay CEN_HN2
define delay CEN_HN3
define delay CEN_HC1
define delay CEN_HC2
define delay CEN_HC3
define delay CEN_HC4
define delay CEN_HP1
define delay CEN_HP2
define delay CEN_CN1
define delay CEN_CN2
define delay CEN_CN3
define delay CEN_CN4
define delay CEN_CP1
define delay CEN_CP2


;loop counters
# 69 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl"
define loopcounter COUNTER
define loopcounter SCALEF
define loopcounter FACTOR1
define loopcounter FACTOR2
define loopcounter FACTOR3
define loopcounter FACTOR4
define loopcounter FACTOR5
define loopcounter FACTOR6


# 80 "/opt/topspin3.2/exp/stan/nmr/lists/pp/Delay.incl"
;$Id: Delay.incl,v 1.13.8.2 2013/08/30 09:44:49 ber Exp $
# 28 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm" 2


# 31 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
"p2=p1*2"
"p22=p21*2"
"d11=30m"
"d24=1s/(cnst4*cnst11)"
"d25=1s/(cnst4*cnst12)"
"d26=1s/(cnst4*4)"


"d0=1s/(4*cnst9)"
"in0=inf1"
"d31=d0+(in0*(td1/2-1))"
# 44 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
"l11=0"

"DELTA2=p16+d16-p1*2/3.1416+de+8u"
"DELTA3=d25-p16-d16-4u"
"DELTA6=d24-p19-d16"
"DELTA7=d26-p16-d16"
"DELTA8=d25-larger(p2,p22)/2"
"DELTA9=p21"

"plw33= plw3*pow(cnst9*4*p21*0.000001,2)"	
# 55 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
"spoff1=0"
"spoff13=bf2*((cnst21+cnst22)/2000000)-o2"
"spoff30=0"


"acqt0=0"
baseopt_echo
# 1 "mc_line 64 file /opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm exp. def. part of mc cmd. before ze"
define delay MCWRK
define delay MCREST
define delay d0orig
"d0orig=d0"
"MCREST = d11 - 0.500000*d11"
"MCWRK = 0.500000*d11"

    dccorr
# 64 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
# 64 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
1 ze
# 1 "mc_line 64 file /opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm exp. def. of mc cmd. after ze"
# 65 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  d11 pl16:f3
# 1 "mc_line 66 file /opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm exp. start label for mc cmd."
2 MCWRK do:f3
  MCREST
# 67 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  
  20u
  "TAU=d31-d0"

  20u
  if "TAU > 0"
     {
     20u pl19:f1
     4u cpds8:f1
     TAU
     4u do:f1
     }

  d1 pl1:f1 pl3:f3
  50u setnmr3|0 setnmr0|34|32|33 ctrlgrad 0
  (p21 ph1):f3
  p16:gp7
  d16
# 86 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  (p1 ph1)
  d26
  (center (p2 ph1) (p22 ph1):f3 )
  d26
  (p1 ph2)

  p16:gp1
  d16

  (p21 ph3):f3
  DELTA8 
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA8
  (ralign (p1 ph1) (p21 ph2):f3 )
# 101 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  p16:gp8
  d16

  2u fq=cnst19(bf ppm):f1
  2u pl19:f1 pl33:f3

  d0 cpds8:f1 cw:f3 ph11
# 109 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  2u do:f3
  2u pl3:f3
  if "ph1loop % 2 == 0"
      {
      (p21 ph10):f3
      } 
  else 
      {
      DELTA9
      }
  2u do:f1

  p16:gp4
  d16 pl1:f1

  2u fq=cnst18(bf ppm):f1
# 126 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
  (p21 ph8):f3
  4u
  p16:gp2*-1*EA
  d16
  DELTA3
  (center (p44:sp30 ph9) (p22 ph6):f3)
  4u
  p16:gp2*EA
  d16
  DELTA3 pl1:f1

  (center (p1 ph1) (p21 ph4):f3 )
  p19:gp5
  d16
  DELTA6
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA6
  p19:gp5
  d16
  (center (p1 ph2) (p21 ph5):f3 )
  p16:gp6
  d16
  DELTA7
  (center (p2 ph1) (p22 ph1):f3 )
  DELTA7
  p16:gp6
  d16
  (p1 ph1)
  DELTA2
  (p2 ph1)
  4u
  p16:gp3
  d16 pl16:f3
  4u  setnmr3^0 setnmr0^34^32^33 ctrlgrad 7
  go=2 ph31 cpd3:f3

# 1 "mc_line 162 file /opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm exp. mc cmd. in line"
  MCWRK  do:f3 wr #0
  MCWRK
# 164 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
exit
   
# 167 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
ph1=0 
ph2=1
ph3=0 0 0 0 2 2 2 2 
ph4=0 0 2 2
ph5=3 3 1 1
ph6=0
ph7=3
ph8=1
ph9=0 0 2 2
ph10=2
ph11=0 2 
ph31=0 2 2 0 2 0 0 2
  

;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;pl16: f3 channel - power level for CPD/BB decoupling
;pl19: f1 channel - power level for CPD/BB decoupling
;pl33: f3 channel - power level for CW irradiation
;sp13: f2 channel - shaped pulse 180 degree  (Ca and C=O, adiabatic)
;sp30: f1 channel - shaped pulse 180 degree (Bip720,50,20.1)
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p8 : f2 channel - 180 degree shaped pulse for inversion (adiabatic)
;p16: homospoil/gradient pulse
;p19: gradient pulse 2                               [500 usec]
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;p44: f1 channel - 180 degree shaped pulse
;d1 : relaxation delay; 1-5 * T1
;d10: incremented delay                              [3 usec]
;d11: delay for disk I/O                             [30 msec]
;d16: delay for homospoil/gradient recovery
;d24: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d25: 1/(4J)YH for YH
;     1/(8J)YH for all multiplicities
;d26: 1/(4J(YH))
;d31: T_max (in0*(td1-1))
;cnst4: = J(YH)
;cnst9: Saturation B1 field strength [Hz]
;cnst11: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst12: for multiplicity selection = 4 for NH, 8 for all multiplicities
;cnst18: H2O chemical shift (offset, in ppm)
;cnst19: H(N) chemical shift (offset, in ppm)
;cnst21: CO chemical shift (offset, in ppm)
;cnst22: Calpha chemical shift (offset, in ppm)
;inf1: 1/B1(N) (set SW in F1 to B1*3 to B1*4)
;in0: 1/B1(N))
;nd0: 1
;o3p: On-resonance with the signal to be used for calibration
;sw
;ns: 4 * n
;ds: >= 16
;td1: number of experiments in F1
;FnMODE: STATES-TPPI in F1
;cpd1: decoupling according to sequence defined by cpdprg8: 90x_240y_90x
;cpd3: decoupling according to sequence defined by cpdprg3
;pcpd1: f1 channel - 90 degree pulse for decoupling sequence
;pcpd3: f3 channel - 90 degree pulse for decoupling sequence
;cpdprg8: f1 channel decoupling sequence [90x_240y_90x]

# 230 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
;for z-only gradients:
;gpz0: 0.5%
;gpz1: 50%
;gpz2: 80%
;gpz3: 16.2%
;gpz4: 31%
;gpz5: 5%
;gpz6: -2%
;gpz7: 23%
;gpz8: 13%

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

# 252 "/opt/topspin3.2/exp/stan/nmr/lists/pp/user/cest_etf3gpsitc_b1calib.dm"
;$Id: hsqc_cest_etf3gpsitc3d,v 1.2 2015/10/23 15:32:03 ber Exp $
