"plugins/amoeba/vscode:/vscode.git/clone" did not exist on "74e2ca75b10065e3da2ed0200bba143e982d9282"
Commit 0515bdf6 authored by tic20's avatar tic20
Browse files

Leave XML data structure unchanged during parsing.

parent 174b57e4
......@@ -266,13 +266,13 @@ class ForceField(object):
atomIndices = template.atomIndices
for ia, atom in enumerate(residue.findall('Atom')):
params = {}
a_attrib = atom.attrib
atomName = a_attrib.pop('name')
for key in atom.attrib:
if key not in ('name', 'type'):
params[key] = _convertParameterToNumber(atom.attrib[key])
atomName = atom.attrib['name']
if atomName in atomIndices:
raise ValueError('Residue '+resName+' contains multiple atoms named '+atomName)
typeName = a_attrib.pop('type')
for key in atom.attrib:
params[key] = _convertParameterToNumber(atom.attrib[key])
typeName = atom.attrib['type']
atomIndices[atomName] = ia
template.atoms.append(ForceField._TemplateAtomData(atomName, typeName, self._atomTypes[typeName].element, params))
for site in residue.findall('VirtualSite'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment