Exemple #1
0
        public void TestIsomoltane_Bug3088164()
        {
            var sg = SmilesGenerator.Unique.Aromatic();

            var mol = smilesParser.ParseSmiles("CC(C)NCC(O)COC1=C(C=CC=C1)N1C=CC=C1");

            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(mol);
            Aromaticity.CDKLegacy.Apply(mol);
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);

            var f  = fragmenter.GetFrameworks().ToReadOnlyList();
            var fc = fragmenter.GetFrameworksAsContainers().ToReadOnlyList();

            Assert.AreEqual(1, f.Count);
            Assert.AreEqual(f.Count, fc.Count);
            Assert.AreEqual("c1ccc(cc1)-n2cccc2", f[0]);

            for (int i = 0; i < f.Count; i++)
            {
                Aromaticity.CDKLegacy.Apply(fc[i]);
                string newsmiles = sg.Create(fc[i]);
                Assert.IsTrue(f[i].Equals(newsmiles), f[i] + " did not match the container, " + newsmiles);
            }
        }
Exemple #2
0
        public void TestPirenperone_Bug3088164()
        {
            var sg = SmilesGenerator.Unique.Aromatic();

            var mol = smilesParser.ParseSmiles("Fc1ccc(cc1)C(=O)C4CCN(CCC\\3=C(\\N=C2\\C=C/C=C\\N2C/3=O)C)CC4");

            AtomContainerManipulator.ClearAtomConfigurations(mol);
            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(mol);
            Aromaticity.CDKLegacy.Apply(mol);
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);

            var f  = fragmenter.GetFrameworks().ToReadOnlyList();
            var fc = fragmenter.GetFrameworksAsContainers().ToReadOnlyList();

            Assert.AreEqual(1, f.Count);
            Assert.AreEqual(f.Count, fc.Count);

            AtomContainerManipulator.ClearAtomConfigurations(mol);
            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(mol);
            CDK.HydrogenAdder.AddImplicitHydrogens(mol);
            Aromaticity.CDKLegacy.Apply(mol);

            Assert.AreEqual("N=1C=C(CN2C=CC=CC12)CCN3CCC(Cc4ccccc4)CC3", f[0]);

            for (int i = 0; i < f.Count; i++)
            {
                string newsmiles = sg.Create(fc[i]);
                Assert.IsTrue(f[i].Equals(newsmiles), f[i] + " did not match the container, " + newsmiles);
            }
        }
Exemple #3
0
        public void TestCHEMBL529226()
        {
            var smiles     = "CC1=CN([C@@H]2O[C@@]3(COP(=S)(O)O[C@H]4[C@H]5OC[C@]4(COP(=S)(O)O[C@H]6C[C@@H](O[C@@H]6COP(=S)(O)O[C@H]7[C@@H](O)[C@@H](O[C@@H]7COP(=S)(O)O[C@H]8[C@@H](O)[C@@H](O[C@@H]8COP(=S)(O)O[C@H]9[C@@H](O)[C@@H](O[C@@H]9COP(=S)(O)O[C@H]%10[C@@H](O)[C@@H](O[C@@H]%10COP(=S)(O)O[C@H]%11[C@@H](O)[C@@H](O[C@@H]%11COP(=S)(O)O[C@H]%12[C@@H](O)[C@@H](O[C@@H]%12COP(=S)(O)O[C@H]%13[C@@H](O)[C@@H](O[C@@H]%13COP(=S)(O)O[C@H]%14[C@@H](O)[C@@H](O[C@@H]%14COP(=S)(O)O[C@H]%15[C@@H](O)[C@@H](O[C@@H]%15COP(=S)(O)O[C@H]%16[C@H]%17OC[C@]%16(COP(=S)(O)O[C@H]%18[C@H]%19OC[C@]%18(CO)O[C@H]%19N%20C=C(C)C(=O)NC%20=O)O[C@H]%17N%21C=C(C)C(=NC%21=O)N)N%22C=CC(=NC%22=O)N)n%23cnc%24C(=O)NC(=Nc%23%24)N)n%25cnc%26C(=O)NC(=Nc%25%26)N)N%27C=C(C)C(=O)NC%27=O)N%28C=CC(=NC%28=O)N)n%29cnc%30c(N)ncnc%29%30)N%31C=CC(=NC%31=O)N)n%32cnc%33C(=O)NC(=Nc%32%33)N)n%34cnc%35C(N)NC=Nc%34%35)N%36C=C(C)C(=O)NC%36=O)O[C@H]5N%37C=C(C)C(=O)NC%37=O)CO[C@@H]2[C@@H]3O)C(=O)N=C1N";
            var smipar     = CDK.SmilesParser;
            var mol        = smipar.ParseSmiles(smiles);
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);
            Assert.AreEqual(1, fragmenter.GetFrameworks().Count());
        }
