-
Notifications
You must be signed in to change notification settings - Fork 28
Support CIF files from ICSD with atom type symbols like Au0+
#245
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
Open
uellue
wants to merge
6
commits into
pyxem:main
Choose a base branch
from
uellue:elementfix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+114
−10
Conversation
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
A recent CIF file pulled from https://icsd.fiz-karlsruhe.de/ for collection code 163723 contained the atom type symbol "Au0+" instead of just Au. This lead to empty diffraction patterns. With this change only the first alphabetical part of the atom type symbol is used as an element, and a warning is emitted if unknown elements are encountered. See https://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Iatom_type_symbol.html for the definition of the atom type symbol. It can be debated if unrecognized atom type symbols should actually be a hard error since the current code will quietly zero the contribution of sites with unknown atom types, which may lead to plausible but wrong diffraction patterns if recognized and unrecognized atom type symbols are mixed in a CIF file.
Au0+
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
The docs failure seems to be an issue with Sphinx or an extension? |
Good fix, @uellue! The doc fail is related to pyxem/orix#570, I think. @CSSFrancis, how about a patch release v0.7.1 with this fix? Nothing on main since v0.7.0. |
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes Sounds good to me :) |
This should be about right?
Specify more clearly what kind of strings are accepted, update to new feature of supporting more valid atom type symbols found in CIF files in the wild.
About |
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.
A recent CIF file pulled from https://icsd.fiz-karlsruhe.de/ for collection code 163723 contained the atom type symbol "Au0+" instead of just Au. This lead to empty diffraction patterns.
With this change only the first alphabetical
part of the atom type symbol is used as an element, and a warning is emitted if unknown elements are encountered.
See https://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Iatom_type_symbol.html for the definition of the atom type symbol.
It can be debated if unrecognized atom type symbols should actually be a hard error since the current
code will quietly zero the contribution of sites with unknown atom types, which may lead to plausible but wrong diffraction patterns if recognized and unrecognized atom type symbols are mixed in a CIF file.
Description of the change
Progress of the PR
Minimal example of the bug fix or new feature
EntryWithCollCode163723.cif.txt
For reviewers
__init__.py
.unreleased section in
CHANGELOG.rst
.credits
indiffsims/release_info.py
andin
.zenodo.json
.