-
Notifications
You must be signed in to change notification settings - Fork 14
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
FIX: Running PDOS for spin-polarised system #206
Conversation
c56a4e3
to
0d5ffdd
Compare
Hi @mbercx, thanks for this fix. I find another issue that when running the test on an oxygen structure with the setting It is caused by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbercx thanks. I still running some tests on your branch. all looks good to me but some minor questions.
Yeah, this is a known issue, but needs to be fixed in the plugin. Thought I already opened an issue for this, but apparently not. Will do so now. |
0d5ffdd
to
0cb784c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbercx Thanks! I still have some minor questions. Bit almost there I think.
0cb784c
to
989ff63
Compare
Hmm, it seems to fail to initialize the pre-commit env. I'm also having this issue locally... |
I think it relates to the issue ContinuumIO/anaconda-issues#12094 (comment). I encountered it also in my aiida-sssp-workflow repo, add |
@csadorf do you know which cause this pre-commit issue? |
Remove workaround, after problem described in #206 (comment) is resolved.
Remove workaround, after problem described in #206 (comment) is resolved.
- Remove workaround, after problem described in #206 (comment) is resolved. - new psf/black version for issue psf/black#2964 (comment)
- Remove workaround, after problem described in #206 (comment) is resolved. - new psf/black version for issue psf/black#2964 (comment)
Hi @mbercx, the pre-commit issue is temporarily fixed, can you update the branch and try it again. I think there is a minor issue with code which cause other pre-commit fail that is,
|
Hi @mbercx, could you have a look and we finish this PR these days? should be nothing to add and block it. I force push with rebase the latest master branch, hope you don't mind. |
Currently it is not possible to calculate the PDOS for a spin-polarised system (i.e. setting Magnetism to Ferromagnetic), since the `QeAppWorkChain` expects the `projections` output from the `PdosWorkChain`. However, for spin-polarised systems the `ProjwfcCalculation` returns two outputs: `projectsion_up` and `projections_down`. Here we adapt the `QeAppWorkChain` to check for the `projections_up` output, and in case it is present it will add both `projections_up` and `projections_down` to the outputs. Otherwise it will only add the `projections` output (both only in case the `workchain_pdos` was actually run). To deal with plotting the corresponding (P)DOS, we simply add the total DOS up and down states together, and separately add the PDOS orbitals for the up and down states to the list passed to the `widget-bandsplot`. Since the widget currently adds all the PDOS of the same orbital types (s, p, d, f) together, there will currently not be any differentiation between the up and down states in the visualization. This is something that will need to be improved on the widget side.
for more information, see https://pre-commit.ci
989ff63
to
0ab6d21
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mbercx, looks all good.
Fixes #202
Currently it is not possible to calculate the PDOS for a spin-polarised
system (i.e. setting Magnetism to Ferromagnetic), since the
QeAppWorkChain
expects theprojections
output from thePdosWorkChain
. However, for spin-polarised systems theProjwfcCalculation
returns two outputs:projections_up
andprojections_down
.Here we adapt the
QeAppWorkChain
to check for theprojections_up
output, and in case it is present it will add both
projections_up
andprojections_down
to the outputs. Otherwise it will only add theprojections
output (both only in case theworkchain_pdos
wasactually run).
To deal with plotting the corresponding (P)DOS, we simply add the total
DOS up and down states together, and separately add the PDOS orbitals
for the up and down states to the list passed to the
widget-bandsplot
.Since the widget currently adds all the PDOS of the same orbital types
(s, p, d, f) together, there will currently not be any differentiation
between the up and down states in the visualization. This is something
that will need to be improved on the widget side.