diff --git a/deepmd/pt/model/model/__init__.py b/deepmd/pt/model/model/__init__.py index a46909622b..f2e03fb99e 100644 --- a/deepmd/pt/model/model/__init__.py +++ b/deepmd/pt/model/model/__init__.py @@ -196,7 +196,7 @@ def get_zbl_model(model_params): rmax = model_params["sw_rmax"] atom_exclude_types = model_params.get("atom_exclude_types", []) pair_exclude_types = model_params.get("pair_exclude_types", []) - return DPZBLModel( + model = DPZBLModel( dp_model, pt_model, rmin, @@ -205,6 +205,8 @@ def get_zbl_model(model_params): atom_exclude_types=atom_exclude_types, pair_exclude_types=pair_exclude_types, ) + model.model_def_script = json.dumps(model_params) + return model def _can_be_converted_to_float(value) -> Optional[bool]: