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
9e82c890
Unverified
Commit
9e82c890
authored
Jan 21, 2025
by
Peter Eastman
Committed by
GitHub
Jan 21, 2025
Browse files
Added platform argument to addMembrane() (#4778)
parent
98f67171
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
wrappers/python/openmm/app/modeller.py
wrappers/python/openmm/app/modeller.py
+10
-3
No files found.
wrappers/python/openmm/app/modeller.py
View file @
9e82c890
...
...
@@ -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
4
Stanford University and the Authors.
Portions copyright (c) 2012-202
5
Stanford University and the Authors.
Authors: Peter Eastman
Contributors:
...
...
@@ -1283,7 +1283,8 @@ class Modeller(object):
self
.
positions
=
newPositions
def
addMembrane
(
self
,
forcefield
,
lipidType
=
'POPC'
,
membraneCenterZ
=
0
*
nanometer
,
minimumPadding
=
1
*
nanometer
,
positiveIon
=
'Na+'
,
negativeIon
=
'Cl-'
,
ionicStrength
=
0
*
molar
,
neutralize
=
True
,
residueTemplates
=
dict
()):
def
addMembrane
(
self
,
forcefield
,
lipidType
=
'POPC'
,
membraneCenterZ
=
0
*
nanometer
,
minimumPadding
=
1
*
nanometer
,
positiveIon
=
'Na+'
,
negativeIon
=
'Cl-'
,
ionicStrength
=
0
*
molar
,
neutralize
=
True
,
residueTemplates
=
dict
(),
platform
=
None
):
"""Add a lipid membrane to the model.
This method actually adds both a membrane and a water box. It is best to build them together,
...
...
@@ -1341,6 +1342,9 @@ class Modeller(object):
templates to use for them. This is useful when a ForceField contains multiple templates
that can match the same residue (e.g Fe2+ and Fe3+ templates in the ForceField for a
monoatomic iron ion in the Topology).
platform : Platform=None
the Platform to use when computing the hydrogen atom positions. If
this is None, the default Platform will be used.
"""
if
'topology'
in
dir
(
lipidType
)
and
'positions'
in
dir
(
lipidType
):
patch
=
lipidType
...
...
@@ -1540,7 +1544,10 @@ class Modeller(object):
steps
=
int
(
max
(
proteinSize
.
x
,
proteinSize
.
y
)
*
10
)
+
1
integrator
=
LangevinIntegrator
(
10.0
,
50.0
,
0.001
)
context
=
Context
(
system
,
integrator
)
if
platform
is
None
:
context
=
Context
(
system
,
integrator
)
else
:
context
=
Context
(
system
,
integrator
,
platform
)
context
.
setPositions
(
mergedPositions
)
LocalEnergyMinimizer
.
minimize
(
context
,
10.0
,
30
)
try
:
...
...
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