Skip to content

Commit

Permalink
Merge pull request #119 from raimis/ds_fix_grad
Browse files Browse the repository at this point in the history
Fix the gradient sign for QM9q and SPICE
  • Loading branch information
Raimondas Galvelis authored Aug 29, 2022
2 parents db72e12 + cbc1e04 commit 2f6e190
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 2f6e190

Please sign in to comment.