wannier90 icon indicating copy to clipboard operation
wannier90 copied to clipboard

unexpected default behaviour: tolerance for wannerisation ignored

Open JeromeCCP9 opened this issue 3 years ago • 1 comments

Hello Wannier Developers,

we noticed that the default behaviour currently seems to be to ignore the convergence threshold for wannierisation (the input variable conv_tol), which is a little surprising because it causes the wannierisation to perform the maximum number of iterations.

This is because conv_window (the number of times the wannierisation must meet convergence criteria before being accepted as converged) is set by default to -1 in param_read().

I see that the default value for conv_window is used unless conv_noise_amp is set to some positive value or conv_window is specified explicitly. Various of the test cases do indeed explicitly specify both conv_tol and conv_window.

Isn't it a little confusing that the default behaviour is to ignore the tolerance and do a fixed number of iterations? Wouldn't it be better to set conv_window be set to a default of, say, 3 and then the behaviour is simpler?

If this is a known peculiarity/feature/issue, then of course please do close this issue directly.

Yours, with many thanks, Jerome.

JeromeCCP9 avatar Mar 01 '21 15:03 JeromeCCP9

I let @mostofi and @jryates comment, but (if confirmed, but I think you're right) I think that indeed having a sensible default for conv_tol and conv_window could be a good idea to take into account, and use the number of iterations just as a maximum to avoid infinite loops.

giovannipizzi avatar Jun 11 '21 22:06 giovannipizzi