"wrappers/python/vscode:/vscode.git/clone" did not exist on "51a112a336db6cc0aea1c32b90d9d0a1f262cbfd"
Commit 0dd32915 authored by Peter Eastman's avatar Peter Eastman
Browse files

Allow boxSize argument to be a list or tuple instead of a Vec3

parent d2a6f00c
......@@ -165,7 +165,9 @@ class Modeller(object):
# Pick a unit cell size.
if boxSize is not None:
box = boxSize
if is_quantity(boxSize):
boxSize = boxSize.value_in_unit(nanometer)
box = Vec3(boxSize[0], boxSize[1], boxSize[2])*nanometer
elif padding is not None:
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)
......
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