Ticket #42860: apbs_tkinter.patch
File apbs_tkinter.patch, 10.4 KB (added by mtiberti (Matteo Tiberti), 11 years ago) |
---|
-
modules/pmg_tk/startup/apbs_tools.py
old new 612 612 # Set up the Main page 613 613 page = self.notebook.add('Main') 614 614 group = Pmw.Group(page,tag_text='Main options') 615 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 615 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 616 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 616 617 self.selection = Pmw.EntryField(group.interior(), 617 618 labelpos='w', 618 619 label_text='Selection to use: ', … … 658 659 page = self.notebook.add('Configuration') 659 660 660 661 group = Pmw.Group(page,tag_text='Dielectric Constants') 661 group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 662 #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 663 group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 662 664 group.grid(column=0, row=0) 663 665 self.interior_dielectric = Pmw.EntryField(group.interior(),labelpos='w', 664 666 label_text = 'Protein Dielectric:', … … 677 679 #entry.pack(side='left',fill='both',expand=1,padx=4) # side-by-side 678 680 entry.pack(fill='x',expand=1,padx=4,pady=1) # vertical 679 681 group = Pmw.Group(page,tag_text='Other') 680 group.pack(fill='both',expand=1, padx=4, pady=5) 682 #group.pack(fill='both',expand=1, padx=4, pady=5) 683 group.grid(padx=4, pady=5, sticky=(N, S, E, W)) 681 684 group.grid(column=1, row=1,columnspan=4) 682 685 self.max_mem_allowed = Pmw.EntryField(group.interior(),labelpos='w', 683 686 label_text = 'Maximum Memory Allowed (MB):', … … 735 738 736 739 737 740 group = Pmw.Group(page,tag_text='Ions') 738 group.pack(fill='both',expand=1, padx=4, pady=5) 741 #group.pack(fill='both',expand=1, padx=4, pady=5) 742 group.grid(padx=4, pady=5, sticky=(N, S, E, W)) 739 743 group.grid(column=0, row=1, ) 740 744 self.ion_plus_one_conc = Pmw.EntryField(group.interior(), 741 745 labelpos='w', … … 794 798 entry.pack(fill='x',expand=1,padx=4) 795 799 796 800 group = Pmw.Group(page,tag_text = 'Coarse Mesh Length') 797 group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 801 #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 802 group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 798 803 group.grid(column = 1, row = 0) 799 804 for coord in 'x y z'.split(): 800 805 setattr(self,'grid_coarse_%s'%coord,Pmw.EntryField(group.interior(), … … 809 814 810 815 811 816 group = Pmw.Group(page,tag_text = 'Fine Mesh Length') 812 group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 817 #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 818 group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 813 819 group.grid(column = 2, row = 0) 814 820 for coord in 'x y z'.split(): 815 821 setattr(self,'grid_fine_%s'%coord,Pmw.EntryField(group.interior(), … … 824 830 825 831 826 832 group = Pmw.Group(page,tag_text = 'Grid Center') 827 group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 833 #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 834 group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 828 835 group.grid(column = 3, row = 0) 829 836 for coord in 'x y z'.split(): 830 837 setattr(self,'grid_center_%s'%coord,Pmw.EntryField(group.interior(), … … 838 845 getattr(self,'grid_center_%s'%coord).pack(fill='x', expand=1, padx=4, pady=1) 839 846 840 847 group = Pmw.Group(page,tag_text = 'Grid Points') 841 group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 848 #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) 849 group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 842 850 group.grid(column = 4, row = 0) 843 851 for coord in 'x y z'.split(): 844 852 setattr(self,'grid_points_%s'%coord,Pmw.EntryField(group.interior(), … … 856 864 page.grid_columnconfigure(5,weight=1) 857 865 page = self.notebook.add('Program Locations') 858 866 group = Pmw.Group(page,tag_text='Locations') 859 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 867 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 868 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 860 869 def quickFileValidation(s): 861 870 if s == '': return Pmw.PARTIAL 862 871 elif os.path.isfile(s): return Pmw.OK … … 955 964 956 965 page = self.notebook.add('Temp File Locations') 957 966 group = Pmw.Group(page,tag_text='Locations') 958 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 967 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 968 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 959 969 self.pymol_generated_pqr_filename = Pmw.EntryField(group.interior(), 960 970 labelpos = 'w', 961 971 label_pyclass = FileDialogButtonClassFactory.get(self.setPymolGeneratedPqrFilename), … … 1003 1013 page = self.notebook.add('Visualization (1)') 1004 1014 group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=1) 1005 1015 self.visualization_group_1 = group 1006 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1016 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1017 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 1007 1018 1008 1019 page = self.notebook.add('Visualization (2)') 1009 1020 group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=2) 1010 1021 self.visualization_group_2 = group 1011 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1022 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1023 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 1012 1024 1013 1025 # Create a couple of other empty pages 1014 1026 page = self.notebook.add('About') 1015 1027 group = Pmw.Group(page, tag_text='About PyMOL APBS Tools') 1016 group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1028 #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) 1029 group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) 1017 1030 text = """This plugin integrates PyMOL (http://PyMOL.org/) with APBS (http://www.poissonboltzmann.org/apbs/). 1018 1031 1019 1032 Documentation may be found at … … 2271 2284 self.update_buttonbox = Pmw.ButtonBox(self.mm_group.interior(), padx=0) 2272 2285 self.update_buttonbox.pack(side=LEFT) 2273 2286 self.update_buttonbox.add('Update',command=self.refresh) 2274 self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2287 #self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2288 self.mm_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 2275 2289 2276 2290 self.ms_group = Pmw.Group(self.interior(),tag_text='Molecular Surface') 2277 2291 self.ms_buttonbox = Pmw.ButtonBox(self.ms_group.interior(), padx=0) … … 2321 2335 ) 2322 2336 bars = (self.mol_surf_low,self.mol_surf_middle,self.mol_surf_high) 2323 2337 Pmw.alignlabels(bars) 2324 for bar in bars: bar.pack(side=LEFT) 2325 self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2338 for bar in bars: bar.pack(expand = 1, side=LEFT) 2339 #self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2340 self.ms_group.grid(column=0, row=1, padx = 4, pady = 5, rowspan = 2, sticky=(N, S, E, W)) 2326 2341 2327 2342 self.fl_group = Pmw.Group(self.interior(),tag_text='Field Lines') 2328 2343 self.fl_buttonbox = Pmw.ButtonBox(self.fl_group.interior(), padx=0) … … 2337 2352 text = """Follows same coloring as surface.""", 2338 2353 ) 2339 2354 label.pack() 2340 self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2355 #self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2356 self.fl_group.grid(column = 1, row=0, padx = 4, pady = 5) 2341 2357 2342 2358 self.pi_group = Pmw.Group(self.interior(),tag_text='Positive Isosurface') 2343 2359 self.pi_buttonbox = Pmw.ButtonBox(self.pi_group.interior(), padx=0) 2344 self.pi_buttonbox.pack() 2360 #self.pi_buttonbox.pack() 2361 self.pi_buttonbox.grid() 2345 2362 self.pi_buttonbox.add('Show',command=self.showPosSurface) 2346 2363 self.pi_buttonbox.add('Hide',command=self.hidePosSurface) 2347 2364 self.pi_buttonbox.add('Update',command=self.updatePosSurface) … … 2355 2368 datatype = 'real', 2356 2369 entryfield_validate = {'validator' : 'real', 'min':0} 2357 2370 ) 2358 self.pos_surf_val.pack(side=LEFT) 2359 self.pi_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2371 #self.pos_surf_val.pack(side=LEFT) 2372 self.pos_surf_val.grid() 2373 #self.pi_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2374 self.pi_group.grid(column = 1, row = 1, padx = 4, pady = 5, sticky=(N, S, E, W)) 2360 2375 2361 2376 self.ni_group = Pmw.Group(self.interior(),tag_text='Negative Isosurface') 2362 2377 self.ni_buttonbox = Pmw.ButtonBox(self.ni_group.interior(), padx=0) 2363 self.ni_buttonbox.pack() 2378 #self.ni_buttonbox.pack() 2379 self.ni_buttonbox.grid() 2364 2380 self.ni_buttonbox.add('Show',command=self.showNegSurface) 2365 2381 self.ni_buttonbox.add('Hide',command=self.hideNegSurface) 2366 2382 self.ni_buttonbox.add('Update',command=self.updateNegSurface) … … 2374 2394 datatype = 'real', 2375 2395 entryfield_validate = {'validator' : 'real', 'max':0} 2376 2396 ) 2377 self.neg_surf_val.pack(side=LEFT) 2378 self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2397 #self.neg_surf_val.pack(side=LEFT) 2398 self.neg_surf_val.grid() 2399 #self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2400 self.ni_group.grid(column = 1, row=2, padx = 4, pady = 5, sticky=(N, S, E, W)) 2379 2401 2380 2402 2381 2403