openmm/openmmforcefields

Specify partial charge generation method for small molecules

ijpulidos opened this issue · 1 comments

The openff toolkit allows specifying different methods for assigning partial charges to the molecules via keyword arguments. Should openmmforcefields add support for specifying the backend/wrapper and the method when parameterizing molecules?

This could also help downstream tools, such as in OpenFreeEnergy/openfe#598

We currently have some machinery in place for the EspalomaTemplateGenerator, we would need to extend it for the other template generators. Is it the SMIRNOFFTemplateGenerator in this case?

The decision-making power ultimately lies with you and the OpenMM team, but I have to caution a little bit against this specific combination of functionality. The farther an implementation with SMIRNOFF in its name gets away from the charge assignment of SMIRNOFF itself (paraphrased: use OEChem and QuacPac to generate AM1-BCC-ELF10 charges, otherwise RDKit and sqm for vanilla AM1-BCC) the more likely we are to get troublesome situations like people getting poor results thinking they're using Sage or Rosemary, but actually using some variant that diverges from how it was trained.

One of the aspects of the charge_from_molecules approach I like is how it's opt-in for users; you can bring your own charges to the party, but you can't do so accidentally. I like this sort of balance between following the official rules and allowing powerusers to experiment with unofficial things.

You're right that the toolkit supports all sorts of different charge methods, but that's through the Molecule API and not as part of the parameterization machinery. These streams aren't really meant to cross - for example, the toolkit will gladly give you MMFF94 charges if you ask for them, but those should not be used with Sage.