Пример #1
0
        public void TestRecursive29()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("Cc1cc(=O)c(c[nH]1)C(=O)NC(c1ccc(cc1)O)C(=O)NC1C(=O)N2C1SCC(=C2C(=O)O)CSc1nnnn1C");

            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(0, result[0]);
            Assert.AreEqual(0, result[1]);
        }
Пример #2
0
        public void TestRecursive28()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("Cc1ccc[n+]2c1[nH]cc(c2=O)c1n[nH]nn1");

            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(0, result[0]);
            Assert.AreEqual(0, result[1]);
        }
Пример #3
0
        public void TestRecursiveSmarts27()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("CCCc1nc(c2n1[nH]c(nc2=O)c1cc(ccc1OCC)S(=O)(=O)N1CCN(CC1)CC)C");

            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(0, result[0]);
            Assert.AreEqual(0, result[1]);
        }
Пример #4
0
        public void TestRecursiveSmarts26()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("CCCc1cc(=O)nc([nH]1)S");

            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(0, result[0]);
            Assert.AreEqual(0, result[1]);
        }
Пример #5
0
        public void TestRecursive29_cdkAromaticModel()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("Cc1cc(=O)c(c[nH]1)C(=O)NC(c1ccc(cc1)O)C(=O)NC1C(=O)N2C1SCC(=C2C(=O)O)CSc1nnnn1C");

            sqt.SetAromaticity(new Aromaticity(ElectronDonation.CDKModel, Cycles.CDKAromaticSetFinder));
            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(smi);
            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(1, result[0]);
            Assert.AreEqual(1, result[1]);
        }
Пример #6
0
        public void TestRecursiveSmarts27_cdkAromaticModel()
        {
            SMARTSQueryTool sqt = CreateFromSmarts("[NX3;H2,H1;!$(NC=O)]");
            IAtomContainer  smi = CreateFromSmiles("CCCc1nc(c2n1[nH]c(nc2=O)c1cc(ccc1OCC)S(=O)(=O)N1CCN(CC1)CC)C");

            sqt.SetAromaticity(new Aromaticity(ElectronDonation.CDKModel, Cycles.CDKAromaticSetFinder));
            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(smi);
            int[] result = SMARTSSearchTest.Match(sqt, smi);
            Assert.AreEqual(1, result[0]);
            Assert.AreEqual(1, result[1]);
        }
Пример #7
0
 public void Bug844()
 {
     Assert.IsTrue(Compares.AreDeepEqual(new int[] { 1, 1 }, SMARTSSearchTest.Match("[*R0]-[$([NRD3][CR]=O)]", "N1(CC)C(=O)CCCC1")));
 }
Пример #8
0
 public void RecursiveComponentGrouping()
 {
     Assert.IsTrue(Compares.AreDeepEqual(new int[] { 1, 1 }, SMARTSSearchTest.Match("[O;D1;$(([a,A]).([A,a]))][CH]=O", "OC=O.c1ccccc1")));
     Assert.IsTrue(Compares.AreDeepEqual(new int[] { 0, 0 }, SMARTSSearchTest.Match("[O;D1;$(([a,A]).([A,a]))][CH]=O", "OC=O")));
 }
Пример #9
0
 public void NestedRecursion()
 {
     Assert.IsTrue(Compares.AreDeepEqual(new int[] { 2, 2 }, SMARTSSearchTest.Match("[$(*C[$(*C)$(**N)])]", "CCCCN")));
     Assert.IsTrue(Compares.AreDeepEqual(new int[] { 1, 1 }, SMARTSSearchTest.Match("[$(*C[$(*C)$(**N)])]", "CCN")));
 }