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

Allow ions instead of atoms in CIF files #222

Open
DorianDepriester opened this issue Jun 21, 2024 · 3 comments
Open

Allow ions instead of atoms in CIF files #222

DorianDepriester opened this issue Jun 21, 2024 · 3 comments

Comments

@DorianDepriester
Copy link

Is your feature request related to a problem? Please describe.
In some CIF files, atoms are given by their ionic names (e.g. Fe2+ instead of Fe). This is (sometimes) the case for generated files from The Materials Project. This actually results in failure of get_element_id_from_string().

Describe the solution you'd like
A simple regexp to automatically trim the atom names.

Describe alternatives you've considered
The user can edit the CIF file to remove the exponents.

@CSSFrancis
Copy link
Member

@DorianDepriester I think ions result in slightly different atomic scattering factors.

I got fairly far on adding them but just never did. If this is something you are interested in I can prioritize this!

@DorianDepriester
Copy link
Author

From my point of view, it would indeed be an interesting feature 😉

@CSSFrancis
Copy link
Member

From my point of view, it would indeed be an interesting feature 😉

I'll see if I can make the PR later this week and we can think about making a new release!

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

No branches or pull requests

2 participants