Commit b81a9e42 by peastman Committed by GitHub

Merge pull request #140 from peastman/bonds

Preserve bonds within heterogens
parents 1bec1b7c 580d08cf
...@@ -464,6 +464,12 @@ class PDBFixer(object): ...@@ -464,6 +464,12 @@ class PDBFixer(object):
newTopology.createStandardBonds() newTopology.createStandardBonds()
newTopology.createDisulfideBonds(newPositions) newTopology.createDisulfideBonds(newPositions)
# Add the bonds between atoms in heterogens.
for a1,a2 in self.topology.bonds():
if a1 in existingAtomMap and a2 in existingAtomMap and (a1.residue.name not in app.Topology._standardBonds or a2.residue.name not in app.Topology._standardBonds):
newTopology.addBond(existingAtomMap[a1], existingAtomMap[a2])
# Return the results. # Return the results.
return (newTopology, newPositions, newAtoms, existingAtomMap) return (newTopology, newPositions, newAtoms, existingAtomMap)
......
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