Unverified Commit 98f67171 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed error in AmberPrmtopFile checking for periodic system (#4777)

parent 7abdccbb
......@@ -249,7 +249,7 @@ class AmberPrmtopFile(object):
ff.LJPME:'LJPME'}
if nonbondedMethod not in methodMap:
raise ValueError('Illegal value for nonbonded method')
if not self._prmtop.getIfBox() and nonbondedMethod in (ff.CutoffPeriodic, ff.Ewald, ff.PME, ff.LJPME):
if self.topology.getPeriodicBoxVectors() is None and nonbondedMethod in (ff.CutoffPeriodic, ff.Ewald, ff.PME, ff.LJPME):
raise ValueError('Illegal nonbonded method for a non-periodic system')
constraintMap = {None:None,
ff.HBonds:'h-bonds',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment