Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 23, 2024
1 parent 6d9071d commit bfbf6e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def _compute_weight(
torch.zeros_like(nlist_larger),
),
dim=-1,
)
)
denominator = torch.sum(
torch.where(
nlist_larger != -1,
Expand All @@ -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
Expand Down

0 comments on commit bfbf6e2

Please sign in to comment.