Hybrid method in pepper for two electrons

A place to report and discuss potential bugs

Hybrid method in pepper for two electrons

Postby katarkon » Fri Oct 13, 2017 11:07 pm

If matrix method used, the pepper works fine but slow. But with hybrid methods some bugs occur although it still possible to make it working. If Sys.J is used, the pepperthrows an error.
Code: Select all
Error using resfields (line 317)
Both Sys.ee and (Sys.J,Sys.dvec,Sys.eeD) are given - use only one or the other!
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 636)
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 153)

It looks that pepper calculates ee matrix from J one but does not remove Sys.J field before calling resfieldsfunction. Here the script illustrating the problem.
Code: Select all
    clear
    Sys.S = [0.5,0.5];
    Sys.g = [2.00986,2.009967];
    Sys.J = 200;
    %Sys.ee=[200 200 200];
    Sys.Nucs = ['14N,1H'];
    Sys.A = [3.5,0;0,18];
    Sys.lwpp = [0 0.05];
   
    Exp.mwFreq = 9.452387;
    Exp.Range = [335 337];
    Exp.nPoints = 4096;
    Exp.CrystalOrientation = [0 0 0];

    Opt.Method = 'hybrid';
    Opt.Verbosity=2;
    Opt.Sparse=1;

    pepper(Sys,Exp,Opt);

If Sys.ee matrix used instead Sys.J the pepperworks fine. But if number of nuclei more then two, another error is occur.
Code: Select all
Operands to the || and && operators must be convertible to logical scalar values.
Error in E:\easyspin-5.2.2\easyspin\private\validatespinsys.p>validatespinsys (line 649)
Error in E:\easyspin-5.2.2\easyspin\resfields.p>resfields (line 316)
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 636)
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 153)

Here the script illustrating the problem.
Code: Select all
    clear
    Sys.S = [0.5,0.5];
    Sys.g = [2.00986,2.009967];
    %Sys.J = 200;
    Sys.ee=[200 200 200];
    Sys.Nucs = ['14N,1H,1H'];
    Sys.A = [3.5,0,6;0,18,0];
    Sys.lwpp = [0 0.05];
   
    Exp.mwFreq = 9.452387;
    Exp.Range = [335 337];
    Exp.nPoints = 4096;
    Exp.CrystalOrientation = [0 0 0];

    Opt.Method = 'hybrid';
    Opt.Verbosity=2;
    Opt.HybridCoreNuclei = [];

    pepper(Sys,Exp,Opt);

If add all of nuclei to Opt.HybridCoreNuclei, there are no errors. If some of the nuclei added, another error occur.
Code: Select all
Error using resfields (line 317)
Full matrices are specified in Sys.nn, so nnFrame is not allowed.
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 636)
Error in E:\easyspin-5.2.2\easyspin\pepper.p>pepper (line 153)

It looks that pepper builds wrong spin system for core nuclei.
katarkon
Resident User
 
Posts: 79
Joined: Mon Jan 12, 2015 4:01 am

Re: Hybrid method in pepper for two electrons

Postby Stefan Stoll » Sun Oct 15, 2017 10:19 pm

Thanks for reporting. These bugs are fixed in 5.2.7.
Stefan Stoll
EasySpin Creator
 
Posts: 512
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Hybrid method in pepper for two electrons

Postby katarkon » Sun Oct 15, 2017 11:12 pm

Thanks. Is there any way to grant the access to source code of EasySpin for me? Sometimes it is much faster to find a bug by myself than try to reproduce it.
katarkon
Resident User
 
Posts: 79
Joined: Mon Jan 12, 2015 4:01 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron