Two spin systems in a custom function
Posted: Thu Jul 21, 2016 2:43 am
I have written a script that fits pairs of spins that interact through dipolar interaction using the model in T.D. Smith, J.R. Pilbrow, Coord. Chem. Rev. 1974, 13, 173-278 (http://dx.doi.org/10.1016/S0010-8545(00)80255-6), equation 14.
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 (
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
When I try:
It seems that the custom function is not ready to accept two systems:
Thanks for the help!
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!