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
4b0ac471
"platforms/vscode:/vscode.git/clone" did not exist on "654c6c9c37d5c2f6bca3a3e81117fde278a9d073"
Commit
4b0ac471
authored
Aug 21, 2019
by
peastman
Browse files
Force generators that don't use PME still accept it as a nonbonded method
parent
3e532275
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+22
-7
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
4b0ac471
...
@@ -2562,9 +2562,12 @@ class GBSAOBCGenerator(object):
...
@@ -2562,9 +2562,12 @@ class GBSAOBCGenerator(object):
generator
.
params
.
parseDefinitions
(
element
)
generator
.
params
.
parseDefinitions
(
element
)
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
methodMap
=
{
NoCutoff
:
mm
.
NonbondedForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
mm
.
GBSAOBCForce
.
NoCutoff
,
CutoffNonPeriodic
:
mm
.
NonbondedForce
.
CutoffNonPeriodic
,
CutoffNonPeriodic
:
mm
.
GBSAOBCForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
mm
.
NonbondedForce
.
CutoffPeriodic
}
CutoffPeriodic
:
mm
.
GBSAOBCForce
.
CutoffPeriodic
,
Ewald
:
mm
.
GBSAOBCForce
.
CutoffPeriodic
,
PME
:
mm
.
GBSAOBCForce
.
CutoffPeriodic
,
LJPME
:
mm
.
GBSAOBCForce
.
CutoffPeriodic
}
if
nonbondedMethod
not
in
methodMap
:
if
nonbondedMethod
not
in
methodMap
:
raise
ValueError
(
'Illegal nonbonded method for GBSAOBCForce'
)
raise
ValueError
(
'Illegal nonbonded method for GBSAOBCForce'
)
force
=
mm
.
GBSAOBCForce
()
force
=
mm
.
GBSAOBCForce
()
...
@@ -2799,7 +2802,10 @@ class CustomNonbondedGenerator(object):
...
@@ -2799,7 +2802,10 @@ class CustomNonbondedGenerator(object):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
methodMap
=
{
NoCutoff
:
mm
.
CustomNonbondedForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
mm
.
CustomNonbondedForce
.
NoCutoff
,
CutoffNonPeriodic
:
mm
.
CustomNonbondedForce
.
CutoffNonPeriodic
,
CutoffNonPeriodic
:
mm
.
CustomNonbondedForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
mm
.
CustomNonbondedForce
.
CutoffPeriodic
}
CutoffPeriodic
:
mm
.
CustomNonbondedForce
.
CutoffPeriodic
,
Ewald
:
mm
.
CustomNonbondedForce
.
CutoffPeriodic
,
PME
:
mm
.
CustomNonbondedForce
.
CutoffPeriodic
,
LJPME
:
mm
.
CustomNonbondedForce
.
CutoffPeriodic
}
if
nonbondedMethod
not
in
methodMap
:
if
nonbondedMethod
not
in
methodMap
:
raise
ValueError
(
'Illegal nonbonded method for CustomNonbondedForce'
)
raise
ValueError
(
'Illegal nonbonded method for CustomNonbondedForce'
)
force
=
mm
.
CustomNonbondedForce
(
self
.
energy
)
force
=
mm
.
CustomNonbondedForce
(
self
.
energy
)
...
@@ -2859,7 +2865,10 @@ class CustomGBGenerator(object):
...
@@ -2859,7 +2865,10 @@ class CustomGBGenerator(object):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
methodMap
=
{
NoCutoff
:
mm
.
CustomGBForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
mm
.
CustomGBForce
.
NoCutoff
,
CutoffNonPeriodic
:
mm
.
CustomGBForce
.
CutoffNonPeriodic
,
CutoffNonPeriodic
:
mm
.
CustomGBForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
mm
.
CustomGBForce
.
CutoffPeriodic
}
CutoffPeriodic
:
mm
.
CustomGBForce
.
CutoffPeriodic
,
Ewald
:
mm
.
CustomGBForce
.
CutoffPeriodic
,
PME
:
mm
.
CustomGBForce
.
CutoffPeriodic
,
LJPME
:
mm
.
CustomGBForce
.
CutoffPeriodic
}
if
nonbondedMethod
not
in
methodMap
:
if
nonbondedMethod
not
in
methodMap
:
raise
ValueError
(
'Illegal nonbonded method for CustomGBForce'
)
raise
ValueError
(
'Illegal nonbonded method for CustomGBForce'
)
force
=
mm
.
CustomGBForce
()
force
=
mm
.
CustomGBForce
()
...
@@ -2942,7 +2951,10 @@ class CustomHbondGenerator(object):
...
@@ -2942,7 +2951,10 @@ class CustomHbondGenerator(object):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
methodMap
=
{
NoCutoff
:
mm
.
CustomHbondForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
mm
.
CustomHbondForce
.
NoCutoff
,
CutoffNonPeriodic
:
mm
.
CustomHbondForce
.
CutoffNonPeriodic
,
CutoffNonPeriodic
:
mm
.
CustomHbondForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
mm
.
CustomHbondForce
.
CutoffPeriodic
}
CutoffPeriodic
:
mm
.
CustomHbondForce
.
CutoffPeriodic
,
Ewald
:
mm
.
CustomHbondForce
.
CutoffPeriodic
,
PME
:
mm
.
CustomHbondForce
.
CutoffPeriodic
,
LJPME
:
mm
.
CustomHbondForce
.
CutoffPeriodic
}
if
nonbondedMethod
not
in
methodMap
:
if
nonbondedMethod
not
in
methodMap
:
raise
ValueError
(
'Illegal nonbonded method for CustomNonbondedForce'
)
raise
ValueError
(
'Illegal nonbonded method for CustomNonbondedForce'
)
force
=
mm
.
CustomHbondForce
(
self
.
energy
)
force
=
mm
.
CustomHbondForce
(
self
.
energy
)
...
@@ -3080,7 +3092,10 @@ class CustomManyParticleGenerator(object):
...
@@ -3080,7 +3092,10 @@ class CustomManyParticleGenerator(object):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
methodMap
=
{
NoCutoff
:
mm
.
CustomManyParticleForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
mm
.
CustomManyParticleForce
.
NoCutoff
,
CutoffNonPeriodic
:
mm
.
CustomManyParticleForce
.
CutoffNonPeriodic
,
CutoffNonPeriodic
:
mm
.
CustomManyParticleForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
mm
.
CustomManyParticleForce
.
CutoffPeriodic
}
CutoffPeriodic
:
mm
.
CustomManyParticleForce
.
CutoffPeriodic
,
Ewald
:
mm
.
CustomManyParticleForce
.
CutoffPeriodic
,
PME
:
mm
.
CustomManyParticleForce
.
CutoffPeriodic
,
LJPME
:
mm
.
CustomManyParticleForce
.
CutoffPeriodic
}
if
nonbondedMethod
not
in
methodMap
:
if
nonbondedMethod
not
in
methodMap
:
raise
ValueError
(
'Illegal nonbonded method for CustomManyParticleForce'
)
raise
ValueError
(
'Illegal nonbonded method for CustomManyParticleForce'
)
force
=
mm
.
CustomManyParticleForce
(
self
.
particlesPerSet
,
self
.
energy
)
force
=
mm
.
CustomManyParticleForce
(
self
.
particlesPerSet
,
self
.
energy
)
...
...
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