Commit 6f44f338 authored by peastman's avatar peastman
Browse files

Fixed an error in parsing PSF files with multiple segments

parent 813772e8
...@@ -702,6 +702,7 @@ class CharmmPsfFile(object): ...@@ -702,6 +702,7 @@ class CharmmPsfFile(object):
if atom.system != last_chain: if atom.system != last_chain:
chain = topology.addChain(atom.system) chain = topology.addChain(atom.system)
last_chain = atom.system last_chain = atom.system
last_residue = None
if resid != last_residue: if resid != last_residue:
last_residue = resid last_residue = resid
residue = topology.addResidue(atom.residue.resname, chain, resid) residue = topology.addResidue(atom.residue.resname, chain, resid)
......
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