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
0515bdf6
Commit
0515bdf6
authored
Feb 20, 2019
by
tic20
Browse files
Leave XML data structure unchanged during parsing.
parent
174b57e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+5
-5
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
0515bdf6
...
@@ -266,13 +266,13 @@ class ForceField(object):
...
@@ -266,13 +266,13 @@ class ForceField(object):
atomIndices
=
template
.
atomIndices
atomIndices
=
template
.
atomIndices
for
ia
,
atom
in
enumerate
(
residue
.
findall
(
'Atom'
)):
for
ia
,
atom
in
enumerate
(
residue
.
findall
(
'Atom'
)):
params
=
{}
params
=
{}
a_attrib
=
atom
.
attrib
for
key
in
atom
.
attrib
:
atomName
=
a_attrib
.
pop
(
'name'
)
if
key
not
in
(
'name'
,
'type'
):
params
[
key
]
=
_convertParameterToNumber
(
atom
.
attrib
[
key
])
atomName
=
atom
.
attrib
[
'name'
]
if
atomName
in
atomIndices
:
if
atomName
in
atomIndices
:
raise
ValueError
(
'Residue '
+
resName
+
' contains multiple atoms named '
+
atomName
)
raise
ValueError
(
'Residue '
+
resName
+
' contains multiple atoms named '
+
atomName
)
typeName
=
a_attrib
.
pop
(
'type'
)
typeName
=
atom
.
attrib
[
'type'
]
for
key
in
atom
.
attrib
:
params
[
key
]
=
_convertParameterToNumber
(
atom
.
attrib
[
key
])
atomIndices
[
atomName
]
=
ia
atomIndices
[
atomName
]
=
ia
template
.
atoms
.
append
(
ForceField
.
_TemplateAtomData
(
atomName
,
typeName
,
self
.
_atomTypes
[
typeName
].
element
,
params
))
template
.
atoms
.
append
(
ForceField
.
_TemplateAtomData
(
atomName
,
typeName
,
self
.
_atomTypes
[
typeName
].
element
,
params
))
for
site
in
residue
.
findall
(
'VirtualSite'
):
for
site
in
residue
.
findall
(
'VirtualSite'
):
...
...
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