aiidateam / aiida-wannier90-workflows

A collection of advanced automated workflows to compute Wannier functions using AiiDA and the Wannier90 code
http://aiida-wannier90-workflows.readthedocs.io/
Other
16 stars 17 forks source link

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

Open greschd opened 4 years ago

greschd commented 4 years ago

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

https://github.com/aiidateam/aiida-wannier90-workflows/blob/18ad0e0a3f1c3b4046b6762a398938d0cbeaa3a6/aiida_wannier90_workflows/workflows/wannier.py#L361-L370

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.