Example #1
0
    def write_script(self):

        print 'Writing the lammps script'
        _mainpage_ = get_entriesvalue(self.s_entry_c)

        _flag_ = True  # data ok flag

        _entries_ = [
            'float', 'int', 'int', 'float:', 'float', 'int', 'float:', 'float',
            'float:', 'float'
        ]
        _flag_ *= self.check_datafile(bool)
        _flag_ *= min(check_vars(_mainpage_[1:], _entries_))

        if _flag_:
            self._container_['mainpage'] = _mainpage_
            _script_setup_ = [
                _mainpage_, self._container_['advanced'][0],
                self._container_['restrain']
            ]
            self.master._script_ = self._container_

            _flag_ = write_lammps_input(_script_setup_, self._convertdata_)

            if _flag_:
                print_dec_g('Lammps script done!')
                self.master.swapbody(3)
Example #2
0
    def save_it(self, event=None):

        g_names = []
        g_aids = []
        k_xyz_c = []
        runs_c = []
        lo = len(self._entries_)

        for g_e in range(len(self.ent_c))[:lo]:
            gr, ids, k_xyz, rns = get_entriesvalue(self.ent_c[g_e])

            #print gr, ids, k_xyz, self.ch_init[g_e]

            g_names.append(gr)
            g_aids.append(ids)
            k_xyz_c.append(k_xyz)
            runs_c.append(rns)
        self.master._aux_ = [[], None]
        self.master._aux_[0] = [
            g_names, g_aids, k_xyz_c, runs_c, self.ch_init[:lo]
        ]

        if len(self.ent_c) > lo and max(self.ch_init[lo:]) > 0:
            g_names = []
            g_aids = []
            k_xyz_c = []
            runs_c = []
            for g_e in range(len(self.ent_c))[lo:]:
                gr, ids, k_xyz, rns = get_entriesvalue(self.ent_c[g_e])
                g_names.append(gr)
                g_aids.append(ids)
                k_xyz_c.append(k_xyz)
                runs_c.append(rns)
            self.master._aux_[1] = [
                g_names, g_aids, k_xyz_c, runs_c, self.ch_init[lo:]
            ]

        self.exit_pop()
 def build_finalbuttons(self):
     '''    Final Buttons    '''
     row = Frame(self)#.body)
     #    Final Button
     Frame(row).pack(side='top', pady=4)# ------------------------ OJO
     row.pack(fill='x')
     
     row= Frame(self)#.body)
     self.b1 = Button( row, text='Run',
                 command=( lambda re= self.r_entry_c :
                          run_script(*get_entriesvalue(re)))
                )
     self.b1.pack(side='right', padx=15, pady= 5)
     
     b2 = Button(row, text='Quit', command= self.quit )
     b2.pack(side='right', padx=5, pady= 4)
     row.pack( side='right', fill='both', padx=5)
Example #4
0
 def save_it(self, event=None):
     self.master._aux_ = get_entriesvalue(self.ent_c)
     self.exit_pop()
Example #5
0
    def save_it(self):

        self.master._solvatedinfo_ = get_entriesvalue(self.ent_c)
        self.exit_pop()