Exemplo n.º 1
0
 private void editPeptideToolStripMenuItem_Click(object sender, EventArgs e)
 {
     /*Form2 frm = new Form2(peptide);
      * frm.ShowDialog();*/
     using (Form2 form2 = new Form2(peptide))
     {
         var result = form2.ShowDialog();
         if (result == DialogResult.OK)
         {
             peptide = form2.peptide;
         }
     }
 }
Exemplo n.º 2
0
        public void directTask()
        {
            Peptide globalbest          = new Peptide();
            Peptide bestvaluewithinsmol = new Peptide();
            Peptide counter             = new Peptide();

            counter.setMarker(markers);
            counter.setLabel(labels);
            globalbest.rmsd = 100.0;
            for (counter.sMol = 0.01; counter.sMol <= 1; counter.sMol += 0.01)                       //fitting smol
            {
                bestvaluewithinsmol.rmsd = 100;
                for (counter.tau = 0; counter.tau < tauRhoPlotDimension; counter.tau++)                           //fitting tau
                {
                    for (counter.rho = 0; counter.rho < tauRhoPlotDimension; counter.rho++)                       //fitting rho
                    {
                        counter.calcrmsd2();
                        if (counter.rmsd < bestvaluewithinsmol.rmsd)
                        {
                            bestvaluewithinsmol.rmsd = counter.rmsd;
                            bestvaluewithinsmol.tau  = counter.tau;
                            bestvaluewithinsmol.rho  = counter.rho;
                        }

                        tauRhoPlot[counter.tau][counter.rho] = counter.rmsd;
                    }
                }
                if (globalbest.rmsd > bestvaluewithinsmol.rmsd)
                {
                    globalbest.rmsd = bestvaluewithinsmol.rmsd;
                    globalbest.tau  = bestvaluewithinsmol.tau;
                    globalbest.rho  = bestvaluewithinsmol.rho;
                    globalbest.sMol = counter.sMol;
                }
            }
            tau  = globalbest.tau;
            rho  = globalbest.rho;
            sMol = globalbest.sMol;
        }
Exemplo n.º 3
0
 public Form2(Peptide _peptide)
 {
     InitializeComponent();
     peptide = _peptide;
 }