Skip to content

Add FCM key to kkrparams for KKRimp - #257

Merged
Irratzo merged 1 commit into
developfrom
feat/kkrimp-fcm-key
Sep 27, 2026
Merged

Irratzo merged 1 commit into
developfrom
feat/kkrimp-fcm-key

Conversation

@Irratzo

@Irratzo Irratzo commented Sep 27, 2026

Copy link
Copy Markdown
Member

Adds FCM to the KKRimp keyword table, masci_tools/io/data_kkrparams/defaults_kkrimp.json.

FCM multiplies the linear mixing of the magnetic part of the potential. KKRimp reads it in config.f90 (tag v3.5, line 153), defaults it to 2.0 in type_config.f90 and applies it in mixstr.f90 as VMN = VOLDM + FCM*MIXING*(VNM-VOLDM). The key already existed for KKRhost but was missing for KKRimp. So kkrparams(params_type='kkrimp', FCM=20.0) raised KeyError: 'FCM', which made aiida-kkr KKRimp calculations fail at submission when FCM was given.

The entry uses the same %f format and description as the KKRhost FCM and the KKRimp MIXFAC. config.cfg now gets FCM= 20.000000000000, the same KEY= value form in which MIXFAC is written. Parameter sets without FCM write the same config.cfg as before. Like any new key, it adds 'FCM': None to the default kkrparams.get_dict() output (see the CHANGELOG note and drop_none, #256).

Tests: new test_kkrimp_fcm_key. CI is red on develop independently of this PR (#252).

FCM (factor for the linear mixing of the magnetic part of the potential)
is read by KKRimp config.f90 (default 2.0 in type_config.f90) but was
missing from the KKRimp keyword table, so kkrparams(params_type='kkrimp',
FCM=...) raised KeyError. It already existed for KKRhost; the KKRimp
entry uses the same format and description.
Copilot AI lite review requested due to automatic review settings September 27, 2026 16:43
@Irratzo
Irratzo merged commit 7b9d423 into develop Sep 27, 2026
2 of 21 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

All reviewed changes are covered and no unresolved blocking issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Adds the missing KKRimp FCM keyword for magnetic potential mixing and config.cfg serialization.

Changes:

  • Defines FCM in KKRimp defaults.
  • Adds regression coverage for formatting and output.
  • Documents the new keyword and caching impact.
File Description
tests/​test_kkrparams.py Verifies FCM is accepted and written correctly.
masci_tools/​io/​data_kkrparams/​defaults_kkrimp.json Defines the KKRimp FCM keyword.
CHANGELOG.md Documents the added keyword.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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