-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency between gradients and forces #116
Comments
IMO |
Ping: @PhilippThoelke @giadefa |
Also checking the loss function code and comments, it seems torchmd-net/torchmdnet/module.py Lines 71 to 132 in db72e12
|
The model outputs force predictions. I agree that the naming is inconsistent but as far as I remember, when I implemented QM9, MD17 and ANI-1, they all loaded forces instead of the derivative. The model was consistent with that. I'm not sure about the more recently added dataset loaders. |
The HDF5 loader returns forces, because that's what the model expects. I think it took me a while to figure that out, and I was certainly surprised when I realized |
@peastman is SPICE returning forces or gradients?
|
I'm not sure. Raimondas wrote that class. |
so you are not using that loader? Which one are you using?
…On Fri, Aug 26, 2022 at 5:52 PM Peter Eastman ***@***.***> wrote:
I'm not sure. Raimondas wrote that class.
—
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3KUORH7ALKWWRKIMPOIOTV3DR2ZANCNFSM57S7D4XA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
HDF5. |
The datasets measure forces and I would expect that they store forces
…On Thu, Aug 25, 2022 at 2:51 PM Raimondas Galvelis ***@***.***> wrote:
Ping: @PhilippThoelke <https://github.com/PhilippThoelke> @giadefa
<https://github.com/giadefa>
—
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3KUOR2S7BHHATFIHDKKWDV25T63ANCNFSM57S7D4XA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When training with forces, the model computes the negative gradient of the energy with respect to the positions (a.k.a. forces):
torchmd-net/torchmdnet/models/model.py
Lines 196 to 207 in db72e12
Some the loaders load forces:
torchmd-net/torchmdnet/datasets/ani.py
Lines 279 to 281 in db72e12
torchmd-net/torchmdnet/datasets/comp6.py
Lines 100 to 102 in db72e12
While the other ones load gradients (the opposite sign):
torchmd-net/torchmdnet/datasets/qm9q.py
Lines 147 to 151 in db72e12
torchmd-net/torchmdnet/datasets/spice.py
Lines 99 to 103 in db72e12
We need to agree what
dy
represents.The text was updated successfully, but these errors were encountered: