Skip to content

Commit

Permalink
feat: add empty compress method to Pairtab
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Nov 27, 2024
1 parent f343a3b commit 8b94a81
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions deepmd/dpmodel/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,17 @@ def deserialize(cls, data) -> "DPZBLLinearEnergyAtomicModel":
data.pop("@class", None)
data.pop("type", None)
return super().deserialize(data)

def enable_compression(
self,
min_nbor_dist: float,
table_extrapolate: float = 5,
table_stride_1: float = 0.01,
table_stride_2: float = 0.1,
check_frequency: int = -1,
) -> None:
"""Pairtab model does not support compression."""
pass

def _compute_weight(
self,
Expand Down
11 changes: 11 additions & 0 deletions deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,17 @@ def deserialize(cls, data) -> "DPZBLLinearEnergyAtomicModel":
data.pop("@class", None)
data.pop("type", None)
return super().deserialize(data)

def enable_compression(
self,
min_nbor_dist: float,
table_extrapolate: float = 5,
table_stride_1: float = 0.01,
table_stride_2: float = 0.1,
check_frequency: int = -1,
) -> None:
"""Pairtab model does not support compression."""
pass

def _compute_weight(
self,
Expand Down

0 comments on commit 8b94a81

Please sign in to comment.