-
Notifications
You must be signed in to change notification settings - Fork 22
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
to_openmm_positions
includes virutal sites but Interchange.positions.to_openmm()
does not
#1054
Comments
Hmm, yeah that's a bit of a surprises. Each of these things have some reason to behave the way they do but the inconsistency isn't great.
Unfortunately, this is the heart of the matter. This is a consequence of the first-class view mirroring the toolkit's behavior of not knowing about virtual sites but other API points knowing about them. Right now,
Lots of API points have arguments like At very least we should document all of this better, but I'm not sure how best to do that since this touches so many parts of the codebase. Footnotes
|
To me this sounds like a good starting solution. I think there's a bit of inconsistency in the docs (or maybe I'm looking at the wrong code examples), so if everything encourages to_openmm_positions, then it shouldn't be as easy for folks to fall into this trap. |
Wow, I see I interpreted this originally to be about the difference between In the future, we ought to have some sort of In any case, I've changed the default behavior of the OpenMM positions getter to exclude virtual sites by default - arguably what it should have always done - to avoid this particular API inconsistency. I agree that including virtual sites by default is the better of the two options, but flipping that switch requires more internal refactors that I'm unlikely to be able to get to soon. |
Calling this resolved (for now) with #1074, but see above for ideas of future work |
Expectation
Description
Interchange.positions.to_openmm()
yields positions without virtual sites.to_openmm_positions
yields positions with virtual sites.Reproduction
Output
Software versions
Interchange v0.3.29
The text was updated successfully, but these errors were encountered: