Skip to content

🐛 PdosWorkChain: thread settings overrides to dos/projwfc - #1276

Merged
t-reents merged 2 commits into
aiidateam:mainfrom
elinscott:fix-pdos-projwfc-settings
Jul 23, 2026
Merged

🐛 PdosWorkChain: thread settings overrides to dos/projwfc#1276
t-reents merged 2 commits into
aiidateam:mainfrom
elinscott:fix-pdos-projwfc-settings

Conversation

@elinscott

Copy link
Copy Markdown
Collaborator

Problem

PdosWorkChain.get_builder_from_protocol never populated the settings of the dos and projwfc namespaces. As a result any settings override for those namespaces — for example overrides={'projwfc': {'settings': {'CMDLINE': ['-npool', '4']}}} — was silently dropped and never reached the builder, so it had no effect on the launched DosCalculation / ProjwfcCalculation.

Changes

Both namespaces had the identical gap, since DosCalculation and ProjwfcCalculation both derive from NamelistsCalculation, which exposes the settings port. The fix sets builder.dos.settings and builder.projwfc.settings from the merged protocol inputs whenever a settings override is provided, matching the way the sibling code/parameters/metadata inputs are already threaded.

Tests

Added test_settings_overrides to tests/workflows/protocols/test_pdos.py, which passes settings overrides for both the dos and projwfc namespaces and asserts they land on the builder. The test fails on the pre-fix code (the settings input is absent) and passes with the fix.

elinscott and others added 2 commits July 23, 2026 15:44
The `get_builder_from_protocol` method populated the `code`, `parameters`
and `metadata` inputs of the `dos` and `projwfc` namespaces, but never the
`settings` input. As a result, a `settings` override (for example
`{'projwfc': {'settings': {'CMDLINE': ['-npool', '4']}}}`) was silently
dropped and never reached the builder.

Set `builder.dos.settings` and `builder.projwfc.settings` from the merged
protocol inputs when a `settings` override is provided.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGsT8YPFW5jT93FPWojAYf
@elinscott
elinscott requested a review from t-reents July 23, 2026 13:54

@t-reents t-reents left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @elinscott! Changes look fine

@t-reents
t-reents merged commit 0a15b8a into aiidateam:main Jul 23, 2026
7 checks passed
@elinscott
elinscott deleted the fix-pdos-projwfc-settings branch July 23, 2026 14:41
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

Successfully merging this pull request may close these issues.

2 participants