aiida-quantumespresso icon indicating copy to clipboard operation
aiida-quantumespresso copied to clipboard

`PwCalculation` Input Validator assumes "parameters" is given

Open eric-read opened this issue 1 year ago • 1 comments

The top-level validate_inputs validator for the PwCalculation will always try to get the parameters from the inputs. This causes any higher-level workchains that wrap PwBaseWorkChain that want to provide the Quantum-Espresso input parameters on the fly would have to set the PwBaseWorkChain validator to None in its own define method. A fix similar to 4ede7a1 and a3896293 could be implemented by checking if the parameter port is present in the namespace, since workchains that provide the parameters input on the fly typically would exclude that port when exposing the PwBaseWorkChain inputs. Therefore avoiding the need for such workchains to have to set the PwBaseWorkChain validator to None in their own define method.

eric-read avatar Jun 19 '24 20:06 eric-read

Thanks for reporting @eric-read! Seems sensible to check the existence of the port indeed, let me open a fix.

mbercx avatar Jun 20 '24 11:06 mbercx