From 3ee3f4ce0df5834ec0db5bed3b9820a122d287f8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 24 Jan 2024 10:25:13 -0500 Subject: [PATCH] add more abstractmethods to universal `DeepPot` (#3175) They are used by the downstream APIs, so must be implemented. --------- Signed-off-by: Jinzhe Zeng --- deepmd_utils/infer/deep_pot.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/deepmd_utils/infer/deep_pot.py b/deepmd_utils/infer/deep_pot.py index dec0a7c47c..66510ea349 100644 --- a/deepmd_utils/infer/deep_pot.py +++ b/deepmd_utils/infer/deep_pot.py @@ -122,5 +122,21 @@ def eval( # dpdata # ase + @abstractmethod + def get_ntypes(self) -> int: + """Get the number of atom types of this model.""" + + @abstractmethod + def get_type_map(self) -> List[str]: + """Get the type map (element name of the atom types) of this model.""" + + @abstractmethod + def get_dim_fparam(self) -> int: + """Get the number (dimension) of frame parameters of this DP.""" + + @abstractmethod + def get_dim_aparam(self) -> int: + """Get the number (dimension) of atomic parameters of this DP.""" + __all__ = ["DeepPot"]