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
129cece9
Unverified
Commit
129cece9
authored
Feb 02, 2022
by
Peter Eastman
Committed by
GitHub
Feb 02, 2022
Browse files
Added error checking for incomplete AMOEBA force fields (#3442)
parent
af8066cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
wrappers/python/openmm/app/forcefield.py
wrappers/python/openmm/app/forcefield.py
+8
-5
No files found.
wrappers/python/openmm/app/forcefield.py
View file @
129cece9
...
...
@@ -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
1
Stanford University and the Authors.
Portions copyright (c) 2012-202
2
Stanford University and the Authors.
Authors: Peter Eastman, Mark Friedrichs
Contributors:
...
...
@@ -3511,7 +3511,8 @@ class AmoebaAngleGenerator(object):
#=============================================================================================
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
pass
if
not
any
(
isinstance
(
f
,
AmoebaOutOfPlaneBendGenerator
)
for
f
in
self
.
forceField
.
getGenerators
()):
raise
ValueError
(
'A ForceField containing an <AmoebaAngleForce> must also contain an <AmoebaOutOfPlaneBendForce>'
)
#=============================================================================================
# createForcePostOpBendAngle is called by AmoebaOutOfPlaneBendForce with the list of
...
...
@@ -4534,8 +4535,9 @@ class AmoebaStretchBendGenerator(object):
"""An AmoebaStretchBendGenerator constructs a AmoebaStretchBendForce."""
#=============================================================================================
def
__init__
(
self
):
def
__init__
(
self
,
forcefield
):
self
.
forcefield
=
forcefield
self
.
types1
=
[]
self
.
types2
=
[]
self
.
types3
=
[]
...
...
@@ -4547,7 +4549,7 @@ class AmoebaStretchBendGenerator(object):
@
staticmethod
def
parseElement
(
element
,
forceField
):
generator
=
AmoebaStretchBendGenerator
()
generator
=
AmoebaStretchBendGenerator
(
forceField
)
forceField
.
_forces
.
append
(
generator
)
# <AmoebaStretchBendForce stretchBendUnit="1.0">
...
...
@@ -4584,7 +4586,8 @@ class AmoebaStretchBendGenerator(object):
#=============================================================================================
def
createForce
(
self
,
sys
,
data
,
nonbondedMethod
,
nonbondedCutoff
,
args
):
pass
if
not
any
(
isinstance
(
f
,
AmoebaOutOfPlaneBendGenerator
)
for
f
in
self
.
forcefield
.
getGenerators
()):
raise
ValueError
(
'A ForceField containing an <AmoebaStretchBendForce> must also contain an <AmoebaOutOfPlaneBendForce>'
)
#=============================================================================================
...
...
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