garlic
and write separate functions like resfields
/resfreqs
? It seems not to be extremely hard.garlic
and write separate functions like resfields
/resfreqs
? It seems not to be extremely hard.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
mwFreq
for second nucleus. Is it right way?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.garlic
treats equivalent nuclei? I think it uses equivcouple
representation with followed accumulation of the spectra, is it so?garlic
uses equivcouple
to deal with equivalent spins.