Skip to content

Design: Provenance of OpenMM force(s) generated by each handler(s) #321

Open
@mattwthompson

Description

@mattwthompson

The mapping between potential handlers to OpenMM forces in Interchange.to_openmm is ... complex and nebulous. It's unavoidably complex with the current SMIRNOFF spec and requirements from downstream users (see: non-LJ functional forms, tinkering with partial charges, free energy frameworks implicit solvent models, ...) but the provenance could at least be made clear.

For example, the SMIRNOFF spec allows separate cutoffs for Lennard-Jones and electrostatic interactions but implementing this in OpenMM requires four separate forces, one NonbondedForce, one CustomNonbondedForce, and two CustomBondForces. Using a non-LJ pair potential is also another poorly-supported case in the sense that exporters generally look for a handler named vdW and crash if one is not found. The list goes on and on and eventually includes things like one-to-many and many-to-one mappings.

Maybe OpenMM's force groups would be a way to implement this? This could be handled by at some point returning a mapping between PotentialHandler objects/indices/something to force group IDs (or however it's implemented in OpenMM). Either way it should be documented.

This is relevant to free energy work but should also be of general interest.

cc: @SimonBoothroyd whose input this is based off of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationfeedback neededCould use feedback from users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions