Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wannier centers inconsistent with Wannier90 when 'guiding_centres' is used. #14

Open
greschd opened this issue Aug 10, 2020 · 2 comments

Comments

@greschd
Copy link
Contributor

greschd commented Aug 10, 2020

I've encountered a case where the Wannier centers computed by Wannier90 and wannier90-utils are inconsistent. Unfortunately I'm not allowed to share the input files[*], but the root cause is that in

rv[i] = -1 * np.sum(bwv * np.imag(np.log(mii[:, i]))[:, np.newaxis], axis=0)

the np.imag(np.log(mii[:, i])) is well-defined only up to multiples of 2π.

This is the same "branch cut" problem that is worked around in Wannier90 by setting the guiding_centres=.true. option.

I'm not sure what the best approach would be here - do you think it would make sense to add a similar option that selects the closest Wannier center to a given "reference"?

[*] I'll try to come up with some other example that reproduces this behavior..

@jimustafa
Copy link
Owner

Hello @greschd. Thanks for reporting this issue. Yes, an option to specify "reference" centers, in order to fix the phases of the logarithm, seems like a reasonable approach. Been looking through the wann_phases routine in wannier90, but cannot quite understand how the phases are determined from the guiding centers. Presumably, for a set of centers, it is straightforward to compute the appropriate phases; and that this may differ from guiding_centres during the spread minimization.

@greschd
Copy link
Contributor Author

greschd commented Aug 28, 2020

I've also been looking at wann_phases, and didn't completely manage to parse it either. This e-mail thread from long ago helped somewhat: https://lists.quantum-espresso.org/pipermail/wannier/2013-November/000726.html

From what I understand so far:

  • csum(i, b) = \sum_k M_{i,i}^{k, k+b} is used to obtain a "decent guess" for the average phase of the M_{i,i}^{k,k+b}s
  • the first three (in b) xx(i, b) are chosen as -Im(log(csum(i, b))
  • the other xx(i, b) are chosen to be close to b.rguide(i)
  • that all is used somehow to update rguide(i).. I don't completely understand the logic there

This "updated" rguide is then used to compute sheet(i, b, k) = b.rguide(i), and csheet = e^{1j * sheet}.

The csheet and sheet are then used in other parts of Wannier90 (also when computing the spreads etc.).

I've played around with it a tiny bit, but haven't gotten to reproduce the same Wannier centers as Wannier90 yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants