Exemplo n.º 1
0
        public void TestAnyAtomAnyBondCase()
        {
            var sp      = CDK.SmilesParser;
            var target  = sp.ParseSmiles("O1C=CC=C1");
            var queryac = sp.ParseSmiles("C1CCCC1");
            var query   = QueryAtomContainerCreator.CreateAnyAtomAnyBondContainer(queryac, false);

            Assert.IsTrue(CDKMCS.IsSubgraph(target, query, true), "C1CCCC1 should be a subgraph of O1C=CC=C1");
            Assert.IsTrue(CDKMCS.IsIsomorph(target, query, true), "C1CCCC1 should be a isomorph of O1C=CC=C1");
        }
Exemplo n.º 2
0
        public void TestIsIsomorph_IAtomContainer_IAtomContainer()
        {
            var ac1 = builder.NewAtomContainer();

            ac1.Atoms.Add(builder.NewAtom("C"));
            var ac2 = builder.NewAtomContainer();

            ac2.Atoms.Add(builder.NewAtom("C"));
            Assert.IsTrue(CDKMCS.IsIsomorph(ac1, ac2, true));
            Assert.IsTrue(CDKMCS.IsSubgraph(ac1, ac2, true));
        }