Esempio n. 1
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string directory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ToxRuns\\" + this.listView1.SelectedItems[0].Text;

            this.ImportDescriptors(directory + "\\StructureData\\2d_descriptors.txt");
            this.ImportAssignedFragments(directory + "\\StructureData\\AssignedFragments.html");
            string[] fileNames = System.IO.Directory.GetFiles(directory + "\\StructureData", "*.mol");
            foreach (string filename in fileNames)
            {
                this.ImportMolFile(filename);
            }
            string[] groups      = this.TestGroups(nonZeroFragments);
            string[] elements    = Functionalities.Elements(molecule);
            Atom[][] rings       = molecule.FindRings();
            Atom[]   phosphates  = Functionalities.findPhosphate(molecule);
            Atom[]   chlorides   = Functionalities.FindChloride(molecule);
            Atom[]   bromides    = Functionalities.FindBromide(molecule);
            Atom[]   halides     = Functionalities.FindHalides(molecule);
            Atom[][] hetero      = Functionalities.HeteroCyclic(molecule);
            Atom[][] thio        = Functionalities.HeteroCyclic(molecule, "S");
            Atom[][] furan       = Functionalities.HeteroCyclic(molecule, "O");
            Atom[][] azo         = Functionalities.HeteroCyclic(molecule, "N");
            Atom[]   branchAtoms = Functionalities.BranchAtoms(molecule);
            string[] phosphs     = Functionalities.PhosphorousFunctionality(molecule);
            //Form2 form = new Descriptors.Form2(nonZeroFragments);
            //form.Show();
        }
Esempio n. 2
0
        static public Atom[][] HeteroCyclic(Molecule m)
        {
            //if (!cyclesFound) this.GetDFS();
            Atom[][]      rings  = m.FindRings();
            List <Atom[]> retVal = new List <Atom[]>();

            foreach (Atom[] atoms in rings)
            {
                foreach (Atom a in atoms)
                {
                    if (a.Element != ELEMENTS.C)
                    {
                        retVal.Add(atoms);
                        break;
                    }
                }
            }
            return(retVal.ToArray());
        }