Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
f965d27f
Commit
f965d27f
authored
Feb 27, 2017
by
peastman
Browse files
Fixed error adding triclinic solvent boxes
parent
ebcd9740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
wrappers/python/simtk/openmm/app/modeller.py
wrappers/python/simtk/openmm/app/modeller.py
+7
-2
No files found.
wrappers/python/simtk/openmm/app/modeller.py
View file @
f965d27f
...
@@ -407,12 +407,17 @@ class Modeller(object):
...
@@ -407,12 +407,17 @@ class Modeller(object):
if
len
(
self
.
positions
)
==
0
:
if
len
(
self
.
positions
)
==
0
:
positions
=
[]
positions
=
[]
else
:
else
:
positions
=
self
.
positions
.
value_in_unit
(
nanometer
)
positions
=
self
.
positions
.
value_in_unit
(
nanometer
)
[:]
cells
=
{}
cells
=
{}
numCells
=
tuple
((
max
(
1
,
int
(
floor
(
box
[
i
]
/
maxCutoff
)))
for
i
in
range
(
3
)))
numCells
=
tuple
((
max
(
1
,
int
(
floor
(
box
[
i
]
/
maxCutoff
)))
for
i
in
range
(
3
)))
cellSize
=
tuple
((
box
[
i
]
/
numCells
[
i
]
for
i
in
range
(
3
)))
cellSize
=
tuple
((
box
[
i
]
/
numCells
[
i
]
for
i
in
range
(
3
)))
for
i
in
range
(
len
(
positions
)):
for
i
in
range
(
len
(
positions
)):
cell
=
tuple
((
int
(
floor
(
positions
[
i
][
j
]
/
cellSize
[
j
]))
%
numCells
[
j
]
for
j
in
range
(
3
)))
pos
=
positions
[
i
]
pos
=
pos
-
floor
(
pos
[
2
]
*
invBox
[
2
])
*
vectors
[
2
]
pos
-=
floor
(
pos
[
1
]
*
invBox
[
1
])
*
vectors
[
1
]
pos
-=
floor
(
pos
[
0
]
*
invBox
[
0
])
*
vectors
[
0
]
positions
[
i
]
=
pos
cell
=
tuple
((
int
(
floor
(
pos
[
j
]
/
cellSize
[
j
]))
%
numCells
[
j
]
for
j
in
range
(
3
)))
if
cell
in
cells
:
if
cell
in
cells
:
cells
[
cell
].
append
(
i
)
cells
[
cell
].
append
(
i
)
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment