From aa1c9486d66e45056c9bd256f562e48f51800421 Mon Sep 17 00:00:00 2001 From: JohannesKarwou Date: Wed, 22 Mar 2023 09:39:28 +0100 Subject: [PATCH] use pbc for internalNonbonded force --- openmmml/mlpotential.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openmmml/mlpotential.py b/openmmml/mlpotential.py index 51ed8cf..800ece8 100644 --- a/openmmml/mlpotential.py +++ b/openmmml/mlpotential.py @@ -299,6 +299,8 @@ def createMixedSystem(self, internalNonbonded.addPerBondParameter('chargeProd') internalNonbonded.addPerBondParameter('sigma') internalNonbonded.addPerBondParameter('epsilon') + if force.usesPeriodicBoundaryConditions(): + internalNonbonded.setUsesPeriodicBoundaryConditions(True) numParticles = system.getNumParticles() atomCharge = [0]*numParticles atomSigma = [0]*numParticles