Skip to content

Commit

Permalink
Implemented backwards compatible reading procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomDefaultUser committed Nov 19, 2024
1 parent 49bbc5c commit 90f05ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mala/common/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 90f05ab

Please sign in to comment.