Saffron g-Tensor

A place to report and discuss potential bugs
Post Reply
JuliaL
Newbie
Posts: 9
Joined: Wed Oct 29, 2014 2:51 pm
Location: Berlin

Saffron g-Tensor

Post by JuliaL »

I want to reproduce some older simulations and don't know how EasySpin is internally processing g/A and gpa/Apa. Therefore I want to calculate the orientations on my own and hand over 3x3 g and A matrices to saffron.
But it doesn't not except full g matrices. Please find the working example below.

- Giving g and A in the form of [x, y, z] and gpa/Apa as Euler angles, everything is fine.
- Changing g or A to a full 3x3 matrix and keeping gpa/Apa, I get the following error. That's fine, too.

"Error using saffron (line 252)
Full hyperfine matrices are specified in g/A, so gpa/Apa is not allowed!
Error in /Users/.../easyspin-4.5.5/easyspin/saffron.p>saffron (line 76)"

- But using full A and g matrices without gpa and Apa, I get:

"Error using *
Inner matrix dimensions must agree.
Error in /Users/.../easyspin-4.5.5/easyspin/saffron.p>saffron (line 996)
Error in /Users/.../easyspin-4.5.5/easyspin/saffron.p>saffron (line 76)"

I checked the matrix dimensions, took a look on the homepage for the right format. It's 3x3 as indicated.

- The combination of full A matrix and g with gpa also works fine. The g matrix seems to crush it...

Please help :)

Specifications: EasySpin 4.5.5 with Matlab 2012b, IntelMac 10.8.5.

Similar error occurs on up-to-date stable Debian, Matlab R2011a, Easyspin 4.5.5:
Error using ==> mtimes
Inner matrix dimensions must agree. [...]

Thanks and kind regards,
Julia (FU Berlin)

--------------------------------------

Minimal working example:

Code: Select all

Exp.Sequence = 'HYSCORE'; Exp.dt = [0.024, 0.024]; Exp.tau = 0.2;
Exp.t1 = 0.2; Exp.t2 = 0.3; Exp.nPoints = 256; Exp.mwFreq = 9.72;
Exp.ExciteWidth = 1000/16; Exp.Field = 317.0;
Sys.S = 1/2; Sys.Nucs = '2H'; Sys.Q = [0.03 .1];
Opt.nKnots = 50; Opt.ZeroFillFactor = 2;

g_cos = [0.461 0.455 -0.762; -0.204 -0.781 -0.590; -0.864, 0.428, -0.267];
Sys.g = [2.197 2.139 2.015];
Sys.gpa = eulang(g_cos);
%Sys.g = [2.197 0 0; 0 2.139 0; 0 0 2.015]; %%%% does not work %%%%

A_cos = [-0.63 0.54 -0.55; 0.21 0.81 0.55; 0.74 0.23 -0.63];
%Sys.A = [18.4 -10.8 -18.0]/6.514;
%Sys.Apa = eulang(A_cos);
Sys.A = [18.4 0 0; 0 -10.8 0; 0 0 -18.0]/6.511;

saffron(Sys,Exp,Opt)
Stefan Stoll
EasySpin Creator
Posts: 1057
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Saffron g-Tensor

Post by Stefan Stoll »

This is a bug. saffron() is having troubles with the full g matrix.

It will be fixed in the next release. Thanks for reporting!

Meanwhile, use Sys.g with 3 prinicpal value and Sys.gpa instead of the full g tensor in Sys.g.
Post Reply