From 54595aae263cc570f72e95248c2d44f8df0c822e Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 8 Mar 2024 20:27:46 -0500 Subject: [PATCH 1/3] add `atomic_output_def` to dpmodel Signed-off-by: Jinzhe Zeng --- deepmd/dpmodel/model/make_model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deepmd/dpmodel/model/make_model.py b/deepmd/dpmodel/model/make_model.py index ab8fc366cc..36790bd36f 100644 --- a/deepmd/dpmodel/model/make_model.py +++ b/deepmd/dpmodel/model/make_model.py @@ -470,4 +470,8 @@ def mixed_types(self) -> bool: """ return self.atomic_model.mixed_types() + def atomic_output_def(self) -> FittingOutputDef: + """Get the output def of the atomic model.""" + return self.atomic_model.atomic_output_def() + return CM From d48b145a99a4d7e1513c6b02fa877a2d823d80cd Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 8 Mar 2024 20:30:41 -0500 Subject: [PATCH 2/3] import Signed-off-by: Jinzhe Zeng --- deepmd/dpmodel/model/make_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deepmd/dpmodel/model/make_model.py b/deepmd/dpmodel/model/make_model.py index 36790bd36f..e0f7201886 100644 --- a/deepmd/dpmodel/model/make_model.py +++ b/deepmd/dpmodel/model/make_model.py @@ -30,6 +30,7 @@ OutputVariableCategory, OutputVariableOperation, check_operation_applied, + FittingOutputDef, ) from deepmd.dpmodel.utils import ( build_neighbor_list, From e22bc6418646fbadb14ac8445dd420ae3ff5f595 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 9 Mar 2024 01:31:03 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd/dpmodel/model/make_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/dpmodel/model/make_model.py b/deepmd/dpmodel/model/make_model.py index e0f7201886..1957e3d77b 100644 --- a/deepmd/dpmodel/model/make_model.py +++ b/deepmd/dpmodel/model/make_model.py @@ -26,11 +26,11 @@ BaseModel, ) from deepmd.dpmodel.output_def import ( + FittingOutputDef, ModelOutputDef, OutputVariableCategory, OutputVariableOperation, check_operation_applied, - FittingOutputDef, ) from deepmd.dpmodel.utils import ( build_neighbor_list,