From eb19c84eddbd29dc6f50c0307f657d5cd653cf63 Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Wed, 26 Jun 2024 09:30:01 +0200 Subject: [PATCH] regenerated lib via gen.toml including celsius --- pyenzyme/model.py | 1 + pyenzyme/units/predefined.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 8e5893e..0c35074 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -2230,6 +2230,7 @@ class UnitType(Enum): AVOGADRO = "avogadro" BECQUEREL = "becquerel" CANDELA = "candela" + CELSIUS = "celsius" COULOMB = "coulomb" DIMENSIONLESS = "dimensionless" FARAD = "farad" diff --git a/pyenzyme/units/predefined.py b/pyenzyme/units/predefined.py index b0531d2..729de81 100644 --- a/pyenzyme/units/predefined.py +++ b/pyenzyme/units/predefined.py @@ -44,6 +44,10 @@ def gram(): def kelvin(): return BaseUnit(kind=UnitType.KELVIN, exponent=1, scale=1) + @staticmethod + def celsius(): + return BaseUnit(kind=UnitType.CELSIUS, exponent=1, scale=1) + @staticmethod def dimensionless(): return BaseUnit(kind=UnitType.DIMENSIONLESS, exponent=1, scale=1) @@ -139,6 +143,7 @@ def dimensionless(): kelvin = UnitDefinition(base_units=[Unit.kelvin()])._get_name() K = UnitDefinition(base_units=[Unit.kelvin()])._get_name() +celsius = UnitDefinition(base_units=[Unit.celsius()])._get_name() ## Ontology