Skip to content

Commit

Permalink
Update test_smooth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed Feb 27, 2024
1 parent e7dab5d commit 98d8232
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/tests/pt/model/test_smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ def test(
self,
):
# displacement of atoms
epsilon = (
torch.finfo(torch.float32).eps if self.epsilon is None else self.epsilon
)
epsilon = 1e-5 if self.epsilon is None else self.epsilon
# required prec. relative prec is not checked.
rprec = 0
aprec = 1e-5 if self.aprec is None else self.aprec
Expand Down Expand Up @@ -62,7 +60,6 @@ def test(
coord1 = torch.matmul(coord1, cell)
coord = torch.concat([coord0, coord1], dim=0)
spin = torch.rand([natoms, 3], dtype=dtype, device=env.DEVICE)

coord0 = torch.clone(coord)
coord1 = torch.clone(coord)
coord1[1][0] += epsilon
Expand Down Expand Up @@ -223,7 +220,7 @@ def setUp(self):
model_params = copy.deepcopy(model_zbl)
self.type_split = False
self.model = get_model(model_params).to(env.DEVICE)
self.epsilon, self.aprec = 1e-4, None
self.epsilon, self.aprec = 1e-10, None


class TestEnergyModelSpinSeA(unittest.TestCase, SmoothTest):
Expand Down

0 comments on commit 98d8232

Please sign in to comment.