Skip to content

Commit

Permalink
Update openff/evaluator/utils/openmm.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Thompson <mattwthompson@protonmail.com>
  • Loading branch information
aehogan and mattwthompson committed Oct 12, 2023
1 parent 6c51fa9 commit 52a7b88
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions openff/evaluator/utils/openmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ def disable_pbc(system):
for force_index in range(system.getNumForces()):
force = system.getForce(force_index)

if isinstance(force, openmm.NonbondedForce):
force.setNonbondedMethod(openmm.NonbondedForce.NoCutoff)
elif isinstance(force, openmm.CustomNonbondedForce):
force.setNonbondedMethod(openmm.CustomNonbondedForce.NoCutoff)
elif isinstance(force, openmm.AmoebaMultipoleForce):
force.setNonbondedMethod(openmm.AmoebaMultipoleForce.NoCutoff)
if isinstance(
force,
(
openmm.NonbondedForce,
openmm.CustomNonbondedForce,
openmm.AmeobaMultipoleForce,
),
):
# NoCutoff = 0, NonbondedMethod.CutoffNonPeriodic = 1
force.setNonbondedMethod(0)


def system_subset(
Expand Down

0 comments on commit 52a7b88

Please sign in to comment.