nucspinadd error in version-6.0.0-dev.19

A place to report and discuss potential bugs
Post Reply
fhecker
Newbie
Posts: 3
Joined: Wed Jan 08, 2020 4:15 am
Location: Goettingen, GER

nucspinadd error in version-6.0.0-dev.19

Post by fhecker »

Hey,

there appears to be a bug using nucspinadd in easyspin version 6.0.0-dev.19. Adding a nucleus with a nonzero quadrupole coupling to a spinsystem of S=1/2 coupled to two or more nuclei without quadrupole coupling as shown in the example:

Code: Select all

clear
Sys.S=1/2;
Sys.g = [2.0054 2.0042 2.0022];
Sys = nucspinadd(Sys,'1H',[1 1 1]);
Sys = nucspinadd(Sys,'1H',[1 1 1]); 
Sys = nucspinadd(Sys,'17O',[1 1 1],[],[1 1 1],[]); 
results in the following error message:

Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second
matrix. To perform elementwise multiplication, use '.*'.

Error in nucspinadd>@(T)T(:)./(4*I.*(2*I-1))*[-1,-1,2]


This problem does not occur in the easyspin version 5.2.27.
It also does not occur if you add the nucleus with quadrupole coupling to the spinsystem first, as shown here:

Code: Select all

clear
Sys.S=1/2;
Sys.g = [2.0054 2.0042 2.0022];
Sys = nucspinadd(Sys,'17O',[1 1 1],[],[1 1 1],[]);
Sys = nucspinadd(Sys,'1H',[1 1 1]);
Sys = nucspinadd(Sys,'1H',[1 1 1]); 
Best,
Fabian
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: nucspinadd error in version-6.0.0-dev.19

Post by Stefan Stoll »

This is a bug - thanks for reporting. It will be fixed in 6.0.0-dev.20.
Post Reply