### eig66: Keep the gauge consistent by storing eig.hdf

Eigenvectors are gauge-dependent: The eigenfunction of a non-degenerate energy eigenvalue is defined only up to a phase. The physical content of an eigenvector is not modified by multiplying it with an arbitrary phase factor. For a subset of degenerate eigenfunctions any linear combination taken from this subset is an eigenfunction as well. The phase conventions used to define this gauge of the eigenvectors in e.g. the LAPACK subroutines, which compute the eigenvectors, may yield very different eigenvectors on different computers. Sometimes the gauge is so sensitive to fine details that it is quite hard to reproduce eigenvectors with the same gauge in consecutive runs of fleur even on the same computer with the same parameters.

The matrices WF1.mmn, WF1.amn depend on this gauge. Similarly, many other matrices such as WF1.uHu and WF1.socmmn0 depend on this gauge.

Imagine now the following situation: You computed WF1.mmn and WF1.amn and from this the MLWFs. One week later you think: I would like to compute the orbital magnetization in this system. For the orbital magnetization from Wannier interpolation you need the WF1.uHu file. The WF1.uHu file depends on the gauge of the eigenfunctions and therefore you would need to start from scratch: You would need to compute WF1.mmn, WF1.amn, and WF1.uHu in the same run of the program to make sure that the same eigenvectors are used for all three matrices. Then you would need to recompute the MLWFs using wannier90.x. And then you could use postw90.x to compute the orbital magnetization.

For huge systems it may therefore be better to store the eigenvectors in the eig.hdf file when generating the WF1.mmn and WF1.amn files. When you want to compute e.g. the WF1.uHu later, you may read in the eigenvectors from eig.hdf.

In order to write out the eig.hdf file while generating the WF1.amm and WF1.mmn files run fleur_MPI as follows:

fleur_MPI -eig hdf


In order to read in the eigenvectors stored in the eig.hdf file add eig66='T' to the line output in the inp.xml file.

By default, eigenvectors are not written to file by fleur. The reasons are: Writing this often huge file slows down the calculation. In the self-consistency cycle the eigenvectors are not needed on file. Since this file can be huge it also uses considerable disk space.

Whether you should write out eig.hdf when generating MLWFs depends on your plans. If you only need the MLWFs and nothing else, there is no need to write the eig.hdf file. If you want to use Wannier interpolation to compute e.g. orbital magnetization and spin Hall effect, it may be an advantage to write out the eig.hdf file. If you always know at the beginning which files you will need later, you do not have to write the eig.hdf file. However, if later you need an additional gauge-dependent file for Wannier-related calculations you would need to start from scratch as discussed in the above example. Not writing the eig.hdf file saves disk space. However, the Wannier-related files WF1.mmn, WF1.amn and WF1.chk are quite big as well for huge systems. During the self-consistency cycle the eig.hdf file is often the largest file. However, in MLWF calculation the eig.hdf file is often not the largest file. Keeping the eig.hdf file in Wannier-related calculations may therefore be an option for you, when you have many Wannier-related plans for a given system.