waring message with quanty version autumn 2022

asked by Marie-Anne Arrio (2022/11/02 18:37)

With the last version (autumn 2022), I get the following warning (not appearing with the previous version): “Eigensystem called with an operator that is not fully Hermitian Strongly sugested to stop the calculation and repair this”

My script is calculating XAS/XMCD at L2,3 edges for Fe3+ in C3v symmetry including MLCT. It was running without any warning message with the previous version.

Best regards

MarieAnne

Answers

, 2022/11/04 04:07

Hi Marrie Anne,

I am not certain about the version issue, but I can at least help you address the error. I've ran into this before when using the TB Hamiltonian coming from created from FPLO's output. Sometimes there can be small non-Hermitian elements of the TB Hamiltonian which cause it to raise that error. If you have the chance, can you print it out in matrix form using

  print(OperatorToMatrix("Your Hamiltonian"))

and paste the output here?

Sincerely, Charles Cardot

, 2023/02/13 17:22

Hi Charles, sorry I did not see your answer. I checked that the matrix is hermitian using mathematica. Here is the matrix with the line you indicated. Thanks for your help { { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,

{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , -0.21512873445122 , 0 , 0 , 0 , 0 , 0 , -1.9940411229461 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , -0.31437624481707 , 0.05 , 0 , 0 , 0 , 0 , -1.9940411229461 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.05 , 1.1502475103659 , 0 , 0 , 0 , 0 , 0 , 1.9940411229461 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1.101 , 0.061237243569579 , 0 , 0 , 0 , 0 , 1.9940411229461 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.061237243569579 , -1.7243762448171 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.1 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , -1.7236237551829 , 0.061237243569579 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.1 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , -1.9940411229461 , 0 , 0 , 0 , 0 , 0.061237243569579 , 1.101 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , -1.9940411229461 , 0 , 0 , 0 , 0 , 0 , 1.1517524896341 , 0.05 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1.9940411229461 , 0 , 0 , 0 , 0 , 0.05 , -0.31362375518293 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.4 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1.9940411229461 , 0 , 0 , 0 , 0 , 0 , -0.21287126554878 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.4 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 0 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 0 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , -0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.8 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 0 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 0 } , 
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.56568542494924 , 0 , 0 , 0 , 0 , 0 , 0.4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 4 } }

warning: input_theta_0.0000_phi_0.0000_mag_field_6.50.lua:947: Eigensystem called with an operator that is not fully Hermitian Strongly sugested to stop the calculation and repair this

, 2023/02/13 17:52, 2023/02/13 17:53

Dear Marie-Anne

If you add the comment print( H - ConjugateTranspose(H) ) you should see the non-hermitian elements.

The last version is compiled with the option -Ofast, which was not ok as it leads to problems with accuracy on the 10^-16 level. I need to repair this as the complaint now is mostly about errors on the 10^-16 level.

The solution is to state H = H/2 H = H + ConjugateTranspose(H)

Maurits

You could leave a comment if you were logged in.
Print/export