Skip to content

Commit

Permalink
Also need to visit other end of positional variation when moving.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Jul 22, 2016
1 parent 555cf60 commit 1600782
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2135,12 +2135,19 @@ private void placePositionalVariation(IAtomContainer mol) {
newvisit.clear();
for (Integer idx : visited) {
IAtom visitedAtom = mol.getAtom(idx);
if (e.getKey().contains(visitedAtom) || e.getValue().contains(visitedAtom))
continue;
for (Map.Entry<Set<IAtom>, IAtom> e2 : mapping.entries()) {
if (e2.getKey().contains(visitedAtom)) {
int other = idxs.get(e2.getValue());
if (!visited.contains(other) && newvisit.add(other)) {
visit(newvisit, adjlist, other);
}
} else if (e2.getValue() == visitedAtom) {
int other = idxs.get(e2.getKey().iterator().next());
if (!visited.contains(other) && newvisit.add(other)) {
visit(newvisit, adjlist, other);
}
}
}
}
Expand Down

0 comments on commit 1600782

Please sign in to comment.