diff --git a/torchmdnet/datasets/qm9q.py b/torchmdnet/datasets/qm9q.py index 25c888a74..d41755ef2 100644 --- a/torchmdnet/datasets/qm9q.py +++ b/torchmdnet/datasets/qm9q.py @@ -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 ) diff --git a/torchmdnet/datasets/spice.py b/torchmdnet/datasets/spice.py index 3bda70c20..6bc52f8db 100644 --- a/torchmdnet/datasets/spice.py +++ b/torchmdnet/datasets/spice.py @@ -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 )