TRIQS / dft_tools

Interface to DFT codes
https://triqs.github.io/dft_tools
Other
40 stars 38 forks source link

Incorrect reordering of orbital and spin for SOC in Wannier90Converter #215

Closed phibeck closed 1 year ago

phibeck commented 2 years ago

Description

There are two problems in the current version of the Wannier90Converter when using spin-orbit coupling:

  1. there is no check on the orbital order that was used in Wannier90. The default of (u,d) results in wrong results.
  2. it currently reorders orbitals incorrectly for more than one impurity

Steps to Reproduce

When using a Wannier90 Hamiltonian with:

  1. projections defined as (u,d)
  2. n > 1 impurities

Expected behavior:

  1. Ideally, it should check the projections from the seedname.nnkp file to reorder only if necessary.
  2. The reordering should occur for each site individually, not globally.

Actual behavior: Everything gets reordered as one big impurity, and irrespective of whether the orbital ordering was already correct.

Versions

Unstable branch of dft_tools.

Thank you Olivier Gingras for reporting. @merkelm - should we read seedname.nnkp to remove this risk?

merkelm commented 2 years ago

Thanks @phibeck for the report and the discussions! The current implementation works well for Vasp+Wannier90, where the orbitals seem to be ordered differently than in QuantumEspresso+Wannier90. I will implement a flag to switch between the two behaviors. Reading the nnkp file would not help here because in the Vasp+Wannier90 workflow, the order in the nnkp file does not seem to correspond to the order in, e.g., the _hr.dat file.

the-hampel commented 1 year ago

Can we close the issue now? Or should we think about a more advanced solution reading the orbital order from that output file for each code? If I understand correctly we could try to read this from the nnkp file?

phibeck commented 1 year ago

I think we can close it for now. It would be some effort to read it in and for most cases it's probably not necessary, although there would definitely be some benefit to checking it somehow. For now it's entirely up to the user to make sure this is all in order, which can get cumbersome for larger systems in particular.

the-hampel commented 1 year ago

Okay thanks than I will close it for now