Exemplo n.º 1
0
        public void TestGetFirstMapping()
        {
            var sp      = CDK.SmilesParser;
            var target  = sp.ParseSmiles("C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C");
            var queryac = sp.ParseSmiles("Nc1ccccc1");

            CDKMCSHandler smsd1 = new CDKMCSHandler();
            MolHandler    mol1  = new MolHandler(queryac, true, true);
            MolHandler    mol2  = new MolHandler(target, true, true);

            smsd1.Set(mol1, mol2);
            smsd1.SearchMCS(true);
            smsd1.SearchMCS(true);
            Assert.IsNotNull(smsd1.GetFirstMapping());

            Assert.AreEqual(7, smsd1.GetFirstMapping().Count);
        }
Exemplo n.º 2
0
        public void TestSet_MolHandler_MolHandler()
        {
            var sp = CDK.SmilesParser;

            var           target1  = sp.ParseSmiles("C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C");
            var           queryac  = sp.ParseSmiles("Nc1ccccc1");
            MolHandler    source   = new MolHandler(queryac, true, true);
            MolHandler    target   = new MolHandler(target1, true, true);
            CDKMCSHandler instance = new CDKMCSHandler();

            instance.Set(source, target);
            instance.SearchMCS(true);
            Assert.IsNotNull(instance.GetFirstMapping());
        }
Exemplo n.º 3
0
 public override void TestSearchMCS()
 {
     try
     {
         var            sp     = CDK.SmilesParser;
         IAtomContainer target = null;
         target = sp.ParseSmiles("C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C");
         IAtomContainer queryac = null;
         queryac = sp.ParseSmiles("Nc1ccccc1");
         CDKMCSHandler smsd1 = new CDKMCSHandler();
         MolHandler    mol1  = new MolHandler(queryac, true, true);
         MolHandler    mol2  = new MolHandler(target, true, true);
         smsd1.Set(mol1, mol2);
         smsd1.SearchMCS(true);
         Assert.IsNotNull(smsd1.GetFirstMapping());
     }
     catch (InvalidSmilesException ex)
     {
         Trace.TraceError(ex.Message);
     }
 }