-
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
PwCalculation
: Fix restart validation for nscf
/bands
#906
Conversation
532cfd8
to
69a67c0
Compare
warnings.warn(f'`restart_mode` should be set to `from_scratch` for a `{calculation_type}` calculation.') | ||
elif 'parent_folder' in value: | ||
# If a `parent_folder` input is provided, make sure the inputs are set to restart | ||
if 'parent_folder' in value and calculation_type not in ('nscf', 'bands'): |
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.
Shouldn't an scf
calculation also not have "some" restart parameters if a parent_folder
is specified? Why only nscf
and bands
? What is the use case for restarting an scf
calc from_scratch
and without reading the CD from file?
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.
Got confused myself here again. Note the not in ('nscf', 'bands')
, i.e. this check is only done for other calculation types. The reason is that for nscf
and bands
, the default of ELECTRONS.startingpot
changes to 'file'
, see:
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.
Still not sure about the logic though. Why would there only have to be validation for anything but nscf
and bands
? For example, if the user specifies bands
but then ELECTRONS.startingpot = 'atomic'
, surely that should also emit a warning then?
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.
Sure, that'd be another validation we can do. Much less likely use case though, someone what assigns a parent folder and then specifically sets ELECTRONS.startingpot = 'atomic'
might be up to some weird business that actually requires this input.
09fb3cb
to
b046982
Compare
For interrupted runs, restarting from a previous `nscf`/`bands` run with `CONTROL.restart_mode` set to `restart` is a valid use case. Here we remove the validation that raised a warning when the user tried to restart an interrupted run with this input.
b046982
to
57a1f48
Compare
Fixes #905
For interrupted runs, restarting from a previous
nscf
/bands
run withCONTROL.restart_mode
set torestart
is a valid use case. Here we remove the validation that raised a warning when the user tried to restart an interrupted run with this input.