-
Notifications
You must be signed in to change notification settings - Fork 41
Description
When doing a calculation with Wien2k 18.2 with spin polarization and spin-orbit coupling, the symmetries generated by dmftproj are not correct.
We performed Wien2k calculations with the full BZ ("x kgen -fbz"), in order to get quantities that are already symmetric.
In python we read in the Wien2k data and when calculating lhe local Hamiltonian and the density matrix we printed the matrix and its eigenvalues before and after symmetrisation. Since the matrix is already symmetrised from us using the full BZ the symmetrisation should not change it at all. However we found that the eigenvalues were different before and after symmetrisation.
The error seems to be the sign of the "ephase factor" when the symmetries are calculated, in outputqmc.f for instance. Just reversing the sign of the variable "factor" seems to have solved the issue for cubic symmetries, but we might just have been lucky.
This is a git diff showing the changes (adding the '-'-signs) we made:
diff --git a/fortran/dmftproj/outputqmc.f b/fortran/dmftproj/outputqmc.f
index f0df75d..0122da3 100644
--- a/fortran/dmftproj/outputqmc.f
+++ b/fortran/dmftproj/outputqmc.f
@@ -755,7 +755,7 @@ C
factor=srot(isym)%phase/2.d0
C We remind that the field phase is (g-a) in this case.
C Up/up block :
- ephase=EXP(CMPLX(0.d0,factor))
+ ephase=EXP(CMPLX(0.d0,-factor))
C As a result, ephase = -exp(i(alpha-gamma)/2)
spinrot(1:2*l+1,1:2*l+1)=
= ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)
@@ -771,7 +771,7 @@ C
factor=srot(isym)%phase/2.d0
C We remind that the field phase is (a+g) in this case.
C Up/up block :
- ephase=EXP(CMPLX(0.d0,factor))
+ ephase=EXP(CMPLX(0.d0,-factor))
C As a result, ephase = -exp(-i(alpha+gamma)/2)
spinrot(1:2*l+1,1:2*l+1)=
= ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)
@@ -1302,7 +1302,7 @@ C
factor=srot(isym)%phase/2.d0
C We remind that the field phase is (g-a) in this case.
C Up/up block :
- ephase=EXP(CMPLX(0.d0,factor))
+ ephase=EXP(CMPLX(0.d0,-factor))
C AS a result, ephase = -exp(i(alpha-gamma)/2)
spinrot(1:2*l+1,1:2*l+1)=
= ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)
@@ -1318,7 +1318,7 @@ C
factor=srot(isym)%phase/2.d0
C We remind that the field phase is 2pi-(alpha+gamma) in this case.
C Up/up block :
- ephase=EXP(CMPLX(0.d0,factor))
+ ephase=EXP(CMPLX(0.d0,-factor))
C As a result, ephase = -exp(-i(alpha+gamma)/2)
spinrot(1:2*l+1,1:2*l+1)=
= ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)
This fix does nothing for the case when the user supplies their own (non-spin-diagonal) basis transformation (using the "fromfile" option in case.indmftpr).
This issue is present both in the py2_compat release, and the 3.0.0 release.