pyEQL 1.0.3__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyEQL/utils.py +1 -47
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/METADATA +11 -13
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/RECORD +8 -8
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/WHEEL +2 -1
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/AUTHORS.md +0 -0
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/COPYING +0 -0
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/LICENSE.txt +0 -0
- {pyEQL-1.0.3.dist-info → pyEQL-1.1.0.dist-info}/top_level.txt +0 -0
pyEQL/utils.py
CHANGED
|
@@ -60,18 +60,6 @@ def standardize_formula(formula: str):
|
|
|
60
60
|
be enclosed in square brackets to remove any ambiguity in the meaning of the formula. For example, 'Na+',
|
|
61
61
|
'Na+1', and 'Na[+]' will all standardize to "Na[+1]"
|
|
62
62
|
"""
|
|
63
|
-
# fix permuted sign and charge number (e.g. Co2+)
|
|
64
|
-
for str, rep in zip(["²⁺", "³⁺", "⁴⁺", "²⁻", "³⁻", "⁴⁻"], ["+2", "+3", "+4", "-2", "-3", "-4"]):
|
|
65
|
-
formula = formula.replace(str, rep)
|
|
66
|
-
|
|
67
|
-
# replace superscripts with non superscripts
|
|
68
|
-
for char, rep in zip("⁻⁺⁰¹²³⁴⁵⁶⁷⁸⁹", "-+0123456789"):
|
|
69
|
-
formula = formula.replace(char, rep)
|
|
70
|
-
|
|
71
|
-
# replace subscripts with non subscripts
|
|
72
|
-
for char, rep in zip("₀₁₂₃₄₅₆₇₈₉", "0123456789"):
|
|
73
|
-
formula = formula.replace(char, rep)
|
|
74
|
-
|
|
75
63
|
sform = Ion.from_formula(formula).reduced_formula
|
|
76
64
|
|
|
77
65
|
# TODO - manual formula adjustments. May be implemented upstream in pymatgen in the future
|
|
@@ -93,49 +81,15 @@ def standardize_formula(formula: str):
|
|
|
93
81
|
# thiocyanate
|
|
94
82
|
elif sform == "CSN[-1]":
|
|
95
83
|
sform = "SCN[-1]"
|
|
96
|
-
# triiodide
|
|
84
|
+
# triiodide
|
|
97
85
|
elif sform == "I[-0.33333333]":
|
|
98
86
|
sform = "I3[-1]"
|
|
99
|
-
elif sform == "N[-0.33333333]":
|
|
100
|
-
sform = "N3[-1]"
|
|
101
|
-
elif sform == "P[-0.33333333]":
|
|
102
|
-
sform = "P3[-1]"
|
|
103
87
|
# formate
|
|
104
88
|
elif sform == "HCOO[-1]":
|
|
105
89
|
sform = "HCO2[-1]"
|
|
106
90
|
# oxalate
|
|
107
91
|
elif sform == "CO2[-1]":
|
|
108
92
|
sform = "C2O4[-2]"
|
|
109
|
-
# triflate
|
|
110
|
-
elif sform == "CS(OF)3[-1]":
|
|
111
|
-
sform = "CF3SO3[-1]"
|
|
112
|
-
# haloacetic acids of F, Cl, Br, I
|
|
113
|
-
elif sform == "C2Cl3O2[-1]":
|
|
114
|
-
sform = "CCl3COO[-1]"
|
|
115
|
-
elif sform == "C2O2F3[-1]":
|
|
116
|
-
sform = "CF3COO[-1]"
|
|
117
|
-
elif sform == "C2I3O2[-1]":
|
|
118
|
-
sform = "CI3COO[-1]"
|
|
119
|
-
elif sform == "C2Br3O2[-1]":
|
|
120
|
-
sform = "CBr3COO[-1]"
|
|
121
|
-
|
|
122
|
-
# Cl+F
|
|
123
|
-
elif sform == "C2Cl2O2F[-1]":
|
|
124
|
-
sform = "CFCl2COO[-1]"
|
|
125
|
-
elif sform == "C2Cl(OF)2[-1]":
|
|
126
|
-
sform = "CF2ClCOO[-1]"
|
|
127
|
-
|
|
128
|
-
# Cl+Br
|
|
129
|
-
elif sform == "C2Br(ClO)2[-1]":
|
|
130
|
-
sform = "CBrCl2COO[-1]"
|
|
131
|
-
elif sform == "C2Br2ClO2[-1]":
|
|
132
|
-
sform = "CBr2ClCOO[-1]"
|
|
133
|
-
|
|
134
|
-
# Cl+I
|
|
135
|
-
elif sform == "C2I(ClO)2[-1]":
|
|
136
|
-
sform = "CICl2COO[-1]"
|
|
137
|
-
elif sform == "C2I2ClO2[-1]":
|
|
138
|
-
sform = "CI2ClCOO[-1]"
|
|
139
93
|
|
|
140
94
|
# TODO - consider adding recognition of special formulas like MeOH for methanol or Cit for citrate
|
|
141
95
|
return sform
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyEQL
|
|
3
|
-
Version: 1.0
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Python tools for solution chemistry
|
|
5
|
+
Home-page: https://github.com/KingsburyLab/pyEQL
|
|
6
|
+
Author: Ryan Kingsbury
|
|
7
|
+
Author-email: kingsbury@princeton.edu
|
|
8
|
+
License: LGPL3
|
|
9
|
+
Project-URL: Documentation, https://pyeql.readthedocs.io/
|
|
10
|
+
Platform: any
|
|
14
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
15
13
|
Classifier: Intended Audience :: Science/Research
|
|
16
|
-
Classifier: Operating System :: OS Independent
|
|
17
14
|
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
18
16
|
Requires-Python: >=3.9
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
17
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
20
18
|
License-File: LICENSE.txt
|
|
21
19
|
License-File: COPYING
|
|
22
20
|
License-File: AUTHORS.md
|
|
@@ -7,7 +7,7 @@ pyEQL/pint_custom_units.txt,sha256=XHmcMlwVvqF9nEW7_e9Xgyq-xWEr-cDYqieas11T3eY,2
|
|
|
7
7
|
pyEQL/salt_ion_match.py,sha256=0nCZXmeo67VqcyYWQpPx-81hjSvnsg8HFB3fIyfjW_k,4070
|
|
8
8
|
pyEQL/solute.py,sha256=no00Rc3tRfHmyht4wm2UXA1KZhKC45tWMO5QEkZY6yg,5140
|
|
9
9
|
pyEQL/solution.py,sha256=XwtQmll3gPwdnnkXpQsnO7QebwTjplmlfhbEIU8rHDo,115940
|
|
10
|
-
pyEQL/utils.py,sha256=
|
|
10
|
+
pyEQL/utils.py,sha256=unsY7zrrhl_1mOmt9_kumSKmLE5N5Hvh4bOErfS3nws,5168
|
|
11
11
|
pyEQL/database/geothermal.dat,sha256=kksnfcBtWdOTpNn4CLXU1Mz16cwas2WuVKpuMU8CaVI,234230
|
|
12
12
|
pyEQL/database/llnl.dat,sha256=jN-a0kfUFbQlYMn2shTVRg1JX_ZhLa-tJ0lLw2YSpLU,751462
|
|
13
13
|
pyEQL/database/phreeqc_license.txt,sha256=8W1r8VxC2kVptIMSU9sDFNASYqN7MdwKEtIWWfjTQuM,2906
|
|
@@ -18,10 +18,10 @@ pyEQL/presets/rainwater.yaml,sha256=S0WHZNDfCJyjSSFxNFdkypjn2s3P0jJGCiYIxvi1ibA,
|
|
|
18
18
|
pyEQL/presets/seawater.yaml,sha256=oryc1CkhRz20RpWE6uiGiT93HoZnqlB0s-0PmBWr3-U,843
|
|
19
19
|
pyEQL/presets/urine.yaml,sha256=0Njtc-H1fFRo7UhquHdiSTT4z-8VZJ1utDCk02qk28M,679
|
|
20
20
|
pyEQL/presets/wastewater.yaml,sha256=jTTFBpmKxczaEtkCZb0xUULIPZt7wfC8eAJ6rthGnmw,502
|
|
21
|
-
pyEQL-1.0.
|
|
22
|
-
pyEQL-1.0.
|
|
23
|
-
pyEQL-1.0.
|
|
24
|
-
pyEQL-1.0.
|
|
25
|
-
pyEQL-1.0.
|
|
26
|
-
pyEQL-1.0.
|
|
27
|
-
pyEQL-1.0.
|
|
21
|
+
pyEQL-1.1.0.dist-info/AUTHORS.md,sha256=K9ZLhKFwZ2zLlFXwN62VuUYCpr5T6n4mOUCUHlytTUs,415
|
|
22
|
+
pyEQL-1.1.0.dist-info/COPYING,sha256=Ww2oUywfFTn242v9ksCgQdIVSpcMXJiKKePn0GFm25E,7649
|
|
23
|
+
pyEQL-1.1.0.dist-info/LICENSE.txt,sha256=2Zf1F7RzbpeposgIxUydpurqNCMoMgDi2gAB65_GjwQ,969
|
|
24
|
+
pyEQL-1.1.0.dist-info/METADATA,sha256=1KbuGQ1gjYRWA-8cq2cb_OmZgW8DTpKoCZ6_6DpQ9jo,5889
|
|
25
|
+
pyEQL-1.1.0.dist-info/WHEEL,sha256=0XQbNV6JE5ziJsWjIU8TRRv0N6SohNonLWgP86g5fiI,109
|
|
26
|
+
pyEQL-1.1.0.dist-info/top_level.txt,sha256=QMOaZjCAm_lS4Njsjh4L0B5aWnJFGQMYKhuH88CG1co,6
|
|
27
|
+
pyEQL-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|