# Error in nscf calculation while considering Spin Orbit Coupling in Quantum ESPRESSO

I am trying to do the band structure calculation considering the Spin Orbit Coupling but getting the following error:

Computing kpt #:    92
total cpu time spent up to now is     3908.6 secs

Computing kpt #:    93
total cpu time spent up to now is     3955.6 secs

Computing kpt #:    94

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine cdiaghg (463):
S matrix not positive definite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


I have tried doing this calculation with both PAW and Ultrasoft fully relativistic pseudopotential and getting the same error in both the cases. Before it I have already done the scf calculation without any error with both the pseudopotential. I have tried increasing the plane wave cutoff too, but still getting the same error.

The link for the scf, nscf input out file is here.

I am wondering why this is happening. I have already checked for the overlap of atoms in xcrysden but I don't think that is the problem cause then scf calculation would not have been done successfully. Please suggest me how can I remove this errors as I am dealing with it for last three days.
Thank you!

• Did you try with diago_david_ndim=2? Oct 9, 2021 at 11:42
• @147875 Nope, I do not know about it. Will it resolve this issue?
– UJM
Oct 9, 2021 at 12:26
• May be, you should tweak the parameters. Read these articles QE-Developer Emails, QE bug, Research Gate. If still problem persists, try changing the diagonalization = 'cg' Oct 9, 2021 at 12:37
• @147875 Thank you for providing links. I have already read the thread from research gate link and also tried with diagonalization = 'cg'  but it didn't work for me. Let me try with diago_david_ndim=2 and revert back.
– UJM
Oct 9, 2021 at 12:48
• We have a QE chatroom in case you need to chat a lot more! Oct 9, 2021 at 16:34

In my case, changing the value of diago_david_ndim to '2' has resolved the issue for 'davidson' diagonalization.