diff --git a/express/settings.py b/express/settings.py index be222695..91f7dab8 100644 --- a/express/settings.py +++ b/express/settings.py @@ -20,6 +20,9 @@ }, "surface_energy": {"reference": "express.properties.scalar.scalar_property_context.ScalarPropertyFromContext"}, "interfacial_energy": {"reference": "express.properties.scalar.scalar_property_context.ScalarPropertyFromContext"}, + "defect_formation_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/tests/unit/properties/scalar/test_defect_formation_energy.py b/tests/unit/properties/scalar/test_defect_formation_energy.py new file mode 100644 index 00000000..8b7da432 --- /dev/null +++ b/tests/unit/properties/scalar/test_defect_formation_energy.py @@ -0,0 +1,18 @@ +from tests.unit import UnitTestBase +from express.properties.scalar.scalar_property_context import ScalarPropertyFromContext + +DEFECT_FORMATION_ENERGY = {"units": "eV", "name": "defect_formation_energy", "value": 3.5} + + +class DefectFormationEnergyTest(UnitTestBase): + def setUp(self): + super().setUp() + + def tearDown(self): + super().tearDown() + + def test_defect_formation_energy(self): + property_ = ScalarPropertyFromContext( + "defect_formation_energy", None, value=DEFECT_FORMATION_ENERGY["value"] + ) + self.assertDeepAlmostEqual(property_.serialize_and_validate(), DEFECT_FORMATION_ENERGY)