facebookresearch / JMP

Code for “From Molecules to Materials Pre-training Large Generalizable Models for Atomic Property Prediction”.
Other
38 stars 6 forks source link

SPICE fine-tuning trains to Energy gradient not Force #1

Open tkreiman opened 4 months ago

tkreiman commented 4 months ago

I believe the SPICE pre-processing is currently returning the negative of the force. The dft_total_energy gradient is the actual (positive) gradient and thus has to be multiplied by -1 to get the force (see this issue on the spice GitHub https://github.com/openmm/spice-dataset/issues/94). Thus it looks like the data has the negative force as the target (unless I am overlooking this -1 multiplication and it happens somewhere else in the code)

nimashoghi commented 3 months ago

Thank you for pointing out the issue regarding the force calculation in the SPICE pre-processing.

We were previously unaware of the issue you linked, and as you mentioned, the current SPICE pre-processing code does not do a -1 multiplication to the gradient to get the force. I have updated the pre-processing code in #2.

However, we'd like to clarify that, in our case, this issue does not affect the training of the model, and our energy and force MAE metrics are also unaffected, as they measure the absolute error between the predicted and true values.

Please let us know if you have any further questions or concerns.