Page 1 of 1

CF parameters bug

Posted: Sat Jun 30, 2018 2:22 am
by MPerfetti
Dear Stefan,
I am trying to simulate the ChiT (2-300K) and magnetization (0-5000mT) of a single lanthanide centre using curry.
It works for many combinations of CF parameters but if I try the following:

Code: Select all

Sys.S=15/2;
Sys.g=4/3;
Sys.B2=0.2032*30000;
Sys.B4=[7.1e-3 0 0 0 7.7e-3 0 0 0 0]*30000;
Sys.B6=1.92e-5*30000;
It does not.
In fact the chiT and M values are (exactly?) half of the expected value.
I tried with different spin values and g factors (= different lanthanides) and I always get the same wrong value, that is half of the expected one (e.g. for Dy3+ the curie constant is 14.17 and I get 7.07).
It seems that the error disappears if you don't use B4 and/or B6. It also disappears if the value of B6 or B4 is set below a certain threshold.
The energy level diagram is instead calculated correctly for all the combinations, so it does not seem to be a problem of matrix diagonalization.

Thanks a lot for your time,

Mauro

Re: CF parameters bug

Posted: Sat Jun 30, 2018 11:29 am
by Stefan Stoll
This is curious, because curry does not use these parameters other than setting up the spin Hamiltonian.

Please post a complete script that show the problems.

Also, make sure the B4 and B6 definitions in EasySpin match the ones you are expecting.

Re: CF parameters bug

Posted: Sun Jul 01, 2018 5:30 am
by MPerfetti
Dear Stefan,
I attach hereafter the code that I used, that is very simple.
I already checked that the parameters used in easy spin are in fact expressed in the formalism that I use (I checked both the eigenvalues and eigenvectors comparing with a program that I wrote in FORTRAN 90 and the matrix representations of the operators using stev).

Code: Select all

Sys.S=15/2;
Sys.g=4/3;
Sys.B2=0.2032*30000;
Sys.B4=[7.1e-3 0 0 0 7.7e-3 0 0 0 0]*30000;
Sys.B6=1.92e-5*30000;
Exp.Field = 100; %mT
Exp.Temperature = 2:0.5:300; %K
[mu,chi] = curry(Sys,Exp);
calcchizz_cgs=chi/(4*pi*1e-6);
chitt=Exp.Temperature.*calcchizz_cgs;
plot(Exp.Temperature,chitt, 'k', 'Linewidth',2)
As I already explained you can vary the spin and the g factor and it always produces a wrong simulation.
For the magnetization I use an analogue code (just fixing T and varying the field). I get results that are consistent with the simulation of chiT.

Thanks,
Mauro

Re: CF parameters bug

Posted: Tue Jul 17, 2018 12:15 am
by Stefan Stoll
This appears to be a bug, curry performs an incomplete powder average. Thanks for reporting!

To work around it, use

Code: Select all

Opt.Symmetry = 'D2h';  % or 'C2h' or 'Ci'
Opt.SymmFrame = [];
curry(Sys,Exp,Opt);
We will fix this bug in the next bugfix release.

Re: CF parameters bug

Posted: Tue Jul 17, 2018 3:56 pm
by Stefan Stoll
This bug is fixed in 5.2.20, which is available now.

It was caused by a missing factor of 2 in the weights used in the powder average for this particular symmetry of spin Hamiltonian (D4h).

Re: CF parameters bug

Posted: Thu Jul 19, 2018 6:18 am
by MPerfetti
Thanks for the new version!
I noticed that it was something related to powder average because the single crystal simulations worked fine.