-
Notifications
You must be signed in to change notification settings - Fork 23
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
Combining SMIRNOFF interchanges with isomorphic molecules with different charges uses only the charges from the latter molecule #1075
Comments
I'm still iffy on whether or not this is a valid use case, but I agree that the behavior you're seeing is surprising |
I (7/10) think this behavior is valid - Generally, it should be fine to combine interchanges created by two different SMIRNOFF FFs, without either one of them having its assigned parameters overwritten. |
I should expand a little bit on my views -
|
I could imagine someone running a simulation with a deliberately conformation-dependent charge model on two different conformations of the same molecule, on a timescale where those conformations don't interconvert. Funky yes, but pretty reasonable thing to do, definitely valid. So I don't think it's completely obvious that different charges on isomorphic molecules from one force field is invalid? I agree it's currently impossible to write such a force field in SMIRNOFF without plugins. I could also imagine different charges for the same molecule if those molecules are isolated in different environments for the entire simulation (gas and liquid phases separated by some membrane?). Or maybe alchemic mutation on a subset of copies of a molecule. In Martini 2 you need 10% of your water beads to have different LJ parameters to the rest so that it doesn't freeze at like 20 Celsius, I know coarse grained models are out of scope for now but my point is that people do all sorts of weird things to make their force fields work. I can also imagine maybe one day this helps someone debug a problem with a different combined system, or make a theoretically indefensible but numerically correct simulation work or something weird like that. As a general rule, in a perfect world I think combined interchanges should have the same parameters for the same atoms as the original interchanges, and that users shouldn't have to think about any edge cases for this conceptually pretty well defined operation. Not making any claims about whether that makes the effort to fix this bug worth it. |
This case is invalid if and only if it comes from a single force field, and I think that's the key difference in perspectives here; lots of stuff is possible, but fewer things are really well-defined in force fields For excessively exotic use cases, the user can also just modify charges after the fact (needs to be documented better sometime #1071) |
When you say "single force field", do you mean, like, a single conceptual force field, or a single SMIRNOFF force field? For example I could imagine having a liquid phase force field and a gas phase force field that are each a single SMIRNOFF force field, but I think conceptually of the combination of the two as a single force field and sometimes use them together in the same simulation. |
I mean a single object |
Description
I was looking to see if @IAlibay's desired workflow in #1059 could be accomplished by creating two separate interchanges and then combining them to get a single interchange with different charges for isomorphic molecules, and it does not. I think this is surprising - in my head, an interchange associates each atom in the topology with its own parameters, and the fact that parameters are deduplicated is like an optimization. I've already unambiguously identified which atoms should have which charges, and so to lose that information for that optimization is surprising.
Reproduction
Modified version of Irfan's code:
Output
Software versions
Interchange v0.4.0beta2
The text was updated successfully, but these errors were encountered: