Unverified Commit 3ef12991 authored by Zane Beckwith's avatar Zane Beckwith Committed by GitHub
Browse files

modeller: Convey bond info when adding Modellers (#4113)


Co-authored-by: default avatarZane Beckwith <zane.beckwith@sandboxquantum.com>
parent add2bbee
...@@ -117,7 +117,7 @@ class Modeller(object): ...@@ -117,7 +117,7 @@ class Modeller(object):
newAtoms[atom] = newAtom newAtoms[atom] = newAtom
newPositions.append(deepcopy(self.positions[atom.index])) newPositions.append(deepcopy(self.positions[atom.index]))
for bond in self.topology.bonds(): for bond in self.topology.bonds():
newTopology.addBond(newAtoms[bond[0]], newAtoms[bond[1]]) newTopology.addBond(newAtoms[bond[0]], newAtoms[bond[1]], bond.type, bond.order)
# Add the new model # Add the new model
...@@ -131,7 +131,7 @@ class Modeller(object): ...@@ -131,7 +131,7 @@ class Modeller(object):
newAtoms[atom] = newAtom newAtoms[atom] = newAtom
newPositions.append(deepcopy(addPositions[atom.index])) newPositions.append(deepcopy(addPositions[atom.index]))
for bond in addTopology.bonds(): for bond in addTopology.bonds():
newTopology.addBond(newAtoms[bond[0]], newAtoms[bond[1]]) newTopology.addBond(newAtoms[bond[0]], newAtoms[bond[1]], bond.type, bond.order)
self.topology = newTopology self.topology = newTopology
self.positions = newPositions self.positions = newPositions
......
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