-
Notifications
You must be signed in to change notification settings - Fork 82
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
from_scratch for bands calculation #891
Conversation
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 @unkcpz . I agree that this change is correct (QE docs say not to use restart
for non-scf calculations https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm65). Just please remove the print statement
@@ -168,6 +168,7 @@ def validate_inputs_base(value, _): | |||
if parameters.get('ELECTRONS', {}).get('startingpot', 'file') != 'file': | |||
return f'`startingpot` should be set to `file` for a `{calculation_type}` calculation.' | |||
if parameters.get('CONTROL', {}).get('restart_mode', 'from_scratch') != 'from_scratch': | |||
print(parameters) |
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.
print(parameters) |
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.
Ah, okay. Please ignore my comment. I write it at the same time as your comment.
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.
Removed.
I also make a mistake by pushing directly to main
. Hopefully, (and please pretend) you didn't notice @sphuber 😿
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.
@@ -168,6 +168,7 @@ def validate_inputs_base(value, _): | |||
if parameters.get('ELECTRONS', {}).get('startingpot', 'file') != 'file': | |||
return f'`startingpot` should be set to `file` for a `{calculation_type}` calculation.' | |||
if parameters.get('CONTROL', {}).get('restart_mode', 'from_scratch') != 'from_scratch': | |||
print(parameters) |
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.
I print here and it shows the parameter is set to "restart", I don't know where this is set from.
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.
Is this still true? Or is the value now actually correctly getting set to from_scratch
? I am confused whether this is now working as intended and fixes the issue
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.
Yes, it is now working. I test locally and the warning disappeared. More importantly, the restart_mode
of band calcualtion is from_scratch
if check from the remote folder.
3d056d9
to
4854aa7
Compare
I remain somewhat opposed to the approach of setting/overriding inputs inside the steps of the work chain in case it can be avoided. A couple of thoughts:
@sphuber @unkcpz if you agree, I can work on a PR that implements these concepts more broadly for the |
Thanks @mbercx, please go ahead. I agree the interface needs to be more unified and better to be only in one place for all override changes. |
Another reason to put these inputs in the protocol instead: the builder repr now looks like this: Process class: PwBandsWorkChain
Inputs:
bands:
metadata: {}
pw:
code: Plane wave Quantum ESPRESSO v7.2 - local compilation
metadata:
options:
max_wallclock_seconds: 43200
resources:
num_machines: 1
stash: {}
withmpi: true
monitors: {}
parameters:
CONTROL:
calculation: scf
<...> So it looks like we'd actually be running an |
See #902 |
Superseded by #902 |
fixes #877