/* hathmbced.c "H1-C13 Multiplicity edited homonuclear attenuated HMBC" Echo/Antiecho gradient selection uses a low-pass J-filter for suppression of one-bond correlations (default is a third order filter) Benie, A.J. & Sørensen, O.W. (2006), J.Magn.Reson., In press SETUP INFORMATION Using decoupler channel 1 for X-pulses Flags: lpjf Order of low pass J-filter (LPJF) 1: 1st order LPJF 2: 2nd order LPJF 3: 3rd order LPJF (default) presat y: presaturation during relaxation delay n: no presaturation during relaxation delay edit y: selection of -90 spectrum n: or +90 spectrum altgrad y: alternative gradient scheme n: standard gradient scheme Pulses, Powers & Frequencies: pw 90 degrees transmitter pwx 90 degrees decoupler 1 pwlvl 90 degrees transmitter hard pulse power level pwxlvl power level for decoupler 1 high power tpwr transmitter high power level satpwr power level for saturation of solvent signal using transmitter during relaxation delay satdly duration of presaturation satfrq presaturation offset Coupling constants Jmin smallest 1J(XH) for LPJF setting (the smallest expected) Jmax largest 1J(XH) for LPJF setting (the largest expected) Jxh Optimum 1J(XH) for editing of spectra (e.g. the average 1J(XH)) Delays DELTA Delay for the evolution of long range coupling constants Gradient settings gt1 length of the gradients used ca. 1msec gzlvl1 max size of the low pass filter gradients. gzlvl2 gradient for Echo/AntiEcho selection Nttes To acquire the data for an edited spectrum you should acquire the data in an interleaved manner. i.e use array='edit,phase' or array='phase,edit'. For processing with vnmrJ use the first and for topspin (splitinvnoe followed by adsu) use the latter. Processing: (for array='edit,phase') A: wft2d(1,0,-1,0,1,0,-1,0,0,-1,0,-1,0,-1,0,-1) B: wft2d(1,0,-1,0,-1,0,1,0,0,-1,0,-1,0,1,0,1) Other: This pulseprogram is heavily based on the edited HMBC pulseprogram as is thus not as simple as it could be. Version History: Version 1: Initial release 31/01/06 Version 1.1: abort changed to psg_abort to make sequence work with vnmrJ comment out lines 300 or 301 as needed Testing Information: vnmr61C:Inova 500:Solaris acquisition host (Published spectra) vnmrJ1.1D:Inova 800:Solaris acquisition host (Works OK) vnmrJ1.1D:n/a:Linux data station (compiles and displays OK) Disclaimer: This pulse program has been tested and found to be working on our spectrometers, but adjustments in pulse program syntax and/or parameter sets may be necessary for other hardware configurations or systems. Please pay attention to the requirements of your system, when implementing this pulse program. The Carlsberg Laboratory or the Instrument Center does not make any warranties with respect to this software. In no event will Carlsberg Laboratory or the Instrument Center be liable for any loss, damages of any nature arising or relating to the use or performance of this software. Copyright (c), 2006, Carlsberg Research Center, All rights reserved */ #include /* Subroutines here */ LPJF(pass,jmin,jmax,het90,rofa,zgradlen,zgradlvl,zgradrec,tauadjust) int pass; double jmin, jmax, tauadjust, het90, rofa, zgradlen, zgradlvl, zgradrec; { /* subroutine to provide various low pass filters. The default is a third order low pass filter Parameters: pass: flag for the low pass filter order jmin,jmax: the value of the minimum and maximum 1Jxh constant het90,rofa: the length of the X nucleus 90deg pulse. rofa corresponds to rof1 zgradlen/lvl/rec: z gradient length, level and the recovery delay tauadjust: the ammount by which to shorten the inital tau delay to compensate for timing differences */ double tau, taumin,taumax; if (jmin == 0.0 || jmax == 0.0) { jmin = 115; jmax = 175; } switch (pass) { case 1: taumax = 1.0/(jmin + jmax); delay(taumax - zgradlen - 2*GRADIENT_DELAY - zgradrec - tauadjust); zgradpulse(zgradlvl,zgradlen); delay(zgradrec); decrgpulse(het90,zero,zgradlen,0.0); zgradpulse(zgradlvl*-1,zgradlen); break; case 2: zgradlvl=zgradlvl/3.0; taumin = 1.0/(2.0*(jmin + 0.146*(jmax - jmin))); taumax = 1.0/(2.0*(jmax - 0.146*(jmax - jmin))); delay(taumin - zgradlen - 2*GRADIENT_DELAY - zgradrec - tauadjust); zgradpulse(zgradlvl*3.0,zgradlen); decrgpulse(het90,zero,zgradrec,0.0); zgradpulse(zgradlvl*-2.0,zgradlen); delay(taumax - zgradlen - 2*GRADIENT_DELAY - rofa - 0.0 - het90); decrgpulse(het90,zero,rofa,0.0); zgradpulse(zgradlvl*-1.0,zgradlen); break; default: /* low pass 3rd order filter DEFAULT */ zgradlvl=zgradlvl/7; taumin = 1.0/(2.0*(jmin + 0.070*(jmax - jmin))); tau = 1.0/(jmin + jmax); taumax = 1.0/(2.0*(jmax - 0.070*(jmax - jmin))); delay(taumin - zgradlen - 2*GRADIENT_DELAY - zgradrec - tauadjust); zgradpulse(zgradlvl*7.0,zgradlen); decrgpulse(het90,zero,zgradrec,0.0); zgradpulse(zgradlvl*-4.0,zgradlen); delay(tau - zgradlen - 2*GRADIENT_DELAY - 0.0 - rofa - het90); decrgpulse(het90,zero,rofa,0.0); zgradpulse(zgradlvl*-2.0,zgradlen); delay(taumax - zgradlen - 2*GRADIENT_DELAY - 0.0 - rofa - het90); decrgpulse(het90,zero,rofa,0.0); zgradpulse(zgradlvl*-1.0,zgradlen); break; } } /* end of LPJF subroutine */ /* End of subroutines */ /* The pulsesequence starts here */ pulsesequence() { /* Variables */ double DELTA=getval("DELTA"), Epsilon, Epsilonpwx, gradlen, grad[4]={0.0,0.0,0.0,0.0}, gstab=getval("gstab"), gt1=getval("gt1"), gzlvl1=getval("gzlvl1"), gzlvl2=getval("gzlvl2"), Jmax=getval("Jmax"), Jmin=getval("Jmin"), Jxh=getval("Jxh"), t1evol, t1min, tau, tpwr=getval("tpwr"), gH=26.752196, /* gyromagnetic ratio of the detected nucleus */ gX=6.72828; /* gyromagnetic ratio for the indirectly detected nucleus change as needed e.g. for N15 use -2.712621 */ char altgrad[MAXSTR],edit[MAXSTR],presat[MAXSTR]; int abortflag=0,lpjf=(int)(getval("lpjf") + 0.5), phase=(int)(getval("phase") + 0.5); /* get character strings */ getstr("altgrad",altgrad); getstr("edit",edit); getstr("presat",presat); /* Initialise Variables */ gradlen=gt1 + 2*GRADIENT_DELAY; tau=1/(Jxh*2); /* make sure that for the first increment d2 is zero (except for in setup experiments) */ if((ix==0)&&(ni>1)) d2=0.0; /* set up t1 */ t1min=2*rof1; t1evol=0.5*(d2 + t1min); Epsilon=t1min+2*pw; Epsilonpwx=Epsilon+2*pwx; /* Phase Cycle calculations sets up v14 to be used instead of ct so that steady state scans cycle */ sub(ct,ssctr,v14); /*the rest of the phase cycled phases*/ dbl(v14,oph); hlv(v14,v2); hlv(v2,v3); dbl(v2,v2); dbl(v3,v13); add(v2,v13,v2); add(v14,one,v1); hlv(v1,v1); dbl(v1,v1); /* Translation of the above v1=0 2 2 0 v2=0 0 2 2 2 2 0 0 v3={0}4 {1}4 {2}4 {3}4 oph=0 2 v13&v14 are only used to calculate phases 1 to 4 and oph */ /* Calculate modifications to phases for States-TPPI acquisition id2 is a real time variable that contains the increment number */ mod2(id2,v12); dbl(v12,v12); add(v2,v12,v2); add(oph,v12,oph); /* Gradient setup define a standard basic gradient strength */ if(altgrad[A]=='y') gzlvl2=gzlvl2/((gH+gX)-((gH*gX)/(gH-gX))); else gzlvl2=gzlvl2/(gH+gX); /* define the actual strengths and perform the necessary adjustments for Echo/AntiEcho. */ if(altgrad[A]=='n') { grad[0]=(gH+gX)*gzlvl2*-1; grad[3]=(gH-gX)*gzlvl2*-1; grad[1]=gH*gzlvl2; grad[2]=grad[1]*-1; if(phase==2) { grad[0]=(gH-gX)*gzlvl2*-1; grad[3]=(gH+gX)*gzlvl2*-1; } } else if(altgrad[A]=='y') { grad[0]=2*((gH+gX)/gH)*gX*gzlvl2; grad[3]=2*((gH-gX)/gH)*gX*gzlvl2; grad[1]=gX*gzlvl2*-1; grad[2]=grad[1]*-1; if(phase==2) { grad[0]=2*((gH-gX)/gH)*gX*gzlvl2; grad[3]=2*((gH+gX)/gH)*gX*gzlvl2; } } else { printf("Error altgrad must be set to either 'y' or 'n' \n"); abortflag=1; } if((presat[A]=='y')&&((satdly>d1)||(satpwr>30)||(satdly>2.0))) { if(satdly>d1) printf("Presaturation time, satdly (%f) must be shorter than d1 (%f) \n", satdly,d1); if(satpwr>30) printf("Presaturation power, satpwr is too high with %f (max = 30 dB) \n", satpwr); if(satdly>2.0) printf("Presaturation delay, satdly is too long with %f (max = 2 s) \n", satdly); abortflag=1; } /* decoupler test code here */ if((dm[A]=='y')||(dm[B]=='y')||(dm[C]=='y')) { printf("Incorrect decoupler flags for dm (%s)! Should be 'nnn' \n",dm); abortflag=1; } /* if(abortflag==1) abort(1); */ if(abortflag==1) psg_abort(1); /* pulsesequence starts here with pulses */ status(A); if(presat[A]=='y') { delay(d1-satdly); /* if doing presat shorten d1 by the presat ammount */ obsoffset(satfrq); delay(4e-6); obspower(satpwr); rgpulse(satdly - 2.0*POWER_DELAY - rof1 - 8e-6,zero,rof1,0.0); obspower(tpwr); obsoffset(tof); delay(4e-6); } else { delay(d1); } status(B); decpower(pwxlvl); rgpulse(pw,zero,rof1,0.0); LPJF(lpjf,Jmin,Jmax,pwx,rof1,gt1,gzlvl1,gstab,0.0); delay(DELTA - gradlen*2 - gstab - rof1); if(edit[A]=='n') { delay(Epsilonpwx); zgradpulse(grad[0],gt1); } else zgradpulse(grad[3],gt1); delay(gstab); decrgpulse(pwx,v2,rof1,0.0); zgradpulse(grad[1],gt1); delay(tau*0.5 - gradlen - rof1); if(edit[A]=='n') delay(rof1); else { delay(Epsilon); decrgpulse(pwx*2,v3,rof1,0.0); } delay(t1evol - rof1); rgpulse(pw*2,zero,rof1,0.0); delay(t1evol - rof1); if(edit[A]=='n') decrgpulse(pwx*2,v3,rof1,0.0); else delay(rof1); if(altgrad[A]=='y') zgradpulse(grad[2],gt1); delay(tau*0.5 - gradlen - gstab - rof1); if(edit[A]=='n') delay(Epsilon); if(altgrad[A]=='n') zgradpulse(grad[2],gt1); delay(gstab); decrgpulse(pwx,v1,rof1,rof2); if(altgrad[A]=='n') { if(edit[A]=='n') zgradpulse(grad[0]*-1,gt1); else zgradpulse(grad[3]*-1,gt1); delay(gstab); } if(edit[A]=='y') delay(Epsilonpwx); status(C); /* acquistiion */ } /* end of pulseprogram */