Fitting SQUID data

General forum for EasySpin: questions, how to's, etc.
Post Reply
dar_06
Newbie
Posts: 2
Joined: Mon Sep 05, 2022 12:35 pm

Fitting SQUID data

Post by dar_06 »

Dear All,

As we got some SQUID data we need to understand, I tried a number of software to try to fit them. EasySpin seems sensible, and I thought I would go through it easily as I already use it for EPR. However, I run into some problems which I don't really understand. Basically our system is a metal centre antiferromagnetically coupled with a ligand radical. So I am trying to extract J and g.

My code is below

Code: Select all

% SQUID measurement
%===============================================================================
clear, clf, clc;

%Defining the J in Easyspin Format
cm=2.99793e4
% Defining experimental parameters

path = '\path\to\SQUID\data\'
cd(path);
Exp.Field = 500;
[T,chi] = textread('exp_data.txt', '%f %f') % reads data in txt format



%Defining the spin systems

J = -22;
g = 2;

Sys.S=[1/2 1/2];
Sys.g=[g g];
Sys.ee=-2*cm*[J J] % MHz
%Sys1.D = [30 30] % cm-1


% then vary the g and J accordingly
Vary1.g = [0.5 0.5];
Vary1.ee = 2*cm;

FitOpt.OutArg = [1 1]; %to fit the magnetic susceptibility chizz
FitOpt.nKnotts = 31;
 
FitOpt.Scaling = 'none';

%Call esfit
Exp.Temperature = T;
Exp.Field = 500;
esfit('curry', chi,Sys,Vary1,FitOpt);

Regardless of where I put Exp.Temperature = T or Exp.Temperature= 2:300 in the script, it does not seem to pass it to curry. I get the error

Code: Select all

Exp.Field is missing, assuming zero field.
Error using curry
Exp.Temperature is missing.
Error in esfit
Error in esfit_simplex
Error in esfit
Error while evaluating UIControl Callback.

The txt data are attached.

I am using easyspin-5.2.35. I also tried to used the easyspin-6 version, but there I got into a lot of other types of errors which made me revert.

Any help would be appreciated.

Best wishes,
Adrian

Attachments
exp_data.zip
(676 Bytes) Downloaded 271 times
Matt Krzyaniak
EasySpin Guru
Posts: 153
Joined: Tue Jul 22, 2014 11:01 am
Location: Northwestern University

Re: Fitting SQUID data

Post by Matt Krzyaniak »

It looks like you forgot to pass Exp into esfit.

Also, if you are just including isotropic exchange coupling, Sys.ee should only be a single value.

dar_06
Newbie
Posts: 2
Joined: Mon Sep 05, 2022 12:35 pm

Re: Fitting SQUID data

Post by dar_06 »

Excellent, many thanks, Matt. I had it in originally but removed it as I kept switching between versions 5 and 6. It makes sense why I had the error.

However, now I have a different error

Code: Select all

Error using esfit
Field S is given in Vary, but not in Sys0. Remove from Vary or add to Sys0.

But as you see from the code, field S is defined as Sys.S and not in Vary, where I have only Vary1.g and Vary1.ee. I have no Sys0 defined. Would you have any tips on this? Maybe it is again trivial, but I am just learning this and hence I may miss obvious things.

Post Reply