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

Ion.oxi_state_guesses fails for 'Br' or 'Br(aq)' #3687

Open
rkingsbury opened this issue Mar 13, 2024 · 0 comments
Open

Ion.oxi_state_guesses fails for 'Br' or 'Br(aq)' #3687

rkingsbury opened this issue Mar 13, 2024 · 0 comments
Labels

Comments

@rkingsbury
Copy link
Contributor

rkingsbury commented Mar 13, 2024

Python version

Python 3.10.6

Pymatgen version

Version: 2024.2.8

Operating system version

Ubuntu (Windows WSL2)

Current behavior

Ion.oxi_state_guesses fails for Br, and for Br2 unless all_oxi_state_guesses is set. This is a problem because 1) Composition.oxi_state_guesses works in this case and 2) Br is the standard state of bromine

>>> from pymatgen.core.ion import Ion
>>> Ion.from_formula('Br').oxi_state_guesses()
()
>>> Ion.from_formula('Br').oxi_state_guesses(all_oxi_states=True)
()
>>> Ion.from_formula('Br2').oxi_state_guesses()
()
>>> Ion.from_formula('Br2').oxi_state_guesses(all_oxi_states=True)
({'Br': 0.0},)
>>> from pymatgen.core import Composition
>>> Composition('Br').oxi_state_guesses()
({'Br': 0.0},)

Expected Behavior

>>> Ion.from_formula('Br').oxi_state_guesses()
({'Br': 0.0},)
>>> Ion.from_formula('Br(aq)').oxi_state_guesses()
({'Br': 0.0},)

Minimal example

No response

Relevant files to reproduce this bug

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant