Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PseudoPotentialFamily.get_pseudos: maintain structure kind names #20

Merged
merged 1 commit into from
Nov 8, 2020

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Nov 8, 2020

Fixes #19

The method was incorrectly returning a mapping of the pseudos onto the
symbols of the structure's kind, thereby discarding the kind name, which
can often be different from the symbol. For example, aiida-quantumespresso
uses kind names that suffix the element symbol with a digit in order to
specify different magnetic kinds.

The method was incorrectly returning a mapping of the pseudos onto the
symbols of the structure's kind, thereby discarding the kind name, which
can often be different from the symbol. For example, `aiida-quantumespresso`
uses kind names that suffix the element symbol with a digit in order to
specify different magnetic kinds.
@sphuber sphuber requested a review from zooks97 November 8, 2020 16:45
Copy link
Contributor

@zooks97 zooks97 left a comment

Choose a reason for hiding this comment

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

Looks all good. In the future, we may need to consider supporting symbols other than [0-9] in the kind names depending on whether codes support doing so. Otherwise, it should be clearly documented somewhere what we support as kind names.

@sphuber
Copy link
Contributor Author

sphuber commented Nov 8, 2020

The code actually does not make any assumptions or put any limitations as to what kind names are used. It simply uses whatever kind names the structure contains. It is just in the tests that I use only digits

@sphuber sphuber merged commit 52d3728 into master Nov 8, 2020
@sphuber sphuber deleted the fix/019/get-pseudos-kind-name branch November 8, 2020 17:22
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.

Structure kind names are not respected in PseudoFamily.get_pseudos
2 participants