OpenFreeEnergy / OpenFreeEnergy/openfe
Switching function of mainline OpenFF force fields not used
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 331
- Forks
- 56
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 13
Description
This is basically the same as https://github.com/OpenFreeEnergy/openfe/issues/809 except there may be complications in the hocus pocus of free energy magic and custom forces that makes this harder or impossible. I don't know.
OpenFF's mainline force fields use a 1 A switch width with vdW interactions. (The cutoff is at 9 A, so if stored as a switch distance it's written as 8 A). Code paths involving openmmforcefields do not, by default, set any switching function and fall back to OpenMM's default of no switching (a negative value means "don't do that").
>>> openmm.NonbondedForce().getSwitchingDistance()
Quantity(value=-1.0, unit=nanometer)```
This can be set in general in OpenMM like
ForceField.createSystem(
...,
switchDistance=0.8 * openmm.unit.nanometer,
...,
)
Unfortunately this is not included in SystemGenerator.create_system which appears to be what this codebase calls. Something like .setSwitchingDistance() after system creation should work in either case.
I don't know how much of an impact this has, but OpenFF's force fields thus far are trained with a 8 A switching distance in condensed-phase fitting and are shipped with that in the non-bonded settings.
Related https://github.com/openmm/openmmforcefields/pull/324
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SystemGenerator.create_system entry point and compare it with openmmforcefields' system_generators.py around line 399. Review issue 809 and openmmforcefields PR 324 for related context, then determine whether OpenFF mainline systems receive the 0.8 nm switching distance. Done means the relevant system creation path consistently uses the intended switching behavior without breaking custom forces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100