Skip to content

Commit

Permalink
Fix the gradient sign for QM9q and SPICE
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimondas Galvelis committed Aug 26, 2022
1 parent db72e12 commit cbc1e04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion torchmdnet/datasets/qm9q.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def sample_iter(self):
== "vector : Hartree/Bohr "
)
dy = (
pt.tensor(mol["gradient_vector"][conf], dtype=pt.float32)
-pt.tensor(mol["gradient_vector"][conf], dtype=pt.float32)
* self.HARTREE_TO_EV
/ self.BORH_TO_ANGSTROM
)
Expand Down
2 changes: 1 addition & 1 deletion torchmdnet/datasets/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def sample_iter(self):
* self.HARTREE_TO_EV
)
all_dy = (
pt.tensor(mol["dft_total_gradient"], dtype=pt.float32)
-pt.tensor(mol["dft_total_gradient"], dtype=pt.float32)
* self.HARTREE_TO_EV
/ self.BORH_TO_ANGSTROM
)
Expand Down

0 comments on commit cbc1e04

Please sign in to comment.