Skip to content

Commit

Permalink
fix assert typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RylieWeaver committed Nov 8, 2024
1 parent 5c2b20a commit 142fa40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydragnn/preprocess/graph_samples_checks_and_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def __call__(self, data):
), "The data must contain data.pbc as a bool (True) or list of bools for the dimensions ([True, False, True]) to apply periodic boundary conditions."
# NOTE Cutoff radius being less than half the smallest supercell dimension is a sufficient, but not necessary condition for no dupe connections.
# However, to prevent an issue from being unobserved until long into an experiment, we assert this condition.
assert self.r < min(
torch.diagonal(data.supercell_size)
assert (
self.r < min(torch.diagonal(data.supercell_size)) / 2
), "Cutoff radius must be smaller than the smallest supercell dimension."
ase_atom_object = ase.Atoms(
positions=data.pos,
Expand Down

0 comments on commit 142fa40

Please sign in to comment.