openforcefield / openff-interchange

A project (and object) for storing, manipulating, and converting molecular mechanics data.
https://docs.openforcefield.org/projects/interchange
MIT License
71 stars 22 forks source link

[ENH] Add support for HMR with virtual sites #1056

Open IAlibay opened 1 week ago

IAlibay commented 1 week ago

Description

I notice the wording is "not yet": https://github.com/openforcefield/openff-interchange/blob/57dd53aca23c0a038b09c6d2a26911388a4e64d8/openff/interchange/interop/openmm/__init__.py#L186

I also don't seem to see any open issues, so erm.. here's an issue for it 🙃

mattwthompson commented 1 week ago

The discussion on this specific behavior when I first implemented it was in Slack, so it ought to be brought out into the public anyway

This is one of the many cases in which we talk about being super general and flexible and xyz but when the rubber hits the road, we really only care about a finite set of use cases. The headache is at the intersection of virtual sites, HMR, and whether or not water is rigid. It gets much simpler to think about if you skip waters when applying HMR, which are probably already rigid if the use case calls for HMR.

We also have comments from Shirts and Gilson that (presumably on ligands) HMR with virtual sites should generally be okay. I basically buy this, since HMR shouldn't interact directly with the virtual sites.

Even though I know you're only using OPC and don't have virtual sites on ligand/protein/solvent, I want to be methodical in removing this restriction. #1055 should hold us over for a little bit, but after that I want to make sure I can run a ligand (with virtual site parameters and HMR) in OPC water without things blowing up. Tests should also make sure