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
77e2ddf4
"platforms/vscode:/vscode.git/clone" did not exist on "859bfd6ca18f5b2e64616e2fa656d5f3897e4226"
Commit
77e2ddf4
authored
Apr 24, 2013
by
Peter Eastman
Browse files
Allow GBSA definitions to be split between multiple files
parent
52c7a1fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+8
-3
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
77e2ddf4
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012 Stanford University and the Authors.
Portions copyright (c) 2012
-2013
Stanford University and the Authors.
Authors: Peter Eastman, Mark Friedrichs
Authors: Peter Eastman, Mark Friedrichs
Contributors:
Contributors:
...
@@ -1005,8 +1005,13 @@ class GBSAOBCGenerator:
...
@@ -1005,8 +1005,13 @@ class GBSAOBCGenerator:
@
staticmethod
@
staticmethod
def
parseElement
(
element
,
ff
):
def
parseElement
(
element
,
ff
):
existing
=
[
f
for
f
in
ff
.
_forces
if
isinstance
(
f
,
GBSAOBCGenerator
)]
if
len
(
existing
)
==
0
:
generator
=
GBSAOBCGenerator
()
generator
=
GBSAOBCGenerator
()
ff
.
_forces
.
append
(
generator
)
ff
.
_forces
.
append
(
generator
)
else
:
# Multiple <GBSAOBCForce> tags were found, probably in different files. Simply add more types to the existing one.
generator
=
existing
[
0
]
for
atom
in
element
.
findall
(
'Atom'
):
for
atom
in
element
.
findall
(
'Atom'
):
types
=
ff
.
_findAtomTypes
(
atom
,
1
)
types
=
ff
.
_findAtomTypes
(
atom
,
1
)
if
types
is
not
None
:
if
types
is
not
None
:
...
...
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