Page 1 of 1

Problem simulation function chili with new EasySpin 5.2.4

Posted: Fri Oct 06, 2017 4:11 am
by jojo21
Since I use the new Easyspin version 5.2.4, the error code: "Error using magint g tensor must be symmetric for this method." is always obtained when the following simulation code is executed:

Code: Select all

Exp = struct('mwFreq',9.429649,...
             'CenterSweep',[336.05 9.9794],...
             'nPoints',4096,...
             'Harmonic',1,...
             'ModAmp',0.02,...
             'mwPhase',4.5*pi/180);
 
Sys = struct('S',1/2,...
             'g',[2.010695 2.0064 2.0024],...
             'Nucs','14N',...
             'A',[22.37 16.765 105.67317],...
             'lwpp',[0.12319 0.00381],...
             'tcorr',[28e-12 30e-12 30e-12],...
             'DiffFrame',[0 50 0]*pi/180);
 
chili(Sys,Exp);
In the slightly older EasySpin version 5.1.12, this error did not occur with the same code and the simulation curves matched perfectly with the parameters to the measured EPR spectra. In the meantime, I have already tried to find out that the error is probably related to the field "DiffFrame". If I remove this entry, the simulation runs with chilli again, but then my simulation parameters determined with the old EasySpin version 5.1.12 did no longer fit with the measured spectra.
So my question: Where does this error in the new EasySpin version come from (change of the interpretation of the frame coordinates???) or how do I have to adjust my simulation parameters for the new EasySpin version so that the simulations fit again as in the old version 5.1.12?

Re: Problem simulation function chili with new EasySpin 5.2.

Posted: Fri Oct 06, 2017 4:47 am
by katarkon
I try to run the script on my machine (Win32, Matlab R2012b). It works fine and throws no errors. The problem seems to be platform-specific. I suggest You should report the version of Matlab and OS used. Also You can try run chili function with Opt.Verbosity = 2 and post output here. Also, recompilation of chili mex files for your platform may solve the problem. Try to remove/rename them from easyspin/private/ folder and type easyspin in command window.

Re: Problem simulation function chili with new EasySpin 5.2.

Posted: Fri Oct 06, 2017 7:04 am
by jojo21
I use a machine with Windows 10 Pro (64 Bit) and Matlab R2016a. If I run the code with Opt.Verbosity = 2 I get the following output:

Code: Select all

>> Simulation
  single spin system
  component 1: 1 isotopologues
-- slow motion regime simulation ----------------------------------
  field sweep, mw frequency 9.429649 GHz
  field range (mT): min 331.06, max 341.04, center 336.05, width 9.9794
  field modulation, amplitude 0.02 mT
  harmonic 1, perpendicular mode
  No ordering potential given, skipping powder simulation.
Solver: Lanczos tridiagonalization, left-to-right continued fraction evaluation
  allocating memory in blocks of 1000000 non-zero elements
  using S=1/2 Liouvillian code
Error using magint
g tensor must be symmetric for this method.

Error in chili

Error in chili

Error in Simulation (line 18)
chili(Sys,Exp,Opt);
To remove the chili mex files from easyspin/private/ folder does not solve the problem unfortunately.

Re: Problem simulation function chili with new EasySpin 5.2.

Posted: Fri Oct 06, 2017 7:46 am
by Stefan Stoll
This should be fixed in 5.2.5, available on the website now. We loosened the threshold for the symmetry check, which was obviously too tight to work on all platforms.