KingsburyLab / pyEQL

A Python library for solution chemistry
Other
66 stars 20 forks source link

pymatgen>=2024.8.8 is updated in the .toml file after fixing of ion parsing bug #169

Closed abhardwaj73 closed 1 month ago

abhardwaj73 commented 2 months ago

Summary

Major changes:

rkingsbury commented 2 months ago

Thanks @abhardwaj73 ! I wasn't expecting the test failures; I need to figure out if there is a bug in pymatgen related to triiodide ion because I see 'I3[-3]' in the test output, whereas it should be 'I3[-1]' Same with C2O4[-0.5]

rkingsbury commented 2 months ago

Fixes #158

rkingsbury commented 2 months ago

Ok yeah I'll need to fix this one in pymatgen

>>> Ion.from_formula('CO2-').reduced_formula
'C2O4[-0.5]'
>>> Ion.from_formula('CO2--').reduced_formula
'C2O4[-1]'
>>>

Tri-iodide seems OK, but the logic is incorrectly parsing I[-1]

>>> Ion.from_formula('I3-').get_reduced_formula_and_factor()
('I3', 1.0)
>>> Ion.from_formula('I-').get_reduced_formula_and_factor()
('I3', 0.3333333333333333)
rkingsbury commented 2 months ago

OK, pymatgen PR is open to fix the upstream formula parsing bugs. Let's pause this PR until the next pymatgen release.

rkingsbury commented 1 month ago

OK, pymatgen PR is open to fix the upstream formula parsing bugs. Let's pause this PR until the next pymatgen release.

The release containing the bugfix is out - https://github.com/materialsproject/pymatgen/releases/tag/v2024.9.10

abhardwaj73 commented 1 month ago

I can't seem to update the pymatgen version in the pyproject.toml file. I see the warning "This branch has conflicts that must be resolved" with the base file for the pymatgen version. Maybe only you can update it @rkingsbury ?

rkingsbury commented 1 month ago

I can't seem to update the pymatgen version in the pyproject.toml file. I see the warning "This branch has conflicts that must be resolved" with the base file for the pymatgen version. Maybe only you can update it @rkingsbury ?

Hmmm it sounds like you have a merge conflict. On your local branch, make sure to pull from the main branch git pull origin main

and then you should be able to resolve the conflict in your local editor and commit the change.