From bfbf6e28f15e8d261fed1a7cacd8065f462b0cca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 09:02:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd/pt/model/atomic_model/linear_atomic_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepmd/pt/model/atomic_model/linear_atomic_model.py b/deepmd/pt/model/atomic_model/linear_atomic_model.py index a29e18df65..8b77f0c7c5 100644 --- a/deepmd/pt/model/atomic_model/linear_atomic_model.py +++ b/deepmd/pt/model/atomic_model/linear_atomic_model.py @@ -507,7 +507,7 @@ def _compute_weight( torch.zeros_like(nlist_larger), ), dim=-1, - ) + ) denominator = torch.sum( torch.where( nlist_larger != -1, @@ -527,7 +527,7 @@ def _compute_weight( smooth = -6 * u**5 + 15 * u**4 - 10 * u**3 + 1 coef[mid_mask] = smooth[mid_mask] coef[right_mask] = 0 - + # to handle masked atoms coef = torch.where(sigma != 0, coef, torch.zeros_like(coef)) self.zbl_weight = coef # nframes, nloc