From 540b35ffcefdada0272c6a8364d2bec486823f92 Mon Sep 17 00:00:00 2001 From: FNTwin Date: Fri, 21 Jun 2024 14:32:55 +0000 Subject: [PATCH 1/3] Update python matrix to catch errors in 3.11 -> 3.12 --- .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 1f04d36..9194d2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11", "3.12"] os: ["ubuntu-latest"] runs-on: ${{ matrix.os }} From 104c31306ecdb78f2f28494c207a2241b7ff2e54 Mon Sep 17 00:00:00 2001 From: FNTwin Date: Fri, 21 Jun 2024 14:54:01 +0000 Subject: [PATCH 2/3] <3.12 enum compatibility --- openqdc/datasets/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openqdc/datasets/base.py b/openqdc/datasets/base.py index fcf9d95..026bfd7 100644 --- a/openqdc/datasets/base.py +++ b/openqdc/datasets/base.py @@ -250,7 +250,7 @@ def force_unit(self): units = self.__forces_unit__.split("/") if len(units) > 2: units = ["/".join(units[:2]), units[-1]] - return ForceTypeConversion(*units) + return ForceTypeConversion(tuple(units)) # < 3.12 compatibility @property def root(self): From f8a8aab3cd422e08c02eebb9332addd52b7d7fa3 Mon Sep 17 00:00:00 2001 From: FNTwin Date: Fri, 21 Jun 2024 14:59:07 +0000 Subject: [PATCH 3/3] mev->ev correction --- openqdc/utils/units.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openqdc/utils/units.py b/openqdc/utils/units.py index 55f12e5..d8613a5 100644 --- a/openqdc/utils/units.py +++ b/openqdc/utils/units.py @@ -146,8 +146,8 @@ def get_conversion(in_unit: str, out_unit: str): Conversion("ev", "kcal/mol", lambda x: x * 23.0605) Conversion("ev", "hartree", lambda x: x * 0.0367493) Conversion("ev", "kj/mol", lambda x: x * 96.4853) -Conversion("mev", "ev", lambda x: x * 1000.0) -Conversion("ev", "mev", lambda x: x * 0.0001) +Conversion("ev", "mev", lambda x: x * 1000.0) +Conversion("mev", "ev", lambda x: x * 0.0001) Conversion("ev", "ryd", lambda x: x * 0.07349864) # kcal/mol conversion