Commit dfdffc7e authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed exception in Modeller.addSolvent()

parent bf1f6f32
......@@ -271,7 +271,7 @@ class Modeller(object):
maxSize = max(max((pos[i] for pos in self.positions))-min((pos[i] for pos in self.positions)) for i in range(3))
box = (maxSize+2*padding)*Vec3(1, 1, 1)
else:
box = topology.getUnitCellDimensions()
box = self.topology.getUnitCellDimensions()
if box is None:
raise ValueError('Neither the box size nor padding was specified, and the Topology does not define unit cell dimensions')
box = box.value_in_unit(nanometer)
......
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