Potental bug pepper gframe

A place to report and discuss potential bugs
Post Reply
MPerfetti
Newbie
Posts: 6
Joined: Sat Jun 30, 2018 2:10 am

Potental bug pepper gframe

Post by MPerfetti »

Dear Stefan,
I am trying to calculate the harmonic=0 EPR spectrum of a single crystal containing three identical UNCOUPLED COLLINEAR spins 1/2 but I don't get the expected gparBosc^2 dependence of the Intensity (where gparBosc is the component of g parallel to the oscillating field in perpendicular mode) if I use gframe. In my case, g=[gx,gy,gz], where gx is along Zlab (parallel to B static), gy is along Ylab and gz is along Xlab (parallel to Boscillating). However, it works fine if gframe is not used or if I use gframe but only with a single centre. Hereafter I attach the code that should generate a self-explanatory plot.
Am I doing something wrong?
Thank you very much in advance.

clc
clear
gz=1.5;
for i=1:10
gz=gz+0.5;
Exp.Range = [200 450];
Exp.mwFreq = 9.4;
Exp.Harmonic = 0;
Exp.Mode = 'perpendicular';
Exp.Temperature = 15;
Sys.S=[1/2 1/2 1/2];
gCu=[2.1 2.2 gz];
Sys.J=[0 0 0];
Sys.g=[gCu; gCu; gCu];
Sys.gFrame = [0 -90 0; 0 -90 0; 0 -90 0]*pi/180;
Sys.lwpp = [0 20];
Exp.CrystalOrientation = [0 0 0]*pi/180;
Opt.Threshold = 1e-4;
[B,spc] = pepper(Sys,Exp,Opt);
g(i)=gz;
res(i)=max(spc);
end

plot(g,res,'r', 'Linewidth',2)
hold on

gz=1.5;
for i=1:10
gz=gz+0.5;
Exp.Range = [200 450];
Exp.mwFreq = 9.4;
Exp.Harmonic = 0;
Exp.Mode = 'perpendicular';
Exp.Temperature = 15;
Sys.S=[1/2];
gCu=[2.1 2.2 gz];
Sys.g=[gCu];
Sys.gFrame = [0 -90 0]*pi/180;
Sys.lwpp = [0 20];
Exp.CrystalOrientation = [0 0 0]*pi/180;
Opt.Threshold = 1e-4;
[B,spc] = pepper(Sys,Exp,Opt);
max(spc)
g(i)=gz;
res(i)=max(spc);
end

plot(g,res,'b', 'Linewidth',2)
hold on
xlabel('gpartoBosc')
ylabel('Absintensity')
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Potental bug pepper gframe

Post by Stefan Stoll »

Your system has a lot of degeneracies. EasySpin has sometimes trouble dealing with them correctly. You can get around that problem by breaking the degeneracies ever so slightly. For example, in your case,

Code: Select all

Sys.g = [gCu; gCu; gCu] + rand(3,3)*1e-10;
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Potental bug pepper gframe

Post by Stefan Stoll »

Starting with 6.0.0-dev.22, the handling of this is now improved. EasySpin now adds a tiny bit of numerical noise to non-zero Hamiltonian matrix elements if it suspects degeneracies.You can control the noise level with the undocumented option Opt.FuzzLevel. Its default is set to 1e-10.
Post Reply