Skip to content

Commit

Permalink
add triflate anion
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Jul 20, 2024
1 parent e93b398 commit 4f9b41f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pyEQL/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def standardize_formula(formula: str):
# oxalate
elif sform == "CO2[-1]":
sform = "C2O4[-2]"
# triflate
elif sform == "CS(OF)3[-1]":
sform = "CF3SO3[-1]"
# haloacetic acids of F, Cl, Br, I
elif sform == "C2Cl3O2[-1]":
sform = "CCl3COO[-1]"
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_standardize_formula():
assert standardize_formula("H3PO4") == "H3PO4(aq)"
assert standardize_formula("H2SO4") == "H2SO4(aq)"
assert standardize_formula("HClO4") == "HClO4(aq)"
assert standardize_formula("CF3SO3-") == "CF3SO3[-1]"
# superscripts, subscripts, and permuted sign/charge number
assert standardize_formula("PO₄³⁻") == "PO4[-3]"
assert standardize_formula("Co²⁺") == "Co[+2]"
Expand Down

0 comments on commit 4f9b41f

Please sign in to comment.