Commit e5ffa905 authored by Jason Swails's avatar Jason Swails
Browse files

Have the CHARMM parsers use the Topology API additions.

parent b0ecf372
......@@ -777,11 +777,12 @@ class CharmmPsfFile(object):
# Add each chain (separate 'system's) and residue
for atom in self.atom_list:
if atom.system != last_chain:
chain = topology.addChain()
chain = topology.addChain(atom.system)
last_chain = atom.system
if atom.residue.idx != last_residue:
last_residue = atom.residue.idx
residue = topology.addResidue(atom.residue.resname, chain)
residue = topology.addResidue(atom.residue.resname, chain,
str(atom.residue.idx))
if atom.type is not None:
# This is the most reliable way of determining the element
atomic_num = atom.type.atomic_number
......
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