diff --git a/Code/GraphMol/CMakeLists.txt b/Code/GraphMol/CMakeLists.txt index ca207eb6b..0c70732a6 100644 --- a/Code/GraphMol/CMakeLists.txt +++ b/Code/GraphMol/CMakeLists.txt @@ -93,6 +93,6 @@ rdkit_test(graphmoltestPickler testPickler.cpp rdkit_test(graphmolIterTest itertest.cpp LINK_LIBRARIES SmilesParse GraphMol RDGeometryLib RDGeneral) rdkit_test(hanoiTest hanoitest.cpp LINK_LIBRARIES SmilesParse_static FileParsers_static GraphMol_static -RDGeometryLib_static RDGeneral_static ) +RDGeometryLib_static RDGeneral_static ${RDKit_THREAD_LIBS} ) diff --git a/Code/GraphMol/hanoitest.cpp b/Code/GraphMol/hanoitest.cpp index 212c320df..35f98e516 100644 --- a/Code/GraphMol/hanoitest.cpp +++ b/Code/GraphMol/hanoitest.cpp @@ -812,6 +812,7 @@ void test7(){ "C[C@H]1C[C@H](C1)N1CCN(C)CC1", "CN1CCN(CC1)[C@H]1C[C@H](C1)c1ncc2c(N)nccn12", "CN1CCN(CC1)[C@H]1C[C@H](C1)c1nc(-c2ccc3ccc(nc3c2)-c2ccccc2)c2c(N)nccn12", + "*12*3*1*3*4*5*4*52", "EOS" }; unsigned int i=0; diff --git a/Code/GraphMol/roger_canon.h b/Code/GraphMol/roger_canon.h index a9c282c8b..37d55169a 100644 --- a/Code/GraphMol/roger_canon.h +++ b/Code/GraphMol/roger_canon.h @@ -291,8 +291,12 @@ namespace RDKit { return 1; // ring membership - ivi=dp_mol->getRingInfo()->numAtomRings(dp_atoms[i].atom->getIdx())!=0; - ivj=dp_mol->getRingInfo()->numAtomRings(dp_atoms[j].atom->getIdx())!=0; + // initial passes at this were just checking "isInRing" to allow + // a possible future more efficient check. These break on this + // lovely double-diamond pathological case: + // *12*3*1*3*4*5*4*52 + ivi=dp_mol->getRingInfo()->numAtomRings(dp_atoms[i].atom->getIdx()); + ivj=dp_mol->getRingInfo()->numAtomRings(dp_atoms[j].atom->getIdx()); if(iviivj)