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
c72a15a7
Unverified
Commit
c72a15a7
authored
Sep 07, 2021
by
Peter Eastman
Committed by
GitHub
Sep 07, 2021
Browse files
Make addMembrane() more robust (#3230)
parent
ad113a0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
wrappers/python/openmm/app/modeller.py
wrappers/python/openmm/app/modeller.py
+8
-5
No files found.
wrappers/python/openmm/app/modeller.py
View file @
c72a15a7
...
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012-202
0
Stanford University and the Authors.
Portions copyright (c) 2012-202
1
Stanford University and the Authors.
Authors: Peter Eastman
Contributors:
...
...
@@ -1202,8 +1202,8 @@ class Modeller(object):
It begins by tiling copies of a pre-equilibrated membrane patch to create a membrane of the desired
size. Next it scales down the protein by 50% along the X and Y axes. Any lipid within a cutoff
distance of the scaled protein is removed. It also ensures that equal numbers of lipids are removed
from each leaf of the membrane. Finally,
1000 steps of
molecular dynamics
are performed to
le
t
the membrane relax while the protein is gradually scaled
back up to its original size.
from each leaf of the membrane. Finally,
it runs
molecular dynamics
to let the membrane relax whi
le
gradually scaling the protein
back up to its original size.
The size of the membrane and water box are determined by the minimumPadding argument. All
pre-existing atoms are guaranteed to be at least this far from any edge of the periodic box. It
...
...
@@ -1426,7 +1426,10 @@ class Modeller(object):
gc
.
collect
()
# Run a simulation while slowly scaling up the protein so the membrane can relax.
# Select the number of steps to ensure no atom will ever move more than 0.25 A
# in one step.
steps
=
int
(
max
(
proteinSize
.
x
,
proteinSize
.
y
)
*
10
)
+
1
integrator
=
LangevinIntegrator
(
10.0
,
50.0
,
0.001
)
context
=
Context
(
system
,
integrator
)
context
.
setPositions
(
mergedPositions
)
...
...
@@ -1438,8 +1441,8 @@ class Modeller(object):
scaledProteinPosArray
=
np
.
array
(
scaledProteinPos
)
except
:
hasNumpy
=
False
for
i
in
range
(
50
):
weight1
=
i
/
49.0
for
i
in
range
(
steps
):
weight1
=
i
/
(
steps
-
1
)
weight2
=
1.0
-
weight1
mergedPositions
=
context
.
getState
(
getPositions
=
True
).
getPositions
(
asNumpy
=
hasNumpy
).
value_in_unit
(
nanometer
)
if
hasNumpy
:
...
...
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