Repository navigation
Add FCM key to kkrparams for KKRimp - #257
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
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
FCMin 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
FCMto the KKRimp keyword table,masci_tools/io/data_kkrparams/defaults_kkrimp.json.FCMmultiplies the linear mixing of the magnetic part of the potential. KKRimp reads it inconfig.f90(tag v3.5, line 153), defaults it to 2.0 intype_config.f90and applies it inmixstr.f90asVMN = VOLDM + FCM*MIXING*(VNM-VOLDM). The key already existed for KKRhost but was missing for KKRimp. Sokkrparams(params_type='kkrimp', FCM=20.0)raisedKeyError: 'FCM', which made aiida-kkr KKRimp calculations fail at submission whenFCMwas given.The entry uses the same
%fformat and description as the KKRhostFCMand the KKRimpMIXFAC.config.cfgnow getsFCM= 20.000000000000, the sameKEY= valueform in whichMIXFACis written. Parameter sets withoutFCMwrite the sameconfig.cfgas before. Like any new key, it adds'FCM': Noneto the defaultkkrparams.get_dict()output (see the CHANGELOG note anddrop_none, #256).Tests: new
test_kkrimp_fcm_key. CI is red ondevelopindependently of this PR (#252).