Exemple #4
0
        public void TestSingleFramework()
        {
            var mol        = smilesParser.ParseSmiles("C1(c2ccccc2)(CC(CC1)CCc1ccccc1)CC1C=CC=C1");
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);

            var frameworks = fragmenter.GetFrameworks();

            Assert.AreEqual(1, frameworks.Count());
        }
Exemple #5
0
        public void TestBug1848591()
        {
            var mol        = smilesParser.ParseSmiles("c1(ccc(cc1C)CCC(C(CCC)C2C(C2)CC)C3C=C(C=C3)CC)C");
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);

            var frameworks = fragmenter.GetFrameworks();

            Assert.AreEqual(1, frameworks.Count());
            Assert.AreEqual("c1ccc(cc1)CCC(CC2CC2)C3C=CC=C3", frameworks.ElementAt(0));
        }
Exemple #6
0
        public void TestMF1()
        {
            var mol        = smilesParser.ParseSmiles("c1ccccc1PP(B)c1cccc(N(N)N)c1SC1CCC1");
            var fragmenter = new MurckoFragmenter(false, 2);

            fragmenter.GenerateFragments(mol);
            var frameworks = fragmenter.GetFrameworks();

            Assert.AreEqual(3, frameworks.Count());

            var rings = fragmenter.GetRingSystems();

            Assert.AreEqual(2, rings.Count());
        }
Exemple #7
0
        public void TestGetFragmentsAsContainers()
        {
            var biphenyl = TestMoleculeFactory.MakeBiphenyl();

            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(biphenyl);
            Aromaticity.CDKLegacy.Apply(biphenyl);

            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(biphenyl);
            var fragments = fragmenter.GetFragmentsAsContainers().ToReadOnlyList();

            Assert.AreEqual(2, fragments.Count);
            Assert.AreEqual(12, fragments[0].Atoms.Count);
            Assert.AreEqual(6, fragments[1].Atoms.Count);
        }
Exemple #8
0
        public void TestMacrocycle()
        {
            var mol = smilesParser.ParseSmiles("C1=C(C=C(C(=C1O)O)O)C(=O)OC2=CC(=CC(=C2O)O)C(=O)OCC3C(C(C(C(O3)OC(=O)C4=CC(=C(C(=C4)OC(=O)C5=CC(=C(C(=C5)O)O)O)O)O)OC(=O)C6=CC(=C(C(=C6)OC(=O)C7=CC(=C(C(=C7)O)O)O)O)O)OC(=O)C8=CC(=C(C(=C8)OC(=O)C9=CC(=C(C(=C9)O)O)O)O)O)OC(=O)C1=CC(=C(C(=C1)OC(=O)C1=CC(=C(C(=C1)O)O)O)O)O");

            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(mol);
            Aromaticity.CDKLegacy.Apply(mol);
            var fragmenter = new MurckoFragmenter(true, 6);

            fragmenter.GenerateFragments(mol);

            var f = fragmenter.GetFrameworks();

            Assert.AreEqual(1, f.Count());
            var rs = fragmenter.GetRingSystems();

            Assert.AreEqual(2, rs.Count());
            var fs = fragmenter.GetFragments();

            Assert.AreEqual(3, fs.Count());
        }