===== WMT0 1101 SimulateIso (4986 bytes) SimulateIso(paramsIso, destination_wave) Supplied by EPRSim XOP 68K by John Boswell knight@grafton.dartmouth.edu or boswell@amethyst.cbs.ogi.edu ( http://amethyst.cbs.ogi.edu/JSB/JSB_Home.html ) This external function simulates Isotropic EPR spectra. It is based on the code by U.M. Oehler, and E.G. Janzen, Can. J. Chem., 60, 1542-1548 (1982). This function uses the parameters supplied to it by paramsIso, and returns the simulated spectrum in destination_wave. Both the params and destination_wave waves must be the same precision; preferably double-precision. (Don't mix up precisions.) I'll check for this in a later version, for now you must verify that the precision of both waves is the same prior to running the XOP. To verify that this function works, perform the following steps: 1. Generate a destination_wave and a paramsIso wave: Make/d/n=1000 simulated_data (number of points can be up to 2000) Make/d/n=9 params (MUST be 9 points or greater) 2. Edit paramsIso, using the values you need to simulate. The params wave needs data in the following order (starting at point 0) : Note: a sample paramsIso wave is supplied in the demo experiment. The paramsIso data supplied with the demo takes < 1 second to simulate on a Quadra650. Be sure you supply all the values... Values to be supplied by the paramsIso wave: 0) X_increment= X increment 1) Phase= Phase of spectrum (1 or -1) 2) Number_of_Different_Nuclei= Number of different nuclei (for example, DMPO-spin trapped radicals have 2; one for H and one for N) 3) Linewidth= linewidth 4) Y_max= Max value for Y. Use as a scaling value to match an experimental spectrum 5) Delta_g= amount to shift subsequent spectra (nuclei) 6) Frac_Lor= Percentage of lineshape due to Lorenztian. (0.3 is 30% Lorenztian, 70% Gaussian) Repeat the next three values for the Number_of_Spectra: i.e. if Number_of_Spectra is 1: 7) Number_of_Nuclei= Number of nuclei for nucleus 1 8) CC= Coupling Constant for this nucleus 9) Spin= Spin of this nucleus (end of paramsIso, if Number_of_Spectra = 1), if Number_of_Spectra is 2, continue ParamsIso: 10) Number_of_Nuclei= Number of nuclei for nucleus 2 11) CC= Coupling Constant for this nucleus 12) Spin= Spin of this nucleus ...etc end of paramsIso 3. Perform the simulation: SimulateIso(paramsIso,destination_wave) -The xop will beep when done. The sample paramsIso provided with the demo experiment take < 1 second to simulate on a Quadra650. Any publication making use of this program should acknowledge: "EPRSim XOP for Igor Pro" by John Boswell, Oregon Graduate Institute Subtopic+ FunctionBody1 Normal step code Geneva Courier Helvetica Monaco New York Palatino Times Chicago Symbol ꬿ ===== WMT0 1100 Simulate (13224 bytes) Simulate(params, destination_wave) Supplied by EPRSim XOP 68K by John Boswell knight@grafton.dartmouth.edu or boswell@amethyst.cbs.ogi.edu ( http://amethyst.cbs.ogi.edu/JSB/JSB_Home.html ) This external function simulates Powder EPR spectra using the QPOW simulation code by Belford, Maurice, and Nilges. This function uses the parameters supplied to it by params, and returns the simulated spectrum in destination_wave. Both the params and destination_wave waves must be the same precision; preferably double-precision. (Don't mix up precisions.) I'll check for this in a later version, for now you must verify that the precision of both waves is the same prior to running the XOP. From the original QPOW source code comments: "QPOW generates a powder spectrum for a spin = 1/2 system with one hyperfine nucleus (one or two isotopes) and up to three superhyperfine nuclei. Hyperfine, quadrupole, and nuclear Zeeman interactions are calculated using matrix diagonalization. The superhyperfine splitting is treated as a perturbation on this. All hyperfine matrices and quadrupole tensors can be rotated independently from the coordinate system where the G matrix is diagonal. The three Euler angles are read in the order alpha, beta, gamma according to the convention of Rose. Spectra are integrated using two-dimensional 4-point gauss-point integration coupled with a 4-point interpolation of field positions and intensities. This program allows a choice between first and second derivative spectra. Both Gaussian and Lorenzian lineshapes are supported. The linewidth is allowed to vary with the MI value of the initial and final state of a transition." To verify that this function works, perform the following steps: 1. Generate a destination_wave and a params wave: Make/d/n=500 simulated_data (number of points can be up to 2000) Make/d/n=70 params (MUST be 70 points or greater) 2. Edit params, using the values you need to simulate. The params wave needs data in the following order (starting at point 0) : Note: a sample params wave is supplied in the demo experiment. The params data supplied with the demo takes about 10 seconds to simulate on a Quadra650. Be sure you supply all the values... Values to be supplied by the params wave: 0) SPINA= Spin of metal nucleus being studied 1) SPINB= Spin of superhyperfine nucleus, B 2) SPINC= Spin of superhyperfine nucleus, C; C is magnetically different than B 3) SPIND= Spin of superhyperfine nucleus, D 4) NEB= # of B type atoms 5) NEC= # of C type atoms 6) NED= # of D type atoms 7) CUTOFF= # of linewidths the spectrum is to be calculated over 8) NU=Frequency at which spectrum was recorded, IN GHZ PRINCIPLE VALUES OF THE G MATRIX: 9) GX= g in X direction 10) GY= g in Y direction 11) GZ= g in Z direction 12) NTR= # of transitions possible considering only nucleus A; if your NTR is too large program will substitute NTR=((SPINA*2)+1)**2 13) NTH= # of intervals along the Theta direction for which spectra will be calculated. If Theta ranges from 0 to 90 degrees, and NTH is set at 9, there will be 9 intervals, each of 10 deg. Actually, half of this number will be calculated due to interpolation. Four points will be calculated inside each interval as determined by Gaussian quadrature. The maximum value for NTH is 49. 14) NPH= # of intervals along the PHI direction when NTH is set at 90 degrees. The number of intervals along the PHI direction is dependent upon THETA as well as NPH: [Sin(THETA)][NPH]; therefore, as THETA approaches zero, the # of intervals decreases. The maximum value of NPH is 15. 15) ITH= Initial THETA angle (to calculate only the perpendicular part of the spectrum, ITH should be about 40). 16) LTH= Range of THETA integration divided by PI/2; if the Gz coordinate axis is coincident with the Az coordinate axis, the Range = 90 degrees, and LTH =1; if they are noncoincident, the Range = 180 degrees and LTH = 2. 17) LPH= Range of PHI integration divided by PI/2; If the Gx and Gy axes are coincident with the Ax and Ay axes, respectively, the Range = 90 degrees and LPH=1, otherwise, the Range = 180 and LPH-2. PRINCIPAL VALUES OF HYPERFINE MATRIX FOR THE METAL NUCLEUS (IN MHZ): 18) AX= A along X axis 19) AY= A along Y axis 20) AZ= A along Z axis ANGSA= Euler angles which rotate the A matrix from the coordinate system where the G-matrix is diagonal to the coordinate system where the A-matrix is diagonal (if G and A are coincident, these are set equal to zero): 21) ALPHA 22) BETA 23) GAMMA PRINCIPAL HYPERFINE MATRIX VALUES FOR B ATOMS: 24) In X direction 25) In Y direction 26) In Z direction ANGSB=EULER ANGLES FOR B ATOMS: 27) ALPHA 28) BETA 29) GAMMA PRINCIPAL HYPERFINE MATRIX VALUES FOR C ATOMS: 30) In X direction 31) In Y direction 32) In Z direction ANGSC=EULER ANGLES FOR C ATOMS: 33) ALPHA 34) BETA 35) GAMMA PRINCIPAL HYPERFINE MATRIX VALUES FOR D ATOMS: 36) In X direction 37) In Y direction 38) In Z direction ANGSD=EULER ANGLES FOR D ATOMS 39) ALPHA 40) BETA 41) GAMMA (IN THE COORDINATE SYSTEM WHERE THE QUADRAPOLE TENSOR IS DIAGONAL:) 42) qdd= 3/2*QZ in MHZ (QZ=quadrapole along the Z axis) 43) QE=1/2*(QX-QY) in MHZ ANGSQ=Euler angles which rotate the Q tensor from the coordinate system in which the G tensor is diagonal to the coordinate system where the Q tensor is diagonal: 44) ALPHA 45) BETA 46) GAMMA LINEWIDTHS ALONG PRINCIPLE DIRECTIONS OF THE G MATRIX (in MHZ): 47 IN THE X DIR 48) IN THE Y DIR 49) IN THE Z DIR 50) IDERIV=The derivative of the spectrum (1st or 2nd) 51) GN= Nuclear G-factor for the 1st isotope of the metal. 52) GR= Ratio of g factors of 2nd isotope to 1st. 53) QR= Ratio of quadrapole moments of the 2nd to 1st. 54) GWT(1)= Fraction of abundance of 1st isotope (if only one isotope, GWT(1) = 1.00). 55) NIS= Number of isotopes. If NIS=1, only the 1st isotope is calculated, if NIS=2, two isotopes are calculated. 56) LCR= Center of spectrum (in Gauss) 57) LTOT= Field sweep (width of spectrum) (in Gauss) 58) HINT= Size of interval for PTS to be plotted (in gauss); program will calculate a point every HINT # of gauss. ****IMPORTANT NOTE**** Do NOT use an HINT of less than 1, or the XOP will crash Igor. This will be fixed in a later version. ALSO: Use LTOT and HINT values such that the total number of points is the same as the destination_wave, i.e. for params[61] use 1000 and params[62] use 2 for a 500 pt wave. If the destination_wave is smaller than LTOT/HINT, you may crash. I'll check for this in a later version. For now, just double check before running the simulation. EPSILN= CONSTANT RELATING THE CORRELATION OF A- AND G-STRAIN: 59) In X direction 60) In Y direction 61) In Z direction CONSTANT CONTAINING INFORMATION ON THE EXTENT OF A-STRAIN IN MHZ: 62) In X direction 63) In Y direction 64) In Z direction CTWO=CONSTANT CONTAINING INFORMATION ON THE EXTENT OF G-STRAIN 65) In X direction 66) In Y direction 67) In Z direction 68) Gaussian or Lorentzian lineshape. Gaussian = 0, Lorentzian = 1. 69) Sound On/Off. If = 1, then Igor will play a bit of the theme from "The Good, the Bad, and the Ugly" when it is done simulating. A value of 0 turns this option off. (end of params to be supplied) 3. Perform the simulation: Simulate(params,destination_wave) -The cursor will change to a rotating Beach Ball during the simulation. The XOP will beep once at the start of the simulation, (signaling it has received the params) and then twice when finished (or it will play some music). The mac is COMPLETELY TIED UP during the simulation. I don't allow for backgrounding. The sample params provided with the demo experiment take about 1 minute to simulate on a Quadra650. Any publication making use of this program should acknowledge: "EPRSim XOP for Igor Pro" by John Boswell, Oregon Graduate Institute- an adaptation of "Program QPOW" by Nilges and Belford", and should cite the following references: (1) M. J. Nilges, PH.D Thesis, University of Illinois, Urbana Illinois, (1979). (2) R. L. Belford and M. J. Nilges, "Computer simulation of powder spectra", EPR Symposium, 21st Rocky Mountain Conference, Denver, Colorado (August, 1979). (3) A. M. Maurice, PH.D Thesis, University of Illinois, Urbana Illinois, (1980). Subtopic+ FunctionBody1 Normal step code Normal+ Normal+ step+ Geneva Courier Helvetica Monaco New York Palatino Times Chicago Symbol ꬿ