From 90f05ab9a0a05e8d73d2238c838224805a878fba Mon Sep 17 00:00:00 2001 From: Lenz Fiedler Date: Tue, 19 Nov 2024 18:18:53 +0100 Subject: [PATCH] Implemented backwards compatible reading procedure --- mala/common/parameters.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mala/common/parameters.py b/mala/common/parameters.py index 5ec123e0..1a456ca8 100644 --- a/mala/common/parameters.py +++ b/mala/common/parameters.py @@ -1591,6 +1591,18 @@ def load_from_file( ].from_json(json_dict[key]) setattr(loaded_parameters, key, sub_parameters) + # Backwards compatability: + if key == "descriptors": + if ( + "use_atomic_density_energy_formula" + in json_dict[key] + ): + loaded_parameters.use_atomic_density_formula = ( + json_dict[key][ + "use_atomic_density_energy_formula" + ] + ) + # We iterate a second time, to set global values, so that they # are properly forwarded. for key in json_dict: