Exemple #1
0
    static void Main()
    {
        Atomo         a1 = new Atomo();
        CargaEfectiva c1 = new CargaEfectiva();

        Console.Write("Número atómico: ");
        int e = Int32.Parse(Console.ReadLine());

        a1.confige(e);

        Console.Write("La Configuración Electrónica del {0} es:", a1.getElemento(e));
        for (int i = 0; i < 19; i++)
        {
            if (a1.getConfigElec(i) == 0)
            {
                break;
            }
            Console.Write(" {0}{1}", a1.getNivel(i), a1.getConfigElec(i));
        }
        Console.WriteLine();

        /*c1.ordenar(e);
         *
         * for(int i=0;i<19;i++){
         *  Console.Write("{0}{1} ",c1.getGrupos(i),c1.getElectrones(i));
         * }
         * Console.WriteLine();*/
    }
        private Atomo CarregarAtomo(DataRow row)
        {
            Atomo atomo = new Atomo();

            atomo.Cordenada_X = Convert.ToDouble(row.Field <string>("Cartn_x").Replace(".", ","));
            atomo.Cordenada_Y = Convert.ToDouble(row.Field <string>("Cartn_y").Replace(".", ","));
            atomo.Cordenada_Z = Convert.ToDouble(row.Field <string>("Cartn_z").Replace(".", ","));

            atomo.Composto = row.Field <string>("label_atom_id");
            atomo.Cadeia   = row.Field <string>("auth_asym_id");

            return(atomo);
        }
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Inicio");

        Dictionary <int, Atomo> atomos = Atomo.todosAtomos();

        atomos[1].escreverAtomo();

        Dictionary <int, Equacao> .ValueCollection equacoes = Equacao.todasEquacoes().Values;

        Debug.Log("Inicio");
        foreach (Equacao m in equacoes)
        {
            Debug.Log($"{m.Tipo}: {m.ToString()}");
        }
    }
Exemple #4
0
        private void EliminarAtomo(object sender, RoutedEventArgs e)
        {
            SelectedAtom = (Atomo)this.DtGrid_Atomos.SelectedItem;
            List <string> relaciones    = File.ReadAllLines(RelacionesFile).ToList();
            List <string> proposiciones = File.ReadAllLines(ProposicionesFile).ToList();
            List <string> atomos        = File.ReadAllLines(AtomoFile).ToList();

            atomos.RemoveAll(r => r.Split(',')[0].Equals(SelectedAtom.Id));

            for (int i = 0; i < relaciones.Count; i++)
            {
                string[] tmp = relaciones[i].Split(',');
                if (tmp[1].Equals(SelectedAtom.Id))
                {
                    relaciones.RemoveAll(r => r.Split(',')[0].Equals(tmp[0]));
                    proposiciones.RemoveAll(r => r.Split(',')[0].Equals(tmp[0]));
                    i = 0;
                }
            }

            for (int i = 0; i < proposiciones.Count; i++)
            {
                string[] tmp = proposiciones[i].Split(',');
                if (tmp[1].Equals(SelectedAtom.Id))
                {
                    relaciones.RemoveAll(r => r.Split(',')[0].Equals(tmp[0]));
                    proposiciones.RemoveAll(r => r.Split(',')[0].Equals(tmp[0]));
                    i = 0;
                }
            }

            File.WriteAllLines(RelacionesFile, relaciones);
            File.WriteAllLines(AtomoFile, atomos);
            File.WriteAllLines(ProposicionesFile, proposiciones);
            LoadFileData();
        }
Exemple #5
0
 public Aresta(Atomo a1, Atomo a2)
     : this()
 {
     A1 = a1;
     A2 = a2;
 }