Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Nov 26, 2023
1 parent 346af9a commit 898a876
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/tad_dftd4/charges.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ def __init__(
self.eta = eta
self.rad = rad

print(self.device)
print(self.chi.device)
if any(
tensor.device != self.device
for tensor in (self.chi, self.kcn, self.eta, self.rad)
Expand Down
1 change: 1 addition & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""
Setup for pytest.
"""
from __future__ import annotations

import pytest
import torch
Expand Down
6 changes: 5 additions & 1 deletion test/test_charge/test_charges.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"""
from __future__ import annotations

from math import sqrt

import pytest
import torch

Expand All @@ -45,7 +47,9 @@
@pytest.mark.parametrize("dtype", [torch.float, torch.double])
def test_single(dtype: torch.dtype):
dd: DD = {"device": DEVICE, "dtype": dtype}
tol = torch.finfo(dtype).eps ** 0.5 * 10
tol = sqrt(torch.finfo(dtype).eps) * 10
print(tol)
print(sqrt(torch.finfo(dtype).eps) * 10)

sample = samples["NH3-dimer"]
numbers = sample["numbers"].to(DEVICE)
Expand Down

0 comments on commit 898a876

Please sign in to comment.