pyEQL Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.5.0] - 2026-06-15¶
Added¶
NEW FEATURE
Solution.get_saturation_index():pyEQLcan now display saturation indices for solid phases when using thenative,phreeqc, orphreeqc2026engines. (#395, @SuixiongTay, @YitongPan1)Solution.alkalinity: Alkalinity calculations now include an alternative definition based on the presence of weak acid-base species. Previously, the calculation only considered conservative cations and strong base anions, which meant that a solution that contained only weak acid/base species would return zero alkalinity. (#398, @SuixiongTay)Solution.get_transference_number: New method alias toget_transport_number(#420, @rkingsbury)Added
python3.14 support (#404, @rkingsbury)Docs: new charge balancing tutorial (#391, @SuixiongTay)
Docs: new tutorial for solid-liquid-gas equilibrium (#390, @YitongPan1)
Solution.__init__now checks whether the suppliedpHandpEconditions are within the electrochemical stability limits of water, and logs a warning if they are not (#385, @YitongPan1)
Changed¶
NEW DEFAULT BEHAVIOR
NativeEOS: thenativemodeling engine (the default) now uses the natively-developedPhreeqc2026EOSfor speciation calculations, rather than the legacyPhreeqcEOSwhich was based on phreeqpython. Both PHREEQC wrappers are still available; the only thing that has changed in this release is which one thenativemodeling engine uses. (#422, @rkingsbury)Solution.__init__: solutes can now be given using additional, common environmental unit abbreviations such as “ppm”, “ppb”, etc., aligning with the unit types supported inget_amount()(#414, @SuixiongTay)get_transport_number: Clarify that the quantity returned by this method is really the transference number, which is equal to the transport number whenever there are no concentration or pressure gradients. Also added a new methodget_transference_numberas an alias. (#420, @rkingsbury)utils.interpret_unitswas renamed toutils.translate_units()(#414, @SuixiongTay)Solute properties are now pre-cached to enhance performance, especially when creating Solutions containing a large number of solutes (#384, @rkingsbury)
migrate from
pymatgento[pymatgen-core](https://github.com/materialsproject/pymatgen-core). (#403, @rkingsbury)
Fixed¶
Phreeqc2026EOS: an error in the__deepcopy__method prevented this class from functioning properly with someSolutionmethods, such as arithmetic (+). (#421, @rkingsbury)from_preset/from_dict: there was a subtle bug in the calculation of solution volumes that could cause a pH / H+ inconsistency when re-creating solutions fromdictor files. This primarily affected solutions with many solutes and the discrepancy was small in quantitative terms, but prevented somepresetsfrom loading correctly.Solution.__init__: fix the way the moles of solvent are initially calculated. The previous approach contained an error and also used a fixed water concentration of 55.55 mol/L regardless of temperature or pressure. The calculation now uses the internalwater_substanceto retrieve the correct density and calculate the molarity. The flaw in the original method did not affect quantitative results because the initial amount of moles was immediately overwritten byadd_amountduring__init__. (#406, @rkingsbury)utils.standardize_formula(): Triiodide ion now correctly renders asBr3[-1]rather thanBr[-0.33333333](#410, @rkingsbury)utils.standardize_formula(): Sulfur species with fractional oxidation states such asS5[-2],S4[-2],S3 [-2], andS2[-2]now render correctly. Previously they were rendered asS[-0.4],S[-0.5],S[-0.66666667], andS[-1](#416, @SuixiongTay)Docs: fixed issues with the built docs (#402, @YitongPan1; #401, @SuixiongTay)
Packaging: remove
.gitignore’ed files fromscikit-build-coresdist (#392, @vineetbansal)
Removed¶
Dropped
python3.10 support (#404, @rkingsbury)
[1.4.0] - 2026-02-17¶
Added¶
Phreeqc2026EOS: Brand new, custom-compiled wrapper that interfaces directly with IPHREEQC modules distributed by USGS. This new PHREEQC interface is accessible via the newphreeqc2026electrolyte modeling engine, and will be used by default in thenativeengine inv1.5.0. (#306, #318, #318, #319, #333, # @vineetbansal)Solution.from_preset: Added presets for 22 representative industrial wastewater compositions, explained in detail in our recent preprint “Composition and Critical Mineral Content of Major Industrial Wastewaters: Implications for Treatment and Resource Recovery Technologies,” available at [https://www.researchsquare.com/article/rs-8743330/v2]
Changed¶
Solution.equilibrate: Added support for solid-liquid and gas-liquid equilibrium via three new kwargs -atmopshere,solids, andgases. See docstring for details and usage.(#292, #294, #339, @vineetbansal, @YitongPan1, @SuixiongTay)get_components_by_element: A new keyword argumentnestedwas added to methodsget_components_by_elementandget_el_amt_dictof theSolutionclass. It defaults toFalse(no change from prior behavior), but can be set toTrueto return a 2-level dictionary, with the element symbol as the key at the top level, and the valence (float, or “unk” for unknown) as the key at the second level. This should make it easier for future code to calculate the total amount of a given element regardless of its valence. (#284, @vineetbansal)Solution.get_property: Changed thelru_cachesize to greatly enhance performance when creatingSolutionthat contain a large number of solutes (@vineetbansal, @SuixiongTay)Docs:
sphinx-materialtheme migrated tosphinx-immaterial(#272, @ugognw, @rkingsbury)Docs: resolved all the
spinxbuild warnings and errors (#338, @vineetbansal)Docs: Added documentation of
phreeqc2026engine and newequilibratefeatures (#344, #349, @SuixiongTay, @YitongPan1)CI: Various changes to optimize our continuous integration testing workflows. Notably, changes to the docs (only) no longer trigger unit tests of the code (only of the docs), and now test against a specific set of pinned dependencies from
requirements.txt. (#285, #314, #320, #327, #328, #330, #340, @vineetbansal, @rkingsbury)
Fixed¶
NativeEOSequilibrate: Fixed a bug in which instantiating a solution with pure elements (e.g.,{'Na': '0.5 mol/L'}) and then callingequilibratecould cause that element to be “double counted.” In other words, speciation calculations would addNa[+1]to the solution but retainNaas well. This now works correctly. In addition, elements or species that are missing from PHREEQC’s database (e.g. Rh) are handled more robustly. (#282, #352, #355, @vineetbansal, @rkingsbury)from_file: Instantiating aSolutionfrom a .yaml file now gives slightly more accurate results. Previously, there were slight discrepancies in the volume of the loaded solution, compared to loading from .json ordict. (#347, @rkingsbury)standardize_formula: Fixed incorrect reduction of dimers. For example,(CO2)2was being standardized toCO2, which could cause incorrect concentrations to be reported. Dimers are no longer reduced. (#309, @vineetbansal)FormulaDict: ensured that quantities are always represented bypythonfloats and notnp.float64(#342, @rkingsbury)
[1.3.2] - 2025-09-15¶
Fixed¶
Solution.get_viscosity_kinematic(): A recent change to get_salt_dict (#258) created a problem withget_viscosity_kinetmaticin which an empty solution would cause the method to return an error. This has been fixed, and unit tests added for bothget_viscosity_kinematicandget_viscosity_dynamic.
[1.3.1] - 2025-08-18¶
Fixed¶
Solution.get_salt_dict(): In solutions containing polyatomic ions with a heteroatom (an atom other thanHorO) having a stoichiometric coefficient greater than 1 mol per mol salt , such as Fe(CN)6[-3], the method would return incorrect results, possibly impacting activity coefficient calculations. This has now been fixed. (#277, @ugognw)
[1.3.0] - 2025-08-08¶
Fixed¶
Solution.__add__: engine, solvent, database were not inherited by the sum ofSolutionobjects (#258, @ugognw)Solution.get_activity_coefficient: Fixed bugs where incorrect Pitzer scaling parameters \(\alpha_1\) and \(\alpha_2\) parameters were used to calculate activity coefficients and solute molar volumes for salts with multivalent ions (#258, @ugognw)Solution.get_salt_dict: fixed errors in the calculation of concentrations for salts containing polyvalent cations (#258, @ugognw)Solution.get_salt_dictnow respects thecutoffparameter. Note thatcutoffis now interpreted in units of moles per kilogram of solution (#258, @ugognw)Solution.get_salt_dictalways returns a salt dictionary sorted in order of decreasing salt concentration (#258, @ugognw)Solution.__init__: RaiseValueErrorif a user sets inconsistentH[+1]insolutesandpHkeyword arguments (#270, @gnuhpdiem, @rkingsbury). Previously, if the user setH[+1]insolutes, it’s value would silently override thepHkwarg. Now, you will get aValueErrorif the two are inconsistent, unless thepHkwarg is kept at the default value. In that case, a warning will be logged.standardize_formula: properly interpret ambiguous dash / hyphen characters as “minus” (#264, @rkingsbury)Ensure
Solution.p()always returns a regularfloatand returnsnp.nanif the concentration is zero or negative (#269, @rkingsbury)Solution.get_diffusion_coefficient: prevent diffusion coefficient adjustment when temperature is within 1 degree of the the reference value (#215, @YitongPan1)Tests: literature data used in
test_mixed_electrolyte_activity.pywas updated to reflect corrected we recently became aware of. (#271, @Ouriel-N, @rkingsbury)Docs: Sphinx warnings are cleared (#255, ugognw)
Docs: Minor fixes for private / cached methods (#197, @githubalexliu)
Docs: Edit documentation of
debye_parameter_B(#196, @YitongPan1)
Added¶
Docs/CI: sphinx linkcheck job and tox environment/command (
tox -e links) (#255, @ugognw)Docs: add carbonate system tutorial (#204, @NikhilDhruv)
Changed¶
BREAKING - the return value of
Solution.get_salt_dictnow includesSaltobjects instead of keys corresponding tocationandanion. See the example in the docstring for how to adapt existing code to accommodate this change. (#258, @ugognw)BREAKING -
Solution.get_salt_dictno longer returns an entry for water (#258, @ugognw)BREAKING -
Solution.get_saltwill not return water and may returnNoneif no salt is present. Previously,Solution.get_saltwould have returned aSaltrepresenting water. (#258, @ugognw)Ensure more consistent column formatting in
Solution.print()(#269, @rkingsbury)Switch
math.log10tonp.log10inSolution.p()(#269, @rkingsbury)update pre-commit configuration (#269, @rkingsbury)
use
--dist loadscopein parallelized CI tests. Closes #170. (#269, @rkingsbury)update license specification in
pyproject.tomlto conform to latest packaging standards. Closes #233. (#269, @rkingsbury)add
py.typedto report type checking to other libraries. Closes #179. (#269, @rkingsbury)Support
numpy>2.0Bump
pintto0.24.4fornumpyv2.0compatibility and to mitigate CI issues (#239, @SuixiongTay, @rkingsbury)CI: add
pythonv3.13to post-merge unit testsDocs:
tox -e docscommand configured to fail on warning (#255, ugognw)Docs: ReadTheDocs built with Python 3.11 (#255, ugognw)
Use
importlibto locate test files (#241, @SuixiongTay)Support
numpy>2.0Bump
pintto0.24.4fornumpyv2.0compatibility and to mitigate CI issues (#239, @SuixiongTay, @rkingsbury)CI: add
pythonv3.13to post-merge unit testsbump
pymatgentov2025.1.9bump
maggmatov0.71.4
Removed¶
BREAKING Methods previously marked for deprecation -
list_solutes,list_activities,list_concentrations,list_saltshave been removed.Solution.add_solventhas been marked for deprecation and will be removed in a future release. Useadd_soluteinstead.Python 3.9 version classifier in pyproject.toml (#247, @ugognw)
Solution.list_salts(useSolution.get_salt_dict()instead) (#258)
[1.2.0] - 2024-09-24¶
Fixed¶
Database: removed several erroneous species (such as
CO32-which was reallyCO3[-2]), corrected other parsing errors, and updated formula syntax for consistency with recentstandardize_formulachanges (e.g.,H4NCl -> NH4Cl) (#190, @rkingsbury)
Changed¶
Bump
pymatgentov2024.9.10for additional upstream formula fixes. (#188, @abhardwaj73)
Removed¶
BREAKING - dropped python 3.9 support, in accordance with numpy deprecation policy. (#188, @abhardwaj73)
[1.1.6] - 2024-09-01¶
Fixed¶
Solution.get_total_amount: Bugfix that caused an error when called on certain elements without specifying an oxidation state. For example,get_total_amount('N')could raise an exception in a solution containingNa(but noN) due to a flaw in a logical test.Solution._adjust_charge_balance: Removed a misleading and redundant log message (#162, @SuixiongTay)
Added¶
gibbs_mix: A new keyword argumentactivity_correctionwas added togibbs_mix. It defaults toTrue(no change from prior behavior), but can be set toFalsein order to calculate the ideal mixing energy, which is equivalent to only considering entropic effects. (#178, @Jaebeom-P)standardize_formula: Improve formatting of ammonium sulfate salts. Aqueous ammonium sulfate previously standardized toH8S(NO2)2(aq), now it will display as(NH4)2SO4(aq).
Changed¶
BREAKING
entropy_mixnow returns the ideal mixing entropy in units of J/K rather than the mixing energy in J. This was done to improve clarity with respect to the function name. Anactivity_correctionkwarg was added togibbs_mixso that you can still calculate the ideal mixing energy by setting it toFalse. (#178, @Jaebeom-P)Revise documentation of
gibbs_mix,entropy_mix, anddonnan_eql. (#178, @Jaebeom-P)CI: Improve comprehensiveness of CI dependency testing. (#163, #164, @abhardwaj73)
[1.1.5] - 2024-07-28¶
Fixed¶
Solution: Hotfix to remove a strayassertstatement in_adjust_charge_balancethat would sometimes cause errors inpHcharge balancing.
[1.1.4] - 2024-07-28¶
Fixed¶
Solution: Fix a bug inpHcharge balancing that erroneously prevented charge balancing from occurring in certain cases, and raised an error.
[1.1.3] - 2024-07-28¶
Fixed¶
Solution: Fix a bug in which settingbalance_chargetopHcould result in negative concentration errors when charge balancing or afterequilibratewas called.Solutionnow correctly enforces the ion product of water (Kw=1e-14) whenever adjusting the amounts of H+ or OH- for charge balancing.
Added¶
Solution._adjust_charge_balance: Added a privat helper method to consolidate charge balancing code used in__init__andequilibrate.
[1.1.2] - 2024-07-28¶
Fixed¶
Solution: Fix a bug in which settingbalance_chargetoautowhen the initial composition was electroneutral would cause errors and/or improper charge balancing afterequilibratewas called.
[1.1.1] - 2024-07-27¶
Fixed¶
equilibrate: Fixed a bug that could cause anAttributeErrorwhen pH was used for charge balancing.Database:
size.radius_ionicwas missing units forNi[+2]andCr[+3]. Correct units have been added.
Added¶
Solution: New automatic charge balancing method will automatically identify the majority (highest concentration) cation or anion as appropriate (depending on the charge balance) for charge balancing. To use this mode, setbalance_charge='auto'when instantiating aSolution.
Changed¶
Solution.add_amount: This method will now add solutes that are absent from the Solution. Previously, calling, e.g.,add_amount('Na+', '1 mol')on aSolutionthat did not contain any sodium would result in an error. A warning is logged if the method has to add a new solute.Units: use the upstream chemistry context from
pintinstead of the custom one from 2013.pre-commit autoupdateMisc. linting and code quality improvements.
Unit tests: update
tmpdirtotmp_pathtext fixture.CI: Small updates to pre-commit and GitHub actions per scientific python repo review.
[1.0.3] - 2024-07-20¶
Fixed¶
standardize_formula: Fix incorrect display of additional formulas, including methane which was shown as “H4C(aq)”, other tri-anions (N3-, P3-), and a variety of haloacetic acids. For example, tricholoracetic acid was previously shown as'C2Cl3O2[-1]'but will now display as'CCl3COO[-1]'.
Added¶
standardize_formula:pyEQLcan now parse ion formulas that contain unicode superscript or subscript characters, which makes input even more flexible. For example,"PO₄³⁻"and"Co²⁺"will now standardize correctly to"PO4[-3]"and"Co[+2]", respectively.
Changed¶
Housekeeping: move all project configuration to
pyproject.toml
[1.0.2] - 2024-07-09¶
Fixed¶
standardize_formula: Fix incorrect display of ammonium/ammonia. Previously, their formulas were shown as “H4N[+1]” and “H3N(aq)”, respectively. They now correctly display as NH4 and NH3. Similar fixes were implemented for HPO4[-2] / H2PO4[-1] / H3PO4, formate (HCOO[-1]), oxalate (C2O4[-2]), thicyanate (SCN[-1]), and triiodide (I3[-1]). Fixes #136 (@xiaoxiaozhu123)
[1.0.1] - 2024-06-17¶
Added¶
Added
NPY201ruleset toruffconfiguration to check support fornumpy2.0
Fixed¶
NativeEOSandPHREEQCEOSequilibrate: Fixed a charge balancing bug that cause repeated calls toequlibrateto severely distort the pH and/or the composition. (#141)[https://github.com/KingsburyLab/pyEQL/issues/141]UnicodeDecodeErrorwhen trying to connect to ion database on non-English platforms (#122)
Changed¶
Replace
mathwithnumpyfunctions throughout. This mainly changed calls tologandexp.Docs: Fix missing close parentheses in docstring (@Andrew S. Rosen)
[1.0.0] - 2024-03-17¶
Added¶
Solution.__init__: new keyword argumentlog_levelallows user to control the verbosity of log messages by setting the level (e.g., ERROR, WARNING, etc.) that will be shown in stdout.Docs: added a note about a workaround for Apple M1/M2 Macs proposed by @xiaoxiaozhu123
Changed¶
Solution.__init__: The deprecated format for specifying solutes (e.g.,[["Na+", "0.5 mol/L]]) which previously only generated log warning message, now raises aDeprecationWarning. Use dict-style input (e.g.,{"Na+":"0.5 mol/L"}) instead.New logo! Updated the
pyEQLlogo (for the first time in 9 years!) to address an obsolete font in the .svg and modernize the design.
Removed¶
BREAKING All methods and functions (with the exception of
Solution.list_XXXmethods) previously marked with deprecation warnings have been removed.
[0.15.1] - 2024-03-13¶
Fixed¶
Solution.get_total_amount: Fixed an issue in whichppmunits would fail.
[0.15.0] - 2024-03-13¶
Added¶
utils.interpret_units: New method to “sanitize” environmental engineering units like ppm to strings thatpintcan understand, e.g. ppm -> mg/L. This method is now used inget_amountandget_total_amountto ensure consistency in how they process units.
Changed¶
CI:
pre-commit autoupdate
Fixed¶
Solution: Fixed an issue in which repeated calls toequilibratewhen usingNativeEOSorPHREEQCEOSwould change the mass of theSolutionslightly. This was attributed to the fact thatpyEQLandPHREEQCuse slightly different molecular weights for water.Solution:get_total_amountand related methods could fail when the oxidation state of an element was unknown (e.g., ‘Br’) (Issue #116)
[0.14.0] - 2024-03-05¶
Added¶
NativeEOS/PhreeqcEOS: Addedtry/catchso thatpyEQLcan still be used on platforms that PHREEQC does not support, such as Apple Silicon. In such cases, functions likeequilibratethat depend on PHREEQC will raise errors, but everything else can still be used.CI: Added Apple M1 runner (GitHub:
macos-14) to the CI tests.
Fixed¶
CI: Addressed several issues in the testing configuration which had resulted in testing fewer operating systems x python version combinations than intended. CI tests now correctly and comprehensively test every supported version of python on every os (macos, windows, ubuntu).
utils.FormulaDict: implemented__contains__so thatget()works correctly in python 3.12+. See https://github.com/python/cpython/issues/105524Docs: fixed many small problems in documentation causing equations and examples to render incorrectly.
Solution.from_file: Add missing@classmethoddecorator; update documentation.
[0.13.0] - 2024-03-05¶
Fixed¶
equilibrium.alpha(): Fixed incorrect calculation of acid-base distribution coefficient for multiprotic acids.
[0.12.2] - 2024-02-25¶
Fixed¶
Solution.get_total_amount: Fix bug that would cause the method to fail if units with names not natively understood bypint(e.g., ‘ppm’) were passed.
[0.12.1] - 2024-02-25¶
Fixed¶
Solute.from_formula: Fix bug in which an uncaught exception could occur when ifpymatgenfailed to guess the oxidation state of a solute. (Issue #103 - thanks to @xiaoxiaozhu123 for reporting).Solution.get_total_amount: Fix bug that would cause the method to fail if mass-based units such as mg/L or ppm were requested.
[0.12.0] - 2024-02-15¶
Added¶
Solution: new kwargdefault_diffusion_coeffwhich allows the user to specify a value to use when a species diffusion coefficient is missing from the database. By default, the value for NaCl salt (1.61e-9 m2/s) is used. This is important for conductivity and transport number calculations, which perform weighted summations of diffusion coefficients over every species in the solution. Previously, species with missing diffusion coefficients would be excluded from such calculations, possibly resulting in inaccuracies, particularly after callingequilibrate(), which often generates charged complexes such as NaSO4- or MgCl+.
Fixed¶
Solution.__add__: Bugfix in the addition operation+that could cause problems with child classes (i.e., classes that inherit fromSolution) to work improperly
Changed¶
Removed deprecated
pkg_resourcesimport in favor ofimportlib.resources
[0.11.1] - 2023-12-23¶
Added¶
Add tests for
gibbs_mixandentropy_mixfunctions. Format docstrings in Google style.
Fixed¶
Solution.from_preset: Fixed a packaging error that made this method fail with aFileNotFoundError.
Removed¶
functions.pyis no longer imported into the root namespace. You’ll now need to sayfrom pyEQL.functions import gibbs_mixinstead offrom pyEQL import gibbs_mix
[0.11.0] - 2023-11-20¶
Changed¶
PhreeqcEOS: performance improvements for thephreeqcengine. TheEOSinstance now retains thephreeqpythonsolution object in between calls, only re-initializing it if the composition of theSolutionhas changed since the previous call.
Fixed¶
equilibrate: Fixed several bugs affectingNativeEOSandPhreeqcEOSin which callingequilibrate()would mess up the charge balance. This was especially an issue ifbalance_chargewas set to something other thanpH.
Removed¶
equilibrium.equilibrate_phreeqc()has been removed to reduce redundant code. All its was absorbed intoNativeEOSandPhreeqcEOS
[0.10.1] - 2023-11-12¶
Added¶
utility function
create_water_substancewith caching to speed up access to IAPWS instances
Changed¶
Solution.get_diffusion_coefficient: the default diffusion coefficient (returned when D for a solute is not found in the database) is now adjusted for temperature and ionic strength.Solution.water_substance- use the IAPWS97 model instead of IAPWS95 whenever possible, for a substantial speedup.
[0.10.0] - 2023-11-12¶
Added¶
Solution: Revamped docstrings forconductivity,get_transport_number,get_molar_conductivity, andget_diffusion_coefficient.Solution: new methodget_diffusion_coefficientfor dedicated retrieval of diffusion coefficients. This method implements an improved algorithm for temperature adjustment and a new algorithm for adjusting infinite dilution D values for ionic strengthe effects. The algorithm is identical to that implemented in PHREEQC >= 3.4.Database: empirical parameters for temperature and ionic strength adjustment of diffusion coefficients for 15 solutes
Added tests for temperature and ionic strength adjustment and conductivity
Docs: new tutorial notebooks
Docs: remove duplicate contributing pages (Closes #68)
Solution: new methodto_file()for more convenient saving Solution object to json or yaml files. (@kirill-push)Solution: new methodfrom_file()for more convenient loading Solution object from json or yaml files. (@kirill-push)Solution: new classmethodfrom_preset()toreplace pyEQL.functions.autogenerate()and instantiate a solution from a preset composition. (@kirill-push)
Changed¶
Solution: method af adjusting diffusion coefficients for temperature was updated (same as used in PHREEQC >= 3.4)Solution.conductvity: improved equation (same as used in PHREEQC >= 3.4) which is more accurate at higher concentrations
Fixed¶
Database errors with
Cs[+1]diffusion coefficient andKBrPitzer parametersRestored filter that suppresses duplicate log messages
Deprecated¶
replace pyEQL.functions.autogenerate()is now deprecated. Usefrom_presetinstead.
Removed¶
The
activity_correctionkwarg inget_transport_numberhas been removed, because this now occurs by default and is handled inget_diffusion_coefficient.
[0.9.2] - 2023-11-07¶
Fixed¶
Restored filter that suppresses duplicate log messages
[0.9.1] - 2023-11-04¶
Added¶
format_solutes_dict()method added into the utils module to help format solutes dictionaries with a unit. (@DhruvDuseja)
Changed¶
Native property database is now instantiated on
pyEQL.__init__to speed subsequent access bySolutionNumerous performance optimization increased the speed of many
Solutionproperty and method calls by 3x-10x
[0.9.0] - 2023-10-17¶
Added¶
Solution.print()added to take the place of the deprecatedlist_xxxmethods.
Changed¶
Breaking
pyEQL.unitdeprecation machinery has been removed to quiet the warning messages on import. ThepyEQLunit registry was renamed topyEQL.uregin v0.6.1.Significant documentation updates.
Solution.componentsis now automatically sorted in descending order of amount, for consistency withanions,cations, andneutrals.
Removed¶
Solution.list_solutes()has been removed. UseSolution.components.keys()instead.
Fixed¶
Bugfix in
as_dictto make serialization viadumpfnpossible. Previously,Quantitywere not converted to a serializable form. Now,Quantityare converted tostrinas_dict().
Removed¶
python 3.8 is no longer supported
[0.8.1] - 2023-10-01¶
Changed¶
from_dictmodified to avoid call tosuper(), making for more robust behavior ifSolutionis inherited.
Removed¶
copy()method was removed for consistency withpythonconventions (it returned a deep rather than a shallow copy). Usecopy.deepcopy(Solution)instead.
Fixed¶
Bugfix in
as_dictin which thesolutesattribute was saved withQuantityrather thanfloatSimplified
Solution.get_conductivityto avoid errors in selected cases.Required
pymatgenversion was incorrectly set at2022.8.10when it should be2023.8.10Bug in
get_osmotic_coefficientthat caused aZeroDivisionErrorwith an empty solution.
[0.8.0] - 2023-09-27¶
Added¶
New electrolyte engine
PhreeqcEOSprovidesphreeqpythonactivities withinpyEQLSolution: use total element concentrations when performing salt matching (can be disabled via kwarg)Solution: add speciation support to the native engine viaphreeqpythonSolution: add keyword argument to enable automatic charge balancingSalt: class is now MSONable (i.e., serializable viaas_dict/from_dict)Solution: new propertiesanions,cations,neutralsprovide easy access to subsetscomponents.Solution: improvements toget_total_amount.Solution: new functionget_components_by_elementthat lists all species associated with elements in specific oxidation states.Solution: new propertieselementsandchemical_system, new functionget_el_amt_dictto compute the total number of moles of each element present in the Solution.
Changed¶
pHattribute is now calculated from the H+ concentration rather than its activity. For the old behavior, useSolution.p('H+')which defaults to applying the activity correction.Update
test_salt_ion_matchtopytestformat and add additional testsUpdate
test_bulk_propertiestopytestformat
Removed¶
Solution.list_salts()has been removed. SeeSolution.get_salt_dict()for equivalent functionalitysalt_ion_match.generate_salt_listandidentify_salthave been removed. SeeSolution.get_salt_dict()andSolution.get_salt()for equivalent functionality.
Fixed¶
Bug in
get_transport_numbercaused by migration to standardized solute formulasScaling of salt concentrations in
get_salt_dictwas incorrect in some edge casesDisable hydrate notation in
standardize_formula, which caused hydroxides such as ‘Ca(OH)3’ to be written ‘CaO2H.H2O’Inconsistent formatting of oxidation states in
get_total_amountandSoluteInconsistent return type from
get_propertywhenmolar_volumeanddiffusion_coefficientwere missingTwo issues with the formatting of the
H2O(aq)entry in the database,pyeql_db.json
[0.7.0] - 2023-08-22¶
Changed¶
Solutionnow more robustly converts any user-supplied formulas into unique values usingpymatgen.core.ion.Ion.reduced_formula. This means that the.componentsorsolventattributes may now differ slightly from whatever is entered during__init__. For example,Solution(solvent='H2O').solventgivesH2O(aq). This behavior resolved a small bug that could occur when mixing solutions. User supplied formulas passed toget_amountorSolution.components[xxx]can still be any valid formula. E.g.,Solution.components["Na+"],Solution.components["Na+1"], andSolution.components["Na[+]"]will all return the same thing.
[0.6.1] - 2023-08-22¶
Added¶
Solution: enable passing anEOSinstance to theenginekwarg.Solution: new propertiestotal_dissolved_solidsand aliasTDSSolution: support new units inget_amount- ppm, ppb, eq/L, etc.Solution: implemented arithmetic operations+(for mixing two solutions),*and\for scaling their amounts
Changed¶
pyEQL.unitwas renamed topyEQL.ureg(short forUnitRegistry) for consistency with thepintdocumentation and tutorials.
[v0.6.0] - 2023-08-15¶
Added¶
Solution: add tests to confirm that solution density changes with temperature and pressureSolution: add tests forcharge_balance,alkalinity,hardness,osmotic_pressure,p(), andconductivitySolution:pEattribute and kwargSolution: add support for passing solutes as adictImplement extensible system for connecting
Solutionto various activity and speciation models. Models can be integrated into pyEQL by implementing anEOSclass. The desired activity model is selected on init. Currently available models arenative(for pyEQL’s implementation of Pitzer, which decays gracefully into Debye-Huckel and other models if parameters are not available) oridealfor a dummy engine that returns unit activity coefficients. Support for additional external engines such asphreeqpythonis planned.Add
pymatgen,monty, andmaggmaas dependenciesAdd
pre-commitconfigurationAdd pull request template, new GitHub actions, and
tox -e autodocsenvironment to serve and update docs in real timeAdd pre-commit configuration and lint with
ruffusing rulesets mostly borrowed frompymatgenAdd more comprehensive platform testing via
tox
Changed¶
Complete overhaul of the property database. The database is now distributed in a .json file containing serialize
Soluteobjects.Solutioncan now be connected to this database (by default) or to any othermaggmaStorecontaining properly formatted data.database.py,parameter.py, and all the.tsvdata files have been removed and replaced withpyeql_db.json.Docs: update, change theme, convert to .md format, and adopt Keep a Changelog format
Replace
water_properties.pywith iapws packageReplace
elements.py`` withpymatgen.core.periodic_table`Solution.charge_balancenow returns in equivalents instead of CoulombsMigrate all tests to
pytestUpdate packaging format to use pyscaffold
Deprecated¶
Solution: new propertiespressure,temperature,volume,pH,mass,density,viscosity_dynamic,viscosity_kinematic,ionic_strength,conductivity,debye_length,bjerrum_length,alkalinity,hardness,dielectric_constant,osmotic_pressure,solvent_mass,charge_balancehave replaced the corresponding get_XXX and set_XXX (for temperature and pressure) methods, which will be removed in a future release.get_viscosity_relativewill be removed entirely.Solute: methodsget_formal_charge(),get_name(), andget_molecular_weight()have been replaced by direct access to the attributescharge,formula, andmw, respectively.
Removed¶
disable ‘verbose’ kwarg in
get_activityandget_activity_coefficient
Fixed¶
Fixed various documentation rendering issues
bug in
alkalinity
[0.5.2] - 2020-04-21¶
Fix breaking bug introduced by upstream pint change to avogadro_number
Format project with black
Misc. linting and docstring changes
[0.5.0] 2018-09-19¶
Implement the effective Pitzer model for improved activity calculations in multicomponent solutions
Add support for calculation of activity and osmotic coefficients on different scales
Add support for calculating % by weight to get_amount()
Added methods for calculating the osmolarity or osmolality of a Solution
Add the ability to filter list_concentrations() to show only cations or anions
Add two medical solutions - normal saline and Ringer’s lacate -to the autogenerate method
Add shorthand abbreviations for ‘seawater’ and ‘wastewater’ in the autogenerate method
Enhance automatic test suite to compare results with experimental data based on relative error
Add test suites for the effective Pitzer model and a multicomponent salt solution
DEPRECATED get_mole_fraction. Use get_amount() instead
Fix bug causing get_activity_coefficient to fail if the solute concentration was zero
[0.4.0] 2016-07-14¶
Add ability to calculate dielectric constant based on solution composition for salts
Add database entries for the viscosity ‘B’ parameter for 63 more inorganic ions
Add domestic wastewater and human urine to the autogenerate()method
Improve entry point for running automated tests (#16, thanks Hernan Grecco)
Significantly expand documentation of activity correction methods
Make output of get_osmotic_coefficient more verbose when Pitzer parameters are not found
Fix bug causing activity corrections for non 1:1 salts to be calculated incorrectly (#15)
Fix bug causing ‘bad operand type’ error when calculating osmotic pressure on some systems
Fix bug causing ValueError exceptions when a solute has zero concentration
Numerous fixes and corrections in the documentation
[0.3.1] 2016-02-24¶
Fix packaging problems preventing installation from PyPi
Fix character encoding issue in Erying_viscosity database file
[0.3.0] 2016-01-15¶
Add method to calculate the total concentration of an element in a solution
Add method to automatically generate certain solutions (like seawater)
Add method to calculate the hardness of a solution
Add method to calculate the alkalinity of a solution
Add method to calculate the charge balance of a solution
Add method to calculate the Bjerrum length
Add database entries for hydrated and ionic radii of 23 commonions
Add database entries for the ‘B’ parameter in the Jones-Dole viscosity equation for 20 common ions
Add test suites for solute property methods, hardness, osmotic coefficient, and Debye length
Improve logging system to work better when using pyEQL interactively
Improved README with graphics and rich formatting
Fix bug related to activity and osmotic coefficients for multivalent salts
Fix bug related to retrieval of water properties
Documentation enhancements and fixes
[0.2.2] 2015-08-28¶
Fix bug in get_amount() causing no output when mass-based units were specified.
[0.2.1] 2015-05-06¶
Add 93 entries to diffusion coefficient database
Add 93 entries to Pitzer partial molar volume parameters database
Add 130 entries to Pitzer activity parameters database
Change extension for database files from .csv to .tsv
Corrections and additions to the contributing documentation
Uploaded to the Python Package Index for easier installation
Add this changelog
[0.2.0] 2015-03-26¶
First public release