Fix D3, Ewald, PME, DSF stress sign#571
Merged
Merged
Conversation
abhijeetgangan
approved these changes
Jun 5, 2026
Member
|
Looks good, can you update the minimum pin to 0.3.1 which I think is the first release after that PR changing the convention. I am unsure why the lowest test here of dispersion doesn't fail if this sign convention changed as the lowest pin should be downloading 0.3.0 which should have the convention opposite to your fix here. |
Contributor
Author
|
Ah I misread the alchemi PR above. The D3 code always used the negative derivative for virial, the change from 0.3.0 to 0.3.1 was updating the DSF and LJ modules to match. This means D3 always had the incorrect sign, but DSF was once correct and now wrong after 0.3.1. I bumped up the pin to this version and also fixed DSF, Ewald, and PME. |
Member
|
Okay I think then I had the wrong sign on everything thats for catching! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shortly after D3 was added to torch-sim, alchemi updated the sign convention of the D3 dispersion virial, so now the D3 model in torchsim will produce the wrong sign.Checklist
Before a pull request can be merged, the following items must be checked: