Breit-Rabi solver as separate function

General forum for EasySpin: questions, how to's, etc.
Post Reply
katarkon
Local Expert
Posts: 183
Joined: Mon Jan 12, 2015 4:01 am

Breit-Rabi solver as separate function

Post by katarkon »

Is it possible to extract Breit-Rabi solver from garlic and write separate functions like resfields/resfreqs? It seems not to be extremely hard.
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Breit-Rabi solver as separate function

Post by Stefan Stoll »

That's in principle possible, but it is not sure how much that functionality is needed.

Here is a short script for the Breit-Rabi fixed-point solver:

Code: Select all

clear

giso = 2;
Nuc = '1H';
aiso = 1000; % MHz
mwFreq = 9.6; % MHz

Opt.MaxIterations = 15;
Opt.Accuracy = 1e-12;

gn = nucgval(Nuc);
I = nucspin(Nuc);

mI = -I:I;
B = 0;

mwFreq = mwFreq*1e9; % MHz -> Hz
aiso = aiso*1e6*planck; % MHz -> J
gammae = giso*bmagn;
gamman = 0; % to obtain start field, neglect NZI
relChangeB = inf;
for iter = 1:Opt.MaxIterations
  nu = mwFreq + gamman/planck*B;
  q = 1 - (aiso./(2*planck*nu)).^2;
  Bnew = aiso./(gammae+gamman)./q.* ...
    (-mI+sign(aiso)*sqrt(mI.^2+q.*((planck*nu/aiso).^2 - (I+1/2)^2)));
  if ~isreal(Bnew)
    error('Hyperfine coupling too large compared to microwave frequency.');
  end
  if (B~=0), relChangeB = 1 - Bnew./B; end
  B = Bnew;
  gamman = gn*nmagn; % re-include NZI
  if abs(relChangeB)<Opt.Accuracy, break; end
end
B
katarkon
Local Expert
Posts: 183
Joined: Mon Jan 12, 2015 4:01 am

Re: Breit-Rabi solver as separate function

Post by katarkon »

Thanks a lot. It isn't completely clear how to treat several nuclei however. I suggest that resonances for first nucleus should be converted into frequency and each one should be used as mwFreq for second nucleus. Is it right way?
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Breit-Rabi solver as separate function

Post by Stefan Stoll »

There is no exact solution for this except diagonalizing the full Hamiltonian. garlic neglects the nuclear-nuclear cross terms. With that assumption, the shifts from different nuclei are additive.
katarkon
Local Expert
Posts: 183
Joined: Mon Jan 12, 2015 4:01 am

Re: Breit-Rabi solver as separate function

Post by katarkon »

Thanks. I suggest that proposed solution should be working at least for systems with only one large HFC constant (like metalloradicals). I would like to adapt exchange function for systems like copper(II) or rhodium(II) complexes with relatively large hyperfine splitting (over 100G). Default first-order solver should be absolutely inappropriate, although it may be used for nuclei with I=1/2 with some tricks. Nuclei with I>1/2 (like Cu or As) cannot be treated absolutely. The function resfields_perturb in second-order treatment gives better results but I have certain doubts about its applicability for such large HFC constants. Unfortunately, resfields returns resonances in unpredictable order (viewtopic.php?f=4&t=411) although it should be the best choice of course.
And one more question, how garlic treats equivalent nuclei? I think it uses equivcouple representation with followed accumulation of the spectra, is it so?
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Breit-Rabi solver as separate function

Post by Stefan Stoll »

Correct, garlic uses equivcouple to deal with equivalent spins.
Post Reply