"openmmapi/vscode:/vscode.git/clone" did not exist on "95b8dbd625f58dcbb3e343246cc69df3466672cb"
Commit 0844f4fe authored by Peter Eastman's avatar Peter Eastman
Browse files

Residue indices for atoms were set incorrectly

parent ff7931dc
......@@ -285,9 +285,10 @@ class PrmtopLoader(object):
self.residuePointerDict = {}
resPointers=self._raw_data['RESIDUE_POINTER']
firstAtom = [int(p)-1 for p in resPointers]
firstAtom.append(self.getNumAtoms())
res = 0
for i in range(self.getNumAtoms()):
while i < firstAtom[res]:
while firstAtom[res+1] <= i:
res += 1
self.residuePointerDict[i] = res
return self.residuePointerDict[iAtom]
......
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