-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add support for electron-phonon calculations #828
base: main
Are you sure you want to change the base?
Conversation
Blocked by #824 for now (that needed to be fixed in order to test these new features). Once that is merged I'll add some tests if we agree on the implementation. |
35d355e
to
d674b7b
Compare
19434b3
to
c490196
Compare
Make several changes in the plugins for `ph.x`, `q2r.x` and `matdyn.x` to provide support for electron-phonon calculations: * Adapt the `prepare_for_submission` scripts to allow remote copying of the `elph_dir` for both plugins in case `la2F` is set to true. * Add support to the `MatDynCalculation` plugin for setting `dos` to true, and in this case converting the `kpoints` input to the `nkX` tags instead of providing them as a list. * For `matdyn.x` calculations where `dos` is true, parse the phonon DOS instead of the phonon bands, and provide this as an output. * For the `MatdynCalculation` plugin, providing the `parent_folder` input currently only makes sense for electron-phonon calculations, so a validator is added to check this. The remote copy/symlink list is also overriden by the `elph_dir` to avoid adding it to the default `out` directory of the `NamelistsCalculation`, which is typically no longer required for the `matdyn.x` step.
c490196
to
5b775af
Compare
@@ -55,11 +62,20 @@ def _validate_inputs(value, _): | |||
if 'parameters' in value: | |||
parameters = value['parameters'].get_dict() | |||
else: | |||
parameters = {} | |||
parameters = {'INPUT': {}} |
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.
Note that if the parameters
contains an empty dict, this will now fail. Rather initialize empty dict and ensure the INPUT
sub dict is there in both bases
parameters = {'INPUT': {}} | |
parameters = {} | |
parameters.setdefault('INPUT', {}) |
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.
That said, if the user provides an empty Dict
node for parameters
, they might as well have not provided the input (cleaner provenance). So perhaps we should validate that the INPUT
key is in the parameters
input instead?
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.
See f659d2c
Fixes #825
Make several changes in the plugins for
ph.x
,q2r.x
andmatdyn.x
to providesupport for electron-phonon calculations:
prepare_for_submission
scripts to allow remote copying ofthe
elph_dir
for both plugins in casela2F
is set to true.MatDynCalculation
plugin for settingdos
totrue, and in this case converting the
kpoints
input to thenkX
tags instead of providing them as a list.
matdyn.x
calculations wheredos
is true, parse the phonon DOSinstead of the phonon bands, and provide this as an output.
MatdynCalculation
plugin, providing theparent_folder
inputcurrently only makes sense for electron-phonon calculations, so a
validator is added to check this. The remote copy/symlink list is also
overriden by the
elph_dir
to avoid adding it to the defaultout
directory of the
NamelistsCalculation
, which is typically no longerrequired for the
matdyn.x
step.