Since the interaction energy is a function of an external variable, the distance r, I introduced that into my system structure, along with the ξ and η angles. Then I created a system of two S=1/2 spins (
Sys.S=[1/2 1/2]
) and used a custom function to calculate the interaction matrix as is described in the paper. This function also fixes their gx/y/z and their gStrainx/y/z parameters to the same values during fitting, since they are supposed to be similar. It took some time to type in the matrix elements, but it works very well and the results make sense.Now, I want to introduce a second system, comprising a single spin. The reason I need a separate system is that the dipole-inetracting pair and the isolated spin have different relaxation times, i.e. different intensities, and I need to adjust this through their weights in Easyspin. So I made
Sys1.S = [1/2 1/2]
and Sys2.S = 1/2
, but I have trouble introducing both Sys1 and Sys2 into my custom function.When I try:
Code: Select all
function [x,y] = custom({Sys1,Sys2},Exp,Opt)
fullSys = {Sys1,Sys2};
etc...
Is my approach valid for Easyspin? Should I use another approach, e.g. calculate the dipole-pair matrix in my custom function first and then include the second system in the main script?Error using nargout
Error: File: custom.m Line: 1 Column: 38
Unbalanced or unexpected parenthesis or bracket.
Error in esfit (line 151)
Error in S12_S12_S12_dipolar (line 77)
esfit('custom',spc,{Sys1,Sys2},{Vary1,Vary2},Exp,[],FitOpt);
Thanks for the help!