From 9ca9ba1f984d311776ff6f98c682254507034f0d Mon Sep 17 00:00:00 2001 From: Shashank S Date: Thu, 22 Aug 2024 17:43:47 +0530 Subject: [PATCH] #236 Issue in atom2valence Solved --- torchdrug/data/molecule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchdrug/data/molecule.py b/torchdrug/data/molecule.py index edf5406..8374da5 100644 --- a/torchdrug/data/molecule.py +++ b/torchdrug/data/molecule.py @@ -518,7 +518,7 @@ def is_valid(self): """A coarse implementation of valence check.""" # TODO: cross-check by any domain expert atom2valence = torch.tensor(float("nan")).repeat(constant.NUM_ATOM) - for k, v in self.atom2valence: + for k, v in self.atom2valence.items(): atom2valence[k] = v atom2valence = torch.as_tensor(atom2valence, device=self.device)