Strange warning in pepper function

A place to report and discuss potential bugs
Post Reply
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Strange warning in pepper function

Post by katarkon »

When I try to simulate the spectrum with pepper function, a strange warning occurs occasionally

Code: Select all

Warning: None of the 1 requested eigenvalues converged. 
> In eigs>processEUPDinfo at 1338
  In eigs at 357
  In C:\easyspin-5.2.11\easyspin\resfields.p>resfields at 448
  In C:\easyspin-5.2.11\easyspin\pepper.p>pepper at 644
  In C:\easyspin-5.2.11\easyspin\pepper.p>pepper at 159
However, the spectrum is simulated and looks correct. Here the code causing the warning:

Code: Select all

clear, clf
%two weakly coupled nitronyl-nitroxides
Sys.S = [1/2 1/2];
Sys.Nucs='14N,14N,14N,14N';
Sys.A=mt2mhz([7.8 0;0 7.8; 0 7.8;7.8 0]/10);
Sys.g = [gfree; gfree];
Sys.lw = [0 0.1];
Sys.J =mt2mhz(1.0); % isotropic exchange coupling
Exp.mwFreq = 9.65;
Exp.Range = [341 347];
Exp.nPoints=4096;
Opt.Method='matrix';
Opt.Sparse=1;
pepper(Sys,Exp,Opt);
Is the warning means that the spectrum may be incorrect?
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Strange warning in pepper function

Post by Stefan Stoll »

This is a problem in Matlab's eigs function. In fact, it crashes with Matlab R2018a. Which version are you using.

The good news it that it most likely does not affect the spectrum. This diagonalization is used to get the lowest and highest energy level at zero field, to determine whether there are possible looping transitions. If there are possible looping transitions, EasySpin adjust its algorithm to account for that.

Can you set Opt.Verbosity = 2 and post the output?
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Strange warning in pepper function

Post by katarkon »

Here is the output with Opt.Verbosity=2

Code: Select all

  single spin system
    component 1: 1 isotopologues
=begin=pepper=====20-May-2018 08:47:25=================
  log level 2
-general-----------------------------------------------
  system with 6 spin(s) and 324 states
  field sweep, mw frequency 9.65 GHz
  frequency 9.65 GHz, field range [341 347] mT, 4096 points
  harmonic 1,  mode
  no temperature
-orientations------------------------------------------
  powder sample (randomly oriented centers)
  automatic determination of symmetry group and frame
  O3, non-tilted frame
  region: north pole (single point)
  1 orientation (1 knot)
-resonances--------------------------------------------
  method: field sweep, adaptive segmentation (state space)
  -entering resfields*----------------------------------
  microwave polarization mode: linear
  mode angles: k tilt 90 deg, polarization angle 90 deg
- Preparations
  using sparse matrices
  full treatment of all nuclei
Warning: None of the 1 requested eigenvalues converged. 
> In eigs>processEUPDinfo at 1338
  In eigs at 357
  In D:\easyspin-5.2.11\easyspin\resfields.p>resfields at 448
  In D:\easyspin-5.2.11\easyspin\pepper.p>pepper at 644
  In D:\easyspin-5.2.11\easyspin\pepper.p>pepper at 159
  In biNIT at 15 
  ## maximum splitting at zero field: 71.5692 MHz
  no looping transitions possible
- Transition pre-selection
  362 transitions pre-selected
- Broadenings
  no strains specified
- Resonance data: computing positions, intensities
  ## modelling accuracy 0.019 MHz, max slope 28.0373 MHz/mT
   segmentation finished, 2 segments
  ## 362 resonances total from 362 level pairs
  ## all resonances above relative intensity threshold 0.000100
  ## 362 resonances left
  ## 362 transitions fully in range
  362 significant transitions with resonances in range
  ## diags 3  resonances 362  oris 1
  ## diags/field 0.008287  diags/ori  3  fields/ori 362
  ## Hamiltonian rediagonalised for 8 resonances (2.210%)
  ## minimum state stability encountered 2.000000
  ## resonances min 342.03 mT, max 346.639 mT
  ## amplitudes min 0.000147666, max 0.172994
  -exiting resfields*-----------------------------------
-absorption spectrum construction----------------------
  summation, isotropic case
  interpolation off
  spectrum array size: 1x4096 (summed)
-final-------------------------------------------------
  harmonic 1: using convolution
  convoluting with Lorentzian, FWHM 0.1 mT, derivative 1
cpu time 0h0m4.430s
=end=pepper=======20-May-2018 08:47:30=================
The version of Matlab is R2012b.
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Strange warning in pepper function

Post by Stefan Stoll »

You can disregard this warning. The result is correct (no looping transitions). We will try to increase the stability of this in the next release.

Also, MathWorks just confirmed that the crash I see with your script in R2018a is actually a bug of eigs(). That's a rare day when one finds a bug in the linear-algebra core code of Matlab!
Post Reply