Skip to content

Commit f863269

Browse files
anyangmlpre-commit-ci[bot]
authored andcommitted
Feat: add pairtab compression (#4432)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new method `enable_compression` in the PairTabAtomicModel class, indicating that the model does not support compression settings. - **Documentation** - Added docstring for the `enable_compression` method to clarify its purpose. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 3cdf407)
1 parent 51d81f1 commit f863269

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

deepmd/dpmodel/atomic_model/pairtab_atomic_model.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,14 @@ def is_aparam_nall(self) -> bool:
425425
If False, the shape is (nframes, nloc, ndim).
426426
"""
427427
return False
428+
429+
def enable_compression(
430+
self,
431+
min_nbor_dist: float,
432+
table_extrapolate: float = 5,
433+
table_stride_1: float = 0.01,
434+
table_stride_2: float = 0.1,
435+
check_frequency: int = -1,
436+
) -> None:
437+
"""Pairtab model does not support compression."""
438+
pass

deepmd/pt/model/atomic_model/pairtab_atomic_model.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,14 @@ def is_aparam_nall(self) -> bool:
484484
If False, the shape is (nframes, nloc, ndim).
485485
"""
486486
return False
487+
488+
def enable_compression(
489+
self,
490+
min_nbor_dist: float,
491+
table_extrapolate: float = 5,
492+
table_stride_1: float = 0.01,
493+
table_stride_2: float = 0.1,
494+
check_frequency: int = -1,
495+
) -> None:
496+
"""Pairtab model does not support compression."""
497+
pass

0 commit comments

Comments
 (0)