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
fad93127
Unverified
Commit
fad93127
authored
Jun 20, 2021
by
Peter Eastman
Committed by
GitHub
Jun 20, 2021
Browse files
Add padding when adding a fixed number of water molecules (#3151)
parent
a29596c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
wrappers/python/openmm/app/modeller.py
wrappers/python/openmm/app/modeller.py
+1
-0
No files found.
wrappers/python/openmm/app/modeller.py
View file @
fad93127
...
@@ -569,6 +569,7 @@ class Modeller(object):
...
@@ -569,6 +569,7 @@ class Modeller(object):
# Compute a new periodic box size.
# Compute a new periodic box size.
maxSize
=
max
(
max
((
pos
[
i
]
for
index
,
pos
in
addedWaters
))
-
min
((
pos
[
i
]
for
index
,
pos
in
addedWaters
))
for
i
in
range
(
3
))
maxSize
=
max
(
max
((
pos
[
i
]
for
index
,
pos
in
addedWaters
))
-
min
((
pos
[
i
]
for
index
,
pos
in
addedWaters
))
for
i
in
range
(
3
))
maxSize
+=
0.1
# Add padding to reduce clashes at the edge.
newTopology
.
setUnitCellDimensions
(
Vec3
(
maxSize
,
maxSize
,
maxSize
))
newTopology
.
setUnitCellDimensions
(
Vec3
(
maxSize
,
maxSize
,
maxSize
))
else
:
else
:
# There could be clashes between water molecules at the box edges. Find ones to remove.
# There could be clashes between water molecules at the box edges. Find ones to remove.
...
...
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