/* n15hsqc_mexico_sk.c */ #include static int phi1[16] = {0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2}, phi2[2] = {0,2}, phi3[4] = {0,0,2,2}, phi4[1] = {2}, phi5[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, phi6[8] = {0,0,0,0,2,2,2,2}, phi9[32] = {0,0,0,0,2,2,2,2,2,2,2,2,0,0,0,0, 2,2,2,2,0,0,0,0,0,0,0,0,2,2,2,2}, /*phi9=rec*/ phi8[32] = {0,0,0,0,2,2,2,2,0,0,0,0,2,2,2,2, 2,2,2,2,0,0,0,0,2,2,2,2,0,0,0,0}; /*phi8=rec*/ static double d2_init=0.0; pulsesequence() { /* DECLARE VARIABLES */ char fsat[MAXSTR],MEXICO[MAXSTR]; int t1_counter; /* used for states tppi in t1 */ double rf0, /* full fine power */ tau1,tau1b,tau1c, /* t1 delay */ taua, /* CH coupling constant */ taud1,taud2,taud3,taud4, pwN, /* PW90 for 15N pulse */ pwC, /* PW90 for c nucleus @ pwClvl */ pwC180, /* PW180 for c nucleus in INEPT transfers */ pwClvl, /* power level for 13C pulses on dec1 */ pwNlvl, /* high dec2 pwr for 15N hard pulses */ presat, satpwr, mix, /* noesy mix time */ sw1, /* spectral width in t1 (H) */ sw2, /* spectral width in t2 (C) (3D only) */ gt0, gt1, gt2, gt3, gt4, gt5, gt6, gt7, gzlvl0, gzlvl1, gzlvl2, gzlvl3, gzlvl4, gzlvl5, gzlvl6, gzlvl7; /* LOAD VARIABLES */ mix = getval("mix"); sw1 = getval("sw1"); sw2 = getval("sw2"); pwC = getval("pwC"); pwC180 = getval("pwC180"); pwN = getval("pwN"); pwClvl = getval("pwClvl"); pwNlvl = getval("pwNlvl"); satpwr = getval("satpwr"); presat = getval("presat"); gt0 = getval("gt0"); gt1 = getval("gt1"); gt2 = getval("gt2"); gt3 = getval("gt3"); gt4 = getval("gt4"); gt5 = getval("gt5"); gt6 = getval("gt6"); gt7 = getval("gt7"); gzlvl0 = getval("gzlvl0"); gzlvl1 = getval("gzlvl1"); gzlvl2 = getval("gzlvl2"); gzlvl3 = getval("gzlvl3"); gzlvl4 = getval("gzlvl4"); gzlvl5 = getval("gzlvl5"); gzlvl6 = getval("gzlvl6"); gzlvl7 = getval("gzlvl7"); getstr("fsat",fsat); getstr("MEXICO",MEXICO); /*set delays*/ taua = 1.0/(4.0*100.0); /*HN INEPT taua*/ taud1 = 0.0055; taud2 = 0.0054; taud3 = 0.0039; taud4 = 0.0036; /* LOAD PHASE TABLE */ settable(t1,16,phi1); settable(t2,2,phi2); settable(t3,4,phi3); settable(t4,1,phi4); settable(t5,32,phi5); settable(t6,8,phi6); if(MEXICO[0]=='y'){ settable(t9,32,phi9); }else{ settable(t9,32,phi8); } /* CHECK VALIDITY OF PARAMETER RANGES */ if(MEXICO[0]=='y' && mix < (gt1 + 200.0e-6)) { printf("minimum mix is (gt1 + 0.0002) = %8.4f\n",gt1 + 200.0e-6); } if((dm[A] == 'y' || dm[C] == 'y' )) { printf("incorrect 13C decoupler flags! dm='nnnn' or 'nnny' only "); abort(1); } if((dm2[A] == 'y' || dm2[C] == 'y' )) { printf("incorrect 15N decoupler flags! No decoupling in relax or mix periods "); abort(1); } if( dpwr > 49 ) { printf("don't fry the probe, DPWR too large! "); abort(1); } if( dpwr2 > 49 ) { printf("don't fry the probe, DPWR2 too large! "); abort(1); } if( pw > 200.0e-6 ) { printf("dont fry the probe, pw too high ! "); abort(1); } if( pwN > 200.0e-6 ) { printf("dont fry the probe, pwN too high ! "); abort(1); } if( pwC > 200.0e-6 ) { printf("dont fry the probe, pwC too high ! "); abort(1); } if( gt0 > 5e-3 || gt1 > 5e-3 || gt2 > 5e-3 || gt3 > 5e-3 || gt4 > 5e-3 || gt5 > 5e-3 || gt6 > 5e-3 || gt7 > 5e-3 ) { printf("gti values < 5e-3\n"); abort(1); } /* Set up tau1 = t1 */ tau1 = d2/2.0; tau1b = 0.0; tau1b = tau1 - (pwC*158.0/90.0+pwC*171.2/90.0+0.5*pwC*342.8/90.0); tau1c = tau1 - (pwC*145.5/90.0+pwC*166.5/90.0+0.5*pwC*342.8/90.0); /* Phase incrementation for hypercomplex 2D data */ if (phase1 == 2) tsadd(t6,1,4); /* Calculate modifications to phases for States-TPPI acquisition */ if( ix == 1) d2_init = d2 ; t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5 ); if(t1_counter % 2) { tsadd(t6,2,4); tsadd(t9,2,4); } rf0 = 4095.0; /* maximum fine power for pwC pulses */ /* BEGIN ACTUAL PULSE SEQUENCE */ status(A); rcvroff(); obsoffset(tof); decoffset(dof); dec2offset(dof2); decpower(pwClvl); /* Set Dec1 power for hard 13C pulses */ dec2power(pwNlvl); /* Set Dec2 to low power for decoupling */ if(fsat[0]=='y') { delay(d1 - presat); obspower(satpwr); rgpulse(presat,zero,0.0,0.0); obspower(tpwr); /* Set transmitter power for hard 1H pulses */ delay(10.0e-6); }else{ obspower(tpwr); /* Set transmitter power for hard 1H pulses */ delay(d1); } status(B); taud1 = 0.0055; taud2 = 0.0054; taud3 = 0.0039; taud4 = 0.0036; /*N15 and C13 filter*/ if(MEXICO[0]=='y'){ rgpulse(pw,t1,0.0,2.0e-6); delay(taud3); decrgpulse(pwC,t2,0.0e-6,0.0e-6); delay(taud1 - taud3); sim3pulse(2.0*pw,2*pwC,pwN,one,zero,t2,0.0,0.0e-6); delay(taud4 -(taud1 - taud3)); decrgpulse(pwC,t3,0.0e-6,0.0e-6); delay(taud2 - taud4 +(taud1 - taud3)); sim3pulse(pw,0.0,pwN,t4,zero,t3,0.0,2.0e-6); zgradpulse(gzlvl1, gt1); delay(200.0e-6); delay(mix - 200.0e-6 - gt1); } /*HSQC part*/ rgpulse(pw,t5,0.0e-6,2.0e-6); delay(taua -pwN); sim3pulse(2.0*pw,0.0,2.0*pwN,zero,zero,zero,0.0,2.0e-6); delay(taua -pwN); rgpulse(pw,one,1.0e-6,2.0e-6); zgradpulse(gzlvl3, gt3); dec2rgpulse(pwN,t6,150.0e-6,2.0e-6); status(B); if(tau1c > 0.0) { delay(tau1b); sim3pulse(0.0,pwC*158.0/90.0, 0.0,zero,zero,zero, 0.0, 0.0);/* Shaka6*/ sim3pulse(0.0,pwC*171.2/90.0, 0.0,zero,two,zero, 0.0, 0.0); sim3pulse(2*pw,pwC*342.8/90.0, 0.0,zero,zero,zero, 0.0, 0.0); sim3pulse(0.0,pwC*145.5/90.0, 0.0,zero,two,zero, 0.0, 0.0); sim3pulse(0.0,pwC*81.2/90.0, 0.0,zero,zero,zero, 0.0, 0.0); sim3pulse(0.0,pwC*85.3/90.0, 0.0,zero,two,zero, 0.0, 0.0); delay(tau1c); }else{ delay(tau1); sim3pulse(2*pw,2*pwC, 0.0,zero,zero,zero, 0.0, 0.0); delay(tau1); } status(C); dec2rgpulse(pwN,zero,2.0e-6,2.0e-6); zgradpulse(-gzlvl3, gt3); rgpulse(pw,zero,152.0e-6,2.0e-6); zgradpulse(gzlvl5, gt5); delay(taua - gt5 - 2.0e-6 -pwN); sim3pulse(2.0*pw,0.0,2.0*pwN,zero,zero,zero,0.0,2.0e-6); zgradpulse(gzlvl5, gt5); delay(taua - gt5 - 4.0e-6 -pwN); rgpulse(pw,zero,1.0e-6,rof2); /* flip-back pulse */ decpower(dpwr); dec2power(dpwr2); rcvron(); setreceiver(t9); status(D); }