Commit c7e1a2ac authored by Jason Swails's avatar Jason Swails

Merge pull request #625 from jchodera/master

Don't add self exceptions to bond graph exceptions
parents 18467384 12355fad
...@@ -392,9 +392,11 @@ def _process_nonbonded(struct, force): ...@@ -392,9 +392,11 @@ def _process_nonbonded(struct, force):
bond_graph_exceptions = defaultdict(set) bond_graph_exceptions = defaultdict(set)
for atom in struct.atoms: for atom in struct.atoms:
for a2 in atom.bond_partners: for a2 in atom.bond_partners:
if atom is not a2:
bond_graph_exceptions[atom].add(a2) bond_graph_exceptions[atom].add(a2)
for a3 in a2.bond_partners: for a3 in a2.bond_partners:
if a3 is atom: continue if a3 is atom: continue
if atom is not a3:
bond_graph_exceptions[atom].add(a3) bond_graph_exceptions[atom].add(a3)
# TODO should we compress exception types? # TODO should we compress exception types?
......
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