Skip to content

Commit

Permalink
Atoms are not added to IQueryAtomContainer causing an index out of bo…
Browse files Browse the repository at this point in the history
…unds exception downstream. Adding the atoms fixes the issue.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
Stephan Beisken authored and egonw committed Feb 6, 2014
1 parent 0eefcdc commit 1a3f3d3
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -945,6 +945,12 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
atom3.setSymbol("O");
SymbolQueryAtom atom4=new SymbolQueryAtom(atomContainer.getBuilder());
atom4.setSymbol("O");

orthopair.addAtom(atom1);
orthopair.addAtom(atom2);
orthopair.addAtom(atom3);
orthopair.addAtom(atom4);

orthopair.addBond(new AromaticQueryBond(atom1,atom2,IBond.Order.SINGLE, atomContainer.getBuilder()));
orthopair.addBond(new OrderQueryBond(atom1,atom3,IBond.Order.SINGLE, atomContainer.getBuilder()));
orthopair.addBond(new OrderQueryBond(atom2,atom4,IBond.Order.SINGLE, atomContainer.getBuilder()));
Expand Down

0 comments on commit 1a3f3d3

Please sign in to comment.