Skip to content

Commit

Permalink
fixed GraphData bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bowen-bd committed Sep 15, 2023
1 parent 1c745b3 commit a6528ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chgnet/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def __getitem__(self, idx) -> tuple[CrystalGraph, dict[str, Tensor]]:
force = self.labels[mp_id][graph_id][self.force_key]
targets["f"] = torch.tensor(force, dtype=datatype)
elif key == "s":
stress = self.labels[mp_id][graph_id][self.magmom_key]
stress = self.labels[mp_id][graph_id][self.stress_key]
# Convert VASP stress
targets["s"] = torch.tensor(stress, dtype=datatype) * (-0.1)
elif key == "m":
Expand Down

0 comments on commit a6528ab

Please sign in to comment.