Skip to content

Commit 140d57c

Browse files
committed
Don't serialise helper attributes.
1 parent c9dd8f6 commit 140d57c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/somd2/config/_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,11 @@ def as_dict(self, sire_compatible=False):
688688
if value is None and sire_compatible:
689689
d[attr_l] = False
690690

691+
# Don't include lambda_schedule_name or perturbed_system_file in the dictionary,
692+
# since these are just helper attributes.
693+
d.pop("_lambda_schedule_name", None)
694+
d.pop("_perturbed_system_file", None)
695+
691696
# Handle the lambda schedule separately so that we can use simplified
692697
# keyword options.
693698

@@ -716,7 +721,6 @@ def as_dict(self, sire_compatible=False):
716721
and self._perturbed_system_file is not None
717722
):
718723
d["perturbed_system"] = str(self._perturbed_system_file)
719-
d.pop("perturbed_system_file", None)
720724

721725
return d
722726

0 commit comments

Comments
 (0)