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

Remove charge from composition #1563

Merged
merged 7 commits into from
Aug 25, 2019

Conversation

kmu
Copy link
Contributor

@kmu kmu commented Aug 23, 2019

Summary

  • The method that removes charges from the composition.
  • It is useful to compare the composition of the oxidized structure and the composition derived from other sources such as ICSD metadata.

e = re.findall(r"[A-z]+", str(e))[0]
d[str(e)] += f

return(Composition(d))
Copy link
Member

Choose a reason for hiding this comment

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

should be return Composition(d), also missing docstring

@mkhorton
Copy link
Member

Thanks @kmu, this looks useful!

@mkhorton
Copy link
Member

Thanks @kmu!

@mkhorton mkhorton merged commit c055e14 into materialsproject:master Aug 25, 2019
mmbliss pushed a commit to molmd/pymatgen that referenced this pull request Aug 27, 2021
…composition

Remove charge from composition
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.

2 participants