Fix in vlplot: make CurrentShader and DensityShader work with multiple states #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This completes #140 by adding support for multiple states in current and density shaders. Thanks to @fernandopenaranda for the heads up!
This PR also tries to make CurrentShader more correct in open systems. In doing so I realized we have a serious problem here: we cannot compute currents across unit cell boundaries from the Bloch eigenstate alone. We also need its Bloch phases. Solving this issue requires some thought about design (e.g. what information should we store and provide about a generic eigenstate?), so I do not attempt to fix that here. For the moment, therefore, be aware that current density plots is not going to be correct in open systems.
This also introduces a stopgap fix for a problem also reported by @fernandopenaranda:
It it not worthwhile to dig deeper into this issue to make a better fix than the one included here, as there is a pending refactor of the bandstructure machinery that will make the corresponding code obsolete