Feat arbitrary custom tags#45
Open
jkshenton wants to merge 2 commits into
Open
Conversation
added 2 commits
February 2, 2026 10:35
add custom_tags handling plus shared _prepare_init_params pipeline for presets/YAML so unexpected keys are treated as user tags instead of constructor errors normalize delete lists and custom-card keys (uppercased, deduped) before instantiation, and serialize them into to_pymatgen_user_tags so FEFF inputs can include tags like CORRECTIONS while keeping _del cleanup behavior consistent
Pull Request Test Coverage Report for Build 21587679734Details
💛 - Coveralls |
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.
This pull request enhances the flexibility and robustness of the FEFF configuration handling in the codebase. The main improvements are the introduction of support for arbitrary FEFF card tags (custom tags), improved normalization and merging logic for configuration parameters, and a refactor of how configuration data is loaded from presets and YAML files. These changes make it easier for users to specify custom FEFF input cards and ensure that configuration parsing is more consistent and maintainable.
Support for arbitrary FEFF card tags:
custom_tagsfield to theFeffConfigdataclass, allowing users to specify any FEFF card/tag by name and value, which are then included verbatim in the FEFF input. [1] [2]to_pymatgen_user_tagsmethod to include custom FEFF tags when generating the user tag dictionary.Configuration normalization and parsing improvements:
custom_tagsanddelete_tags, ensuring all tags are consistently uppercased and deduplicated, and that both standard and custom tags can be marked for deletion if set toNone.Nonevalues and preventing duplicates.Refactor of configuration loading:
from_presetandfrom_yamlclass methods to use a new_prepare_init_paramshelper, which partitions known configuration fields from custom FEFF tags and applies normalization. This makes the loading process more robust and extensible.Internal improvements:
fieldandfieldsfromdataclasses, enabling dynamic field handling and default dictionary creation for custom tags.custom_tagsin the__post_init__method ofFeffConfig.