Skip to content

Commit

Permalink
Bugfix version 0.0.4 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed May 17, 2023
1 parent fe22c54 commit c8cc4a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/tad_dftd4/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
Module containing the version string.
"""

__version__ = "0.0.3"
__version__ = "0.0.4"
7 changes: 3 additions & 4 deletions src/tad_dftd4/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def weight_references(
Weights for the atomic reference systems.
"""
dd = {"device": self.device, "dtype": self.dtype}
zero = torch.tensor(0.0, **dd)

if cn is None:
cn = torch.zeros_like(self.numbers, dtype=self.dtype)
Expand Down Expand Up @@ -205,7 +204,7 @@ def weight_references(
tmp,
),
),
zero,
torch.tensor(0.0, device=self.device, dtype=refcn.dtype), # double!
)

# normalize weights
Expand All @@ -223,7 +222,7 @@ def weight_references(
torch.where(
refcn == maxcn,
torch.tensor(1.0, **dd),
zero,
torch.tensor(0.0, **dd),
),
gw_temp,
)
Expand All @@ -237,7 +236,7 @@ def weight_references(
zeta = torch.where(
mask,
self._zeta(gam, refq + zeff, q + zeff),
zero,
torch.tensor(0.0, **dd),
)

return zeta * gw
Expand Down

0 comments on commit c8cc4a7

Please sign in to comment.