diff --git a/express/settings.py b/express/settings.py index 7b12344c..4e545d90 100644 --- a/express/settings.py +++ b/express/settings.py @@ -19,6 +19,7 @@ "reference": "express.properties.scalar.thermal_correction_to_enthalpy.ThermalCorrectionToEnthalpy" }, "surface_energy": {"reference": "express.properties.scalar.scalar_property_context.ScalarPropertyFromContext"}, + "formation_energy": {"reference": "express.properties.scalar.scalar_property_context.ScalarPropertyFromContext"}, "reaction_energy_barrier": {"reference": "express.properties.scalar.reaction_energy_barrier.ReactionEnergyBarrier"}, "valence_band_offset": {"reference": "express.properties.scalar.scalar_property_context.ScalarPropertyFromContext"}, } diff --git a/pyproject.toml b/pyproject.toml index 04dc0c13..0f3a4d81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ dependencies = [ "pymatgen>=2023.8.10", "ase>=3.17.0", - "mat3ra-esse>=2026.5.27.post0", + "mat3ra-esse>=2026.5.30.post0", "jarvis-tools>=2023.12.12", # To avoid module 'numpy.linalg._umath_linalg' has no attribute '_ilp64' in Colab "numpy>=1.24.4,<2", diff --git a/tests/unit/properties/scalar/test_formation_energy.py b/tests/unit/properties/scalar/test_formation_energy.py new file mode 100644 index 00000000..f35ef34d --- /dev/null +++ b/tests/unit/properties/scalar/test_formation_energy.py @@ -0,0 +1,17 @@ +from tests.unit import UnitTestBase +from express.properties.scalar.scalar_property_context import ScalarPropertyFromContext + +FORMATION_ENERGY = {"units": "eV/atom", "name": "formation_energy", "value": -0.123} + + +class FormationEnergyTest(UnitTestBase): + def setUp(self): + super().setUp() + + def tearDown(self): + super().tearDown() + + def test_formation_energy(self): + parser = self.get_mocked_parser("formation_energy", FORMATION_ENERGY["value"]) # noqa : F841 + property_ = ScalarPropertyFromContext("formation_energy", None, value=FORMATION_ENERGY["value"]) + self.assertDeepAlmostEqual(property_.serialize_and_validate(), FORMATION_ENERGY)