Skip to content

Commit

Permalink
add more abstractmethods to universal DeepPot (#3175)
Browse files Browse the repository at this point in the history
They are used by the downstream APIs, so must be implemented.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Jan 24, 2024
1 parent 2a32c87 commit 3ee3f4c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deepmd_utils/infer/deep_pot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 3ee3f4c

Please sign in to comment.