Unique eigenvectors for Wannier
I created a testbranch https://iffgit.fz-juelich.de/fleur/fleur/-/tree/wannier_testbranch that uses the routine to unity the eigenvectors and @dgo ran a test with it:
It seems to work quite well at least in this system. Dongwook as some concerns about the wannier centers & spread, but he said he will investigate this more. I wanted to use this issue to discuss if and how we implement this. Right now I see a few issues:
- only inversion symmetric case (should be an easy fix)
- In some (few) systems it's very hard to find a set of linear independent rows within a group of degenerate eigenvectors. I don't understand why, but if it's the case it can ruin the numerics.
I currently have 2 theories on why this happens:
- They are orthogonal with respect to the overlap matrix, but I am looking for orthogonality with the identity matrix
- I assmue degeneracy where there is none (or vice versa). But even then I should find linear independent rows, right?
I can detect this, but I don't know how to solve it.
We need to think if we want this for ScaLAPACK & ELPA and if so we should do it in a smart way.
Some tests fail if I apply this. If we do it correctly it shouldn't matter.
test_Fe_Tetra_noSYMhas a different last distance (do we care?) and the plotting one seems to check for one very specific number.
This could be triggered by linear dependent rows in my QR matrix, which then brings errors into my unitary Q matrix, that I multiply to the eigenvectors.