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

Order of projections in nnkp file #463

Open
stepan-tsirkin opened this issue Feb 1, 2024 · 2 comments
Open

Order of projections in nnkp file #463

stepan-tsirkin opened this issue Feb 1, 2024 · 2 comments

Comments

@stepan-tsirkin
Copy link
Collaborator

I noticed that if I specify projections in one line for one atom, the order is not strictly preserved.

Say, if I put Fe:s;p or Fe:p;s - then I get the same : the s orbitals come in the nnkpt file first, and then the p's .Looks like the code orders projections by the number l. Accordingly, the hybrids come first (because the are associated with negative l)

Only if I give two lines, like

Fe:p
Fe:s

then I get p's first, s last

So, my questions are

  1. is this intended (if anyone remembers that)
  2. is this behavior documented (I did not hind such in the projections section of the user guide)

The order of projections is important in some cases, e.g. in the symmetrization of the Wannier Hamiltonians.

@jryates
Copy link
Member

jryates commented Feb 1, 2024

I think I coded that bit. It was a long time ago. It wasn't a conscious decision - and it won't be documented. At the time I would have assumed that the order of the projection in the nnkp was unimportant. We could maybe change the code such that the projections are written in a fixed way which doesn't depend on how they are specified in the win file.

Is the reason this is relevant is that you are assuming that the final WF have the symmetry of the initial projections - and are ordered in the same way as the nnkp file? That's not guaranteed to be true - although perhaps in practice is often is.

@stepan-tsirkin
Copy link
Collaborator Author

I think I coded that bit. It was a long time ago. It wasn't a conscious decision - and it won't be documented. At the time I would have assumed that the order of the projection in the nnkp was unimportant. We could maybe change the code such that the projections are written in a fixed way which doesn't depend on how they are specified in the win file.

Thanks for clarifying. I would say, any order is fine as long as it is documented. I understand that order of projections was not considered important at that time.

Is the reason this is relevant is that you are assuming that the final WF have the symmetry of the initial projections - and are ordered in the same way as the nnkp file? That's not guaranteed to be true - although perhaps in practice is often is.

Yes, we rely on this in the case of 0 iterations on maximal localization procedure, so just disentanglement+projections. I guess in that case the Wannier functions should transform in the same way as projections, at least approximately.

Of course, maximal localization procedure may land anywhere, e.g. it can often form sp3 hybrids when starting from pure s and pure p.

@jryates jryates self-assigned this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants