Skip to content

Commit a800452

Browse files
committed
Add CubeS₂ 4th-order spline support for charge assignment in SOG
- Introduced new method `precompute_cubes2_influence()` in SOGKSpace to handle CubeS₂ influence functions. - Added a new header file `sog_spline.h` containing definitions and weight functions for CubeS₂ 4th-order splines. - Updated SOGKSpace class to include new member variables for CubeS₂ influence functions and spline type. - The CubeS₂ spline implementation is based on the reference: Predescu, Bergdorf, Shaw, J. Chem. Phys. 153, 224117 (2020).
1 parent df8329c commit a800452

4 files changed

Lines changed: 652 additions & 116 deletions

File tree

deepmd/pt/train/training.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,8 @@ def save_model(self, save_path: str, lr: float = 0.0, step: int = 0) -> None:
15601560
]
15611561
if len(checkpoint_files) > self.max_ckpt_keep:
15621562
checkpoint_files.sort(key=lambda x: x.stat().st_mtime)
1563-
checkpoint_files[0].unlink()
1563+
for f in checkpoint_files[: len(checkpoint_files) - self.max_ckpt_keep]:
1564+
f.unlink()
15641565

15651566
def get_data(
15661567
self, is_train: bool = True, task_key: str = "Default"

0 commit comments

Comments
 (0)