From c3fd98ce97354eb843c24eb205ca24a8a6540e83 Mon Sep 17 00:00:00 2001 From: ruoxi Date: Mon, 27 Feb 2023 16:19:38 -0800 Subject: [PATCH 1/3] fix reduced formula Fixed the handling of O-H containing compositions, where the string 'HO' was replaced by 'OH' directly in the formula. This will cause some materials, e.g. HSbO2, to have the wrong reduced formula of SbOH2. --- pymatgen/core/ion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymatgen/core/ion.py b/pymatgen/core/ion.py index 3d5408af759..b1d4f85283d 100644 --- a/pymatgen/core/ion.py +++ b/pymatgen/core/ion.py @@ -147,7 +147,7 @@ def get_reduced_formula_and_factor(self, iupac_ordering: bool = False, hydrates: d = {k: int(round(v)) for k, v in comp.get_el_amt_dict().items()} (formula, factor) = reduce_formula(d, iupac_ordering=iupac_ordering) - if "HO" in formula: + if "HO" in formula and self.composition['H'] == self.composition['O']: formula = formula.replace("HO", "OH") if nH2O > 0: From 1da9dda299ae110d0c9f39c7553ad9d46d06f1c1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 00:23:52 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pymatgen/core/ion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymatgen/core/ion.py b/pymatgen/core/ion.py index b1d4f85283d..0ddc9b9d8ab 100644 --- a/pymatgen/core/ion.py +++ b/pymatgen/core/ion.py @@ -147,7 +147,7 @@ def get_reduced_formula_and_factor(self, iupac_ordering: bool = False, hydrates: d = {k: int(round(v)) for k, v in comp.get_el_amt_dict().items()} (formula, factor) = reduce_formula(d, iupac_ordering=iupac_ordering) - if "HO" in formula and self.composition['H'] == self.composition['O']: + if "HO" in formula and self.composition["H"] == self.composition["O"]: formula = formula.replace("HO", "OH") if nH2O > 0: From 92a86397e9aa9c4770778b0f094f3b2fb1a29186 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 09:58:05 +0000 Subject: [PATCH 3/3] Bump pypa/cibuildwheel from 2.11.4 to 2.12.3 Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.11.4 to 2.12.3. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](https://github.com/pypa/cibuildwheel/compare/v2.11.4...v2.12.3) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53263803c3f..9b5c8c354ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,7 +151,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.11.4 + uses: pypa/cibuildwheel@v2.12.3 env: CIBW_BUILD: cp${{ matrix.python-version }}-* - uses: actions/upload-artifact@v3