Ejemplo n.º 1
0
        public void Furan()
        {
            Graph     g = Graph.FromSmiles("O1C=CC=C1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true });
        }
Ejemplo n.º 2
0
        public void Thiophene()
        {
            Graph     g = Graph.FromSmiles("[S]1[CH]=[CH][CH]=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true });
        }
Ejemplo n.º 3
0
        public void Pyridine_n_oxide_charge_sep()
        {
            Graph     g = Graph.FromSmiles("[O-][N+]1=[CH][CH]=[CH][CH]=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, true, true, true, true, true, true });
        }
Ejemplo n.º 4
0
        private static void Test(string org, string exp, int lim)
        {
            Graph g = Graph.FromSmiles(org);
            Graph h = AllCycles.DaylightModel(g, lim).AromaticForm();

            Assert.AreEqual(h.ToSmiles(), exp);
        }
Ejemplo n.º 5
0
        public void Cyclopenta_b_azepine()
        {
            Graph     g = Graph.FromSmiles("[CH]1=[CH][C]2=[N][CH]=[CH][CH]=[CH][C]2=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true, true, true, true, true, true });
        }
Ejemplo n.º 6
0
        public void Sp2_oxygen_cation()
        {
            Graph     g = Graph.FromSmiles("[CH]1[NH+]=[CH][C]2=[CH][CH]=[CH][O+]12");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, false, false, false, false, false, false, false });
        }
Ejemplo n.º 7
0
        public void Openeye_comparison_5()
        {
            Graph     g = Graph.FromSmiles("[NH]1[C]2=[CH][CH]=[C]1[CH]=[C]3[CH]=[CH][C]([CH]=[C]4[NH][C]([CH]=[CH]4)=[CH][C]5=[N][C]([CH]=[CH]5)=[CH]2)=[N]3");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, });
        }
Ejemplo n.º 8
0
        public void Porphyrin()
        {
            Graph     g = Graph.FromSmiles("C1=CC=2C=C3C=CC(C=C4C=CC(C=C5C=CC(C=C1N2)=N5)=N4)=N3");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, });
        }
Ejemplo n.º 9
0
        public void Test()
        {
            Graph     g = Graph.FromSmiles("[CH2]=[C]1[CH]=[CH][N](=[CH2])=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, false, true, true, true, true, true, true });
        }
Ejemplo n.º 10
0
        public void Noroborane()
        {
            Graph     g = Graph.FromSmiles("[CH2]=[C]1[C]2=[CH][CH]=[C]1[N]=[CH]2");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, false, true, true, true, true, true, true });
        }
Ejemplo n.º 11
0
        public void Dimethylidenecyclohexadiene()
        {
            Graph     g = Graph.FromSmiles("[CH2]=[C]1[CH]=[CH][C](=[CH2])[CH]=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, true, true, true, true, false, true, true });
        }
Ejemplo n.º 12
0
        public void Trioxanetrione()
        {
            Graph     g = Graph.FromSmiles("[O]1[O][O][C](=[O])[C](=[O])[C](=[O])1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, false, true, false, true, false });
        }
Ejemplo n.º 13
0
        public void Cyclohexa_g_chromen_6_one()
        {
            Graph     g = Graph.FromSmiles("[O]=[C]1[CH]=[CH][CH]=[C]2[CH]=[C]3[O][CH]=[CH][CH]=[C]3[CH]=[C]12");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, });
        }
Ejemplo n.º 14
0
        public void Cyclodocosaundecaene()
        {
            Graph     g = Graph.FromSmiles("[CH]=1[CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]=[CH][CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, });
        }
Ejemplo n.º 15
0
        public void Cyclopentadienyl_anion()
        {
            Graph     g = Graph.FromSmiles("[CH-]1[CH]=[CH][CH]=[CH]1");
            AllCycles d = AllCycles.DaylightModel(g);

            Assert_AreEqual(d.aromatic, new bool[] { true, true, true, true, true });
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Delocalise a kekulé graph representation to one with <i>aromatic</i>
 /// bonds. The original graph remains unchanged.
 /// TODO: more explanation
 /// </summary>
 /// <returns>aromatic representation</returns>
 public Graph IsAromatic()
 {
     // note Daylight use SSSR - should update and use that by default but
     // provide the AllCycles method
     try
     {
         return(AllCycles.DaylightModel(this).AromaticForm());
     }
     catch (ArgumentException)
     {
         // too many cycles - use a simpler model which only allows rings of
         // size 6 (catches fullerenes)
         return(AllCycles.DaylightModel(this, 6).AromaticForm());
     }
 }