-
Notifications
You must be signed in to change notification settings - Fork 0
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
SelfConsistentHubbardWorkChain
: Missing relabeling when skipping relaxation
#61
Comments
I don't really understand what's the problem you're facing. When the |
The So my point was that I would only update the |
I see the issue but I don't think the probelm is |
We were actually talking about the same logic. I just misread the outline and thought that This being said, I totally agree to reimplement this logic in a function and call it in the two scenarios accordingly. If you don't mind, I can open a PR to do so. Sorry for the confusion! P.S.: I updated my initial comment accordingly. |
Sure, please, go ahead, thanks ! |
Fixes #61 The `ctx.current_hubbard_structure` is not relabeled in `SelfConsistentHubbardWorkChain` if `skip_relax_iterations != 0`. This can cause problems in the subsequent `PwRelaxWorkChains` if new types are introduced. Therefore, the relabeling step is moved to a separate method that is called in any case. Co-authored-by: Lorenzo <[email protected]>
In case one makes use of the
skip_relax_iterations
input, the convergence check is skipped for those iterations as well. In the current logic, the newHubbardStructure
is already updated in advance, without relabeling the initialHubbardStructure
.aiida-quantumespresso-hp/src/aiida_quantumespresso_hp/workflows/hubbard.py
Lines 579 to 580 in 31ae4e9
I'm not sure why this is done prior to thisif
-statement:aiida-quantumespresso-hp/src/aiida_quantumespresso_hp/workflows/hubbard.py
Lines 581 to 583 in 31ae4e9
@bastonero would be great to briefly explain this.Since the currentHubbardStructure
is already updated, the relabeling step won't be triggered:aiida-quantumespresso-hp/src/aiida_quantumespresso_hp/workflows/hubbard.py
Lines 605 to 611 in 31ae4e9
I think this is the source of an error that I'm currently facing, as the
HUBBARD
-card in QE contains 4 different U-values but there is still only one kind in theHubbardStructure
. Please correct me if I'm wrong with this assumption.Edit: Therefore, the relabeling should also be performed in these cases.
Depending on the reasoning behind not including the update of theHubbardStructure
in the second if statement, I would suggest to include it there, as this should resolve the issue. In case it is needed in the current logic, we should add something so that the relabeling is always done.The text was updated successfully, but these errors were encountered: