Open epolack opened 1 year ago
Huh, yes, there's no reason this should work actually. The place to fix this is in workarounds/forwarddiff, where the overload for Get_symmetry just ignores the variations of lattice and positions. It should instead return only those symmetries that are also preserved by the variations. Since I don't think spglib exposes this, we can either do it manually, or maybe deform by a finite amount and check. The use in stresses though is valid, so we need a flag to ignore this at model creation
https://github.com/JuliaMolSim/DFTK.jl/pull/819 is what I mean (untested and don't have time to polish it now)
I expect the same results for all cases, especially because there is only one
k
-point. But AD with symmetries on shows wrong result (does not improve at all with biggerEcut
).