-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement common bands work chain for Quantum ESPRESSO #257
base: master
Are you sure you want to change the base?
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 @mbercx . Gave a first pass. I see the problem of the clean_workdir
, but not yet sure if we should add this to the generator. It feels like there may be a better solution, but have to think about it some more.
aiida_common_workflows/workflows/bands/quantum_espresso/generator.py
Outdated
Show resolved
Hide resolved
aiida_common_workflows/workflows/bands/quantum_espresso/generator.py
Outdated
Show resolved
Hide resolved
aiida_common_workflows/workflows/bands/quantum_espresso/generator.py
Outdated
Show resolved
Hide resolved
aiida_common_workflows/workflows/bands/quantum_espresso/generator.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Sebastiaan Huber <[email protected]>
builder_calc.pop('kpoints') | ||
builder_common_bands_wc.pw = builder_calc | ||
builder = self.process_class.get_builder() | ||
|
||
parameters = builder_common_bands_wc.pw.parameters.get_dict() |
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.
few more instances of builder_common_bands_wc
lying around. Would be good if you could try to run it at least once in absence of unit tests.
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.
Huh, I think this is only in e81a8e2, in the latest commit (2e298cb) this should be fixed. It seems I was a little careless in accepting the reorganisation of the builder code however, I fixed this in c1d0695. Now I tested the relaxation + bands work chain for Si, and it seems to be running fine again.
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 must have seen it after that first commit. Then I haven't said anything :D
@mbercx thanks for the implementation. It looks great. |
Thanks for the comments, @bosonie!
I see your point, and I agree. I also think adding engine-specific code in the higher-level work chains is not the best approach because ideally we would be able to make anything but the "base" common work chains completely code-agnostic. I'm not sure if we'll be able to achieve this though. Already the issue on how to define the number of unoccupied bands might be tricky to define in one inputs for the
Overrides will definitely help, but then either the user or the higher-level work chain needs to be aware of having to set
I'd vote against this because of my experience with running a lot of calculations in high-throughput. If you forget to set However, perhaps it is not unreasonable to make |
@mbercx you are actually right. Not bad to make |
Implementation of the common bands work chain for Quantum ESPRESSO. A couple of notes:
PwBandsWorkChain
in theaiida-quantumespresso
plugin, we have annbands_factor
input, which simply increases the number of bands based on the default from the SCF calculation.remote_folder
output to theQuantumEspressoCommonRelaxWorkChain
so this can be passed to the input generator of theQuantumEspressoCommonBandsWorkChain
. However, there is another issue here, related to the fact that by default the protocol will setclean_workdir
toTrue
for thePwRelaxWorkChain
, which means the folders will be cleaned. I now added another input to the generator for the QE relax work chain, but I'm not sure if this is the best approach since it changes the interface? Probably having access to the inputs via overrides might be preferable.