Still problems with variable cell and hybrid functionals

I have noticed that computing the stress when using both hybrid functional and smearing gives bad results. See the attached input file. Vc-relax calculation never converges, while the total stress oscillates between a few high positive values.

al.in Al.pz-vbc.UPF al.out

For "fake" metals this bug does not appear as long as the smearing is much smaller than the band gap, which indicates that it is the fractional occupancies that cause it. I.e. in the following Silicon example you have troubles for smearing=0.5 but not for 0.05

pw.in

After more testing, I noted that stress does not work in many other cases, even without smearing. The following example shows a very quick vc-relax calculation that never converges because stress is inconsistent with energy. The same problem occurs when using K_POINTS gamma or "1 1 1 0 0 0" pw-gamma.in

My impressions is that there is some small inconsistency between energy and stress, and when the k-points grid is not well converged vc-relax does not converge. I do not know if this is pathological and just the way it works with EXX, or if it could be improved.

Edited by giannozz