Releases: KingsburyLab/pyEQL
v1.4.0
Major Changes
New Electrolyte Engine - phreeqc2026
This release features a new interface to IPHREEQC developed by @vineetbansal of Princeton University's Research Software Engineering group. This new interface "talks" directly to the USGS-provided IPHREEQC libraries, providing a much more robust way of accessing PHREEQC functionality via pyEQL as compared to the legacy engine based on phreeqpython. This new engine can be specified by passing engine='phreeqc2026' to Solution.__init__. Thanks to pyEQL's modular API, no other changes to your script are needed - it is a "drop-in" replacement for the legacy phreeqc engine.
The legacy phreeqc engine is still present and is still used for speciation by the default native engine. However, the native engine will adopt phreeqc2026 for speciation calculations in the next release. You may see a warning about this when you call equilibrate().
Solid-liquid and gas-liquid equilibrium
The equilibrate() method now supports equilibrating a Solution with gas and/or solid phases, thanks to work by @vineetbansal , @SuixiongTay , and @YitongPan1 . In addition to user-specified phases, a convenience argument atmosphere has been added if you simply want to consider the effects of, e.g., atmospheric carbonate on your system:
>>> from pyEQL import Solution
>>> s1 = Solution({}, pH=7.0, volume="1 L", engine="phreeqc2026")
>>> s1.equilibrate(atmosphere=True)
>>> s1.components
{'H2O(aq)': 55.34457593619076,
'O2(aq)': 0.0002675300582572652,
'CO2(aq)': 1.424944456303147e-05,
'H[+1]': 2.51988623743169e-06,
'HCO3[-1]': 2.5169971787125935e-06,
'OH[-1]': 4.007874338794804e-09,
'CO3[-2]': 4.7053998717451746e-11,
...}
The new equilibrate capabilities work across all engines - native, phreeqc, and phreeqc2026
Performance
Loading times for Solution that contain a large number of solutes have been significantly improved (by a factor of ~10x in some cases) thanks to a caching optimization identified by @vineetbansal .
See additional details in the CHANGELOG.
Detailed List of Changes
🐛 Bug Fixes
- Fix behavior of PHREEQC equilibrate when composition contains pure elements by @vineetbansal in #282
- Fix incorrect reduction of dimers/polymers in standardize_formula by @vineetbansal in #309
- phreeqc2026 engine: ensure unit osmotic coefficient; refactor tests by @rkingsbury in #333
- from_file: address subtle volume bug by @rkingsbury in #347
- Use
to_fileto generateyamlby @SuixiongTay in #350 - Remove
N2fromATMOSPHEREby @SuixiongTay in #339 - equilibrate: exclude H and O from missing element check by @rkingsbury in #355
🛠 Enhancements
- added a nested parameter to 2 methods in the Solution class by @vineetbansal in #284
- enable solid-liquid and gas-liquid equilibrium calculations in equilibrate() by @vineetbansal in #292
- Speciation calculations in new wrapper by @vineetbansal in #306
- Fix the postprocess workflow; refactor PHREEQC2026 wrapper by @vineetbansal in #318
- Watching for Phreeqc invocation errors by @vineetbansal in #319
- Solution.from_preset: Add representative industrial wastewaters by @SuixiongTay in #317
- PhreeqcEOS inherits from Phreeqc2026EOS by @vineetbansal in #351
- equilibrate: modify total conc check for missing elements by @rkingsbury in #352
- engines.py: NativeEOS inherits from PhreeqcEOS; eliminate redundant code by @rkingsbury in #353
📖 Documentation
- migrate docs theme to sphinx-immaterial by @rkingsbury in #272
- Update
Solution.equilibrate()'s docstring withNativeEOS.equilibrate()docstring by @SuixiongTay in #344 Phreeqc2026docs by @SuixiongTay in #349
🧹 House-Keeping
- Vb/noblack by @vineetbansal in #285
🏥 Package Health
- CI run with pinned deps common to all py/platforms by @vineetbansal in #314
- Release Workflow for CI by @vineetbansal in #320
🤷♂️ Other Changes
- Add pqi_pqo_files to tests by @SuixiongTay in #289
- 'PHREEQC' pytest by @SuixiongTay in #294
- Phreeqc wrapper by @vineetbansal in #291
- Bump actions/checkout from 5 to 6 in the actions group by @dependabot[bot] in #293
- Bump urllib3 from 2.5.0 to 2.6.0 in /requirements by @dependabot[bot] in #298
- Bump urllib3 from 2.6.0 to 2.6.3 in /requirements by @dependabot[bot] in #308
- Bump pynacl from 1.5.0 to 1.6.2 in /requirements by @dependabot[bot] in #307
- Bump filelock from 3.16.0 to 3.20.1 in /requirements by @dependabot[bot] in #305
- Bump fonttools from 4.53.1 to 4.60.2 in /requirements by @dependabot[bot] in #304
- Bump virtualenv from 20.26.4 to 20.36.1 in /requirements by @dependabot[bot] in #312
- Bump filelock from 3.20.1 to 3.20.3 in /requirements by @dependabot[bot] in #313
- Diffusion Coefficient from Phreeqc by @vineetbansal in #316
- Bump the actions group with 3 updates by @dependabot[bot] in #321
- Test new release workflow by @rkingsbury in #322
- Test release workflow, take 2 by @rkingsbury in #323
- bump the tag in changelog by @rkingsbury in #324
- Release rc4 by @vineetbansal in #325
- Triggering release on published action by @vineetbansal in #327
- updating basic tools before twine upload by @vineetbansal in #328
- Patch for trusted publishing by @vineetbansal in #330
- Bump cryptography from 46.0.3 to 46.0.5 by @dependabot[bot] in #334
- Fixing warnings on docs generation by @vineetbansal in #338
- Bump pillow from 12.1.0 to 12.1.1 by @dependabot[bot] in #341
- Pulled out lint+docs as its own workflow; Other workflows ignore docs folder by @vineetbansal in #340
- utils: ensure python floats in FormulaDict by @rkingsbury in #342
- Adjust
DeprecationWarningby @SuixiongTay in #348 - Add the
to_phreeqc()method by @SuixiongTay in #288 - update CHANGELOG and AUTHORS for v1.4.0 release by @rkingsbury in #356
New Contributors
- @vineetbansal made their first contribution in #284
Full Changelog: v1.3.2...v1.4.0
v1.4.0rc11
This is a pre-release version to test new PyPi publishing tooling
What's Changed
🐛 Bug Fixes
- Fix behavior of PHREEQC equilibrate when composition contains pure elements by @vineetbansal in #282
- Fix incorrect reduction of dimers/polymers in standardize_formula by @vineetbansal in #309
🛠 Enhancements
- added a nested parameter to 2 methods in the Solution class by @vineetbansal in #284
- enable solid-liquid and gas-liquid equilibrium calculations in equilibrate() by @vineetbansal in #292
- Speciation calculations in new wrapper by @vineetbansal in #306
- Fix the postprocess workflow; refactor PHREEQC2026 wrapper by @vineetbansal in #318
- Watching for Phreeqc invocation errors by @vineetbansal in #319
🧹 House-Keeping
- Vb/noblack by @vineetbansal in #285
🏥 Package Health
- CI run with pinned deps common to all py/platforms by @vineetbansal in #314
- Release Workflow for CI by @vineetbansal in #320
🤷♂️ Other Changes
- Add pqi_pqo_files to tests by @SuixiongTay in #289
- 'PHREEQC' pytest by @SuixiongTay in #294
- Phreeqc wrapper by @vineetbansal in #291
- Bump actions/checkout from 5 to 6 in the actions group by @dependabot[bot] in #293
- Bump urllib3 from 2.5.0 to 2.6.0 in /requirements by @dependabot[bot] in #298
- Bump urllib3 from 2.6.0 to 2.6.3 in /requirements by @dependabot[bot] in #308
- Bump pynacl from 1.5.0 to 1.6.2 in /requirements by @dependabot[bot] in #307
- Bump filelock from 3.16.0 to 3.20.1 in /requirements by @dependabot[bot] in #305
- Bump fonttools from 4.53.1 to 4.60.2 in /requirements by @dependabot[bot] in #304
- Bump virtualenv from 20.26.4 to 20.36.1 in /requirements by @dependabot[bot] in #312
- Bump filelock from 3.20.1 to 3.20.3 in /requirements by @dependabot[bot] in #313
- Diffusion Coefficient from Phreeqc by @vineetbansal in #316
- Bump the actions group with 3 updates by @dependabot[bot] in #321
- Test new release workflow by @rkingsbury in #322
- Test release workflow, take 2 by @rkingsbury in #323
- bump the tag in changelog by @rkingsbury in #324
- Release rc4 by @vineetbansal in #325
- Triggering release on published action by @vineetbansal in #327
- updating basic tools before twine upload by @vineetbansal in #328
- Patch for trusted publishing by @vineetbansal in #330
New Contributors
- @vineetbansal made their first contribution in #284
Full Changelog: v1.3.2...1.4.0rc11
v1.3.2
Version 1.3.2
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- Bugfix in get_viscosity_kinematic by @rkingsbury in #281
🤷♂️ Other Changes
- Bump actions/checkout from 4 to 5 in the actions group by @dependabot[bot] in #278
- Bump the actions group with 2 updates by @dependabot[bot] in #280
- Automated dependency upgrades by @github-actions[bot] in #275
Full Changelog: v1.3.1...v1.3.2
v1.3.1
Version 1.3.1
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
Full Changelog: v1.3.0...v1.3.1
v1.3.0
Version 1.3.0
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- standardize_formula: handle ambiguous dash-hyphens by @rkingsbury in #264
- standardize_formula: handle ambiguous dash-hyphens pt.2 by @rkingsbury in #267
- Database: add Pitzer molar volume parameters for NH4(2)SO4, remove duplicate K2SO4 entry by @SuixiongTay in #268
- Raise ValueError for conflicting pH and H+ by @rkingsbury in #270
- Update test_mixed_electrolyte_activity with corrected data by @rkingsbury in #271
- Fix get salt dict type by @ugognw in #258
- Fix mass conservation for H+ and OH- in Solution.add following #270 by @rkingsbury in #274
🛠 Enhancements
- prevent diffusion coefficient adjustment when temperature is within 1 degree of the the reference value by @YitongPan1 in #215
- Using importlib to locate seawater.yaml by @SuixiongTay in #241
- Miscellaneous CI and Solution enhancements by @rkingsbury in #269
📖 Documentation
- edit documentation of debye_parameter_B by @YitongPan1 in #196
- Documentation minor fixes for private methods by @githubalexliu in #197
- Docs: add activity tutorial by @rkingsbury in #199
- Docs: add activity tutorial by @rkingsbury in #200
- Docs: add carbonate system tutorial by @NikhilDhruv in #204
- Fix typos in contributing.md by @ugognw in #248
- Clarify definition of pE vs. redox potential in documentation by @ugognw in #253
- Fix batch of sphinx warnings by @ugognw in #255
🧹 House-Keeping
- modify pre-commit; run on all files by @rkingsbury in #191
- Update pre commit configuration by @ugognw in #259
💥 Breaking Changes
- Remove deprecated list_XXX methods; deprecate add_solvent by @rkingsbury in #273
🤷♂️ Other Changes
- Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.2 in the actions group by @dependabot[bot] in #189
- Automated dependency upgrades by @github-actions[bot] in #185
- Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 in the actions group by @dependabot[bot] in #193
- Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 in the actions group by @dependabot[bot] in #198
- Automated dependency upgrades by @github-actions[bot] in #194
- Bump the actions group across 1 directory with 2 updates by @dependabot[bot] in #206
- CI: don't fail on FutureWarning by @rkingsbury in #208
- bump monty to 2024.12.10; address pint deprecation warning by @rkingsbury in #209
- Bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.4 in the actions group across 1 directory by @dependabot[bot] in #212
- Automated dependency upgrades by @github-actions[bot] in #211
- Automated dependency upgrades by @github-actions[bot] in #226
- Automated dependency upgrades by @github-actions[bot] in #235
- Bump jinja2 from 3.1.4 to 3.1.6 in /requirements by @dependabot[bot] in #232
- Automated dependency upgrades by @github-actions[bot] in #237
- bump pint to 0.24.1 by @rkingsbury in #238
- bump pint to v0.24.4 by @rkingsbury in #239
- Automated dependency upgrades by @github-actions[bot] in #245
- Update Python version classifiers in pyproject.toml by @ugognw in #247
- Bump urllib3 from 1.26.20 to 2.5.0 in /requirements by @dependabot[bot] in #251
- Bump requests from 2.32.3 to 2.32.4 in /requirements by @dependabot[bot] in #249
- bump maggma to v0.71.4 by @rkingsbury in #265
- bump pymatgen to v2025.1.9 by @rkingsbury in #266
New Contributors
- @YitongPan1 made their first contribution in #196
- @githubalexliu made their first contribution in #197
- @NikhilDhruv made their first contribution in #204
- @ugognw made their first contribution in #248
Full Changelog: v1.2.0...v1.3.0
v1.2.0
Version 1.2.0
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- database fixes by @rkingsbury in #190
🤷♂️ Other Changes
- pymatgen>=2024.9.10 updated after bugfix and conflict resolve by @abhardwaj73 in #188
Full Changelog: v1.1.6...v1.2.0
v1.1.6
Version 1.1.6
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- Bugfix in get_total_amount; CHANGELOG for next version by @rkingsbury in #182
🛠 Enhancements
- Revise 'Mixing Functions' by @jaebeom-p in #178
🤷♂️ Other Changes
- Refactor logging for
_adjust_charge_balanceby @SuixiongTay in #162 - add lowest-direct dependency resolution by @abhardwaj73 in #163
- updated python-version line 48 and removed dev by @abhardwaj73 in #164
- Update post-process.yml by @rkingsbury in #165
- Update post-process.yml by @rkingsbury in #166
- Set minimum iapws >1.0.0 by @rkingsbury in #167
- pin pytest>=7 by @rkingsbury in #168
- set minimum dependency versions by @rkingsbury in #172
- Set mininum dependency versions, part 2 by @rkingsbury in #173
- set minimum pytest-cov dependency by @rkingsbury in #174
- set minimum dependency versions by @rkingsbury in #175
- set minimum dependency versions by @rkingsbury in #176
- bump minimum scipy by @rkingsbury in #177
New Contributors
- @SuixiongTay made their first contribution in #162
- @abhardwaj73 made their first contribution in #163
- @jaebeom-p made their first contribution in #178
Full Changelog: v1.1.5...v1.1.6
v1.1.5
Version 1.1.5
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- Hotfix v1.1.5 - remove stray assert statement by @rkingsbury in #156
Full Changelog: v1.1.4...v1.1.5
v1.1.4
Version 1.1.4
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- Fix erroneous guard statement in pH charge balancing by @rkingsbury in #155
Full Changelog: v1.1.3...v1.1.4
v1.1.3
Version 1.1.3
See CHANGELOG for a detailed explanation of changes.
What's Changed
🐛 Bug Fixes
- Solution: fix pH charge balancing bug and possible water ion imbalance by @rkingsbury in #154
Full Changelog: v1.1.2...v1.1.3