Skip to content

Commit

Permalink
Add correct cutoffs to SMIRNOFF example (#324)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
  • Loading branch information
mattwthompson and mikemhenry authored May 3, 2024
1 parent b685637 commit 58b16a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ from openmm.app import ForceField
forcefield = ForceField('amber/protein.ff14SB.xml', 'amber/tip3p_standard.xml', 'amber/tip3p_HFE_multivalent.xml')
# Register the SMIRNOFF template generator
forcefield.registerTemplateGenerator(smirnoff.generator)

# create a System with the non-bonded settings of mainline OpenFF force fields
# (9 Angstrom cut-off, switching distance applied at 8 Angstrom)
system = forcefield.createSystem(
topology=molecule.to_topology().to_openmm(),
nonbondedCutoff=0.9 * openmm.unit.nanometer,
switchDistance=0.8 * openmm.unit.nanometer,
)
```

The latest official Open Force Field Initiative release ([`openff-1.2.0`](https://github.com/openforcefield/openff-forcefields) of the ["Parsley" small molecule force field](https://openforcefield.org/news/introducing-openforcefield-1.0/)) is used if none is specified.
Expand Down

0 comments on commit 58b16a7

Please sign in to comment.