Skip to content

Commit

Permalink
Q2rCalculation: Add the output_parameters output to the spec (#974)
Browse files Browse the repository at this point in the history
The `Q2rCalculation` did not declare the `output_parameters` output even
though the `Q2rParser` attaches it always. This would lead to the
calculation excepting because an unknown output would be attached. This
was uncaught by the test because the `Parser.parse_from_node` method
does not automatically validate the outputs. This is because the output
spec that is checked is that of the `calcfunction` (which accepts
anything) and not that of the `Q2rCalculation`.
  • Loading branch information
sphuber authored Oct 21, 2023
1 parent 2adf033 commit 7a303f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/aiida_quantumespresso/calculations/q2r.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def define(cls, spec):
super().define(spec)
spec.input('parent_folder', valid_type=(orm.RemoteData, orm.FolderData), required=True)
spec.output('force_constants', valid_type=ForceConstantsData)
spec.output('output_parameters', valid_type=orm.Dict)
spec.exit_code(330, 'ERROR_READING_FORCE_CONSTANTS_FILE',
message='The force constants file could not be read.')
# yapf: enable

0 comments on commit 7a303f9

Please sign in to comment.