Hello All,

We've found a case where the UniversalIsomorphismTester gives unexpected results - in the example it considers C**C as a subgraph of SCCS.
The test below is intentionally stripped out of any SMARTS related code. 

Is this UIT behaviour known?


public void testUIT() throws Exception
{
//Testing CDK isomorphism of C**C against SCCS --> it gives wrong result 
//Setting search query  'C**C'
QueryAtomContainer q = new QueryAtomContainer();
//setting atoms
IQueryAtom a0 = new AliphaticSymbolAtom("C"); 
q.addAtom(a0);
IQueryAtom a1 = new AnyAtom();
q.addAtom(a1);
IQueryAtom a2 = new AnyAtom();
q.addAtom(a2);
IQueryAtom a3 = new AliphaticSymbolAtom("C"); 
q.addAtom(a3);
//setting bonds
OrderQueryBond b0 = new OrderQueryBond(IBond.Order.SINGLE);
b0.setAtoms(new IAtom[] {a0,a1});
q.addBond(b0);
OrderQueryBond b1 = new OrderQueryBond(IBond.Order.SINGLE);
b1.setAtoms(new IAtom[] {a1,a2});
q.addBond(b1);
OrderQueryBond b2 = new OrderQueryBond(IBond.Order.SINGLE);
b2.setAtoms(new IAtom[] {a2,a3});
q.addBond(b2);
//Creating 'SCCS' target molecule
AtomContainer target = new AtomContainer();
//atoms
IAtom ta0 = new Atom("S");
target.addAtom(ta0);
IAtom ta1 = new Atom("C");
target.addAtom(ta1);
IAtom ta2 = new Atom("C");
target.addAtom(ta2);
IAtom ta3 = new Atom("S");
target.addAtom(ta3);
//bonds
IBond tb0 = new Bond();
tb0.setAtoms(new IAtom[] {ta0,ta1});
tb0.setOrder(IBond.Order.SINGLE);
target.addBond(tb0);
IBond tb1 = new Bond();
tb1.setAtoms(new IAtom[] {ta1,ta2});
tb1.setOrder(IBond.Order.SINGLE);
target.addBond(tb1);
IBond tb2 = new Bond();
tb2.setAtoms(new IAtom[] {ta2,ta3});
tb2.setOrder(IBond.Order.SINGLE);
target.addBond(tb2);
//Isomorphism check
boolean res = UniversalIsomorphismTester.isSubgraph(target, q);
System.out.println("Mapping C**C against SCCS = " + res);
}

>Mapping C**C against SCCS = true

Best regards,
Nina