Skip to content
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

Do not rely on kpoints validation from aiida-quantumespresso #8

Open
greschd opened this issue Jul 21, 2020 · 0 comments
Open

Do not rely on kpoints validation from aiida-quantumespresso #8

greschd opened this issue Jul 21, 2020 · 0 comments

Comments

@greschd
Copy link
Member

greschd commented Jul 21, 2020

The code below relies on the PwBaseWorkChain input validation to catch that either kpoints or kpoint_distance needs to be set:

try:
inputs.kpoints
except AttributeError:
# then kpoints_distance must exists, since this is ensured by inputs check of this workchain
from aiida_quantumespresso.workflows.functions.create_kpoints_from_distance import create_kpoints_from_distance
force_parity = inputs.get('kpoints_force_parity', orm.Bool(False))
kmesh = create_kpoints_from_distance(
self.ctx.current_structure, inputs.kpoints_distance,
force_parity
)

However (maybe since a recent release?) aiida-quantumespresso doesn't do that, instead the k-points are checked after the workchain has started, and an error code is returned if they are invalid.

This means that this workchain will except when both kpoints and kpoint_distance or not set, instead of giving a "well-behaved" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant