Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: ZBL null test #3447

Merged
merged 4 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def _compute_weight(
dim=-1,
) # handle masked nnei.

sigma = numerator / denominator # nfrmes, nloc
sigma = numerator / torch.clamp(denominator, 1e-20) # nfrmes, nloc
u = (sigma - self.sw_rmin) / (self.sw_rmax - self.sw_rmin)
coef = torch.zeros_like(u)
left_mask = sigma < self.sw_rmin
Expand Down
1 change: 0 additions & 1 deletion source/tests/pt/model/test_null_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def setUp(self):
self.model = get_model(model_params).to(env.DEVICE)


@unittest.skip("FAILED at the moment")
class TestEnergyModelZBL(unittest.TestCase, NullTest):
def setUp(self):
model_params = copy.deepcopy(model_zbl)
Expand Down