Ticket #38516: apbs_tkinter.patch
File apbs_tkinter.patch, 10.3 KB (added by howarth@…, 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 … … 2267 2280 self.update_buttonbox = Pmw.ButtonBox(self.mm_group.interior(), padx=0) 2268 2281 self.update_buttonbox.pack(side=LEFT) 2269 2282 self.update_buttonbox.add('Update',command=self.refresh) 2270 self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2283 #self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2284 self.mm_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) 2271 2285 2272 2286 self.ms_group = Pmw.Group(self.interior(),tag_text='Molecular Surface') 2273 2287 self.ms_buttonbox = Pmw.ButtonBox(self.ms_group.interior(), padx=0) … … 2317 2331 ) 2318 2332 bars = (self.mol_surf_low,self.mol_surf_middle,self.mol_surf_high) 2319 2333 Pmw.alignlabels(bars) 2320 for bar in bars: bar.pack(side=LEFT) 2321 self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2334 for bar in bars: bar.pack(expand = 1, side=LEFT) 2335 #self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2336 self.ms_group.grid(column=0, row=1, padx = 4, pady = 5, rowspan = 2, sticky=(N, S, E, W)) 2322 2337 2323 2338 self.fl_group = Pmw.Group(self.interior(),tag_text='Field Lines') 2324 2339 self.fl_buttonbox = Pmw.ButtonBox(self.fl_group.interior(), padx=0) … … 2333 2348 text = """Follows same coloring as surface.""", 2334 2349 ) 2335 2350 label.pack() 2336 self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2351 #self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) 2352 self.fl_group.grid(column = 1, row=0, padx = 4, pady = 5) 2337 2353 2338 2354 self.pi_group = Pmw.Group(self.interior(),tag_text='Positive Isosurface') 2339 2355 self.pi_buttonbox = Pmw.ButtonBox(self.pi_group.interior(), padx=0) 2340 self.pi_buttonbox.pack() 2356 #self.pi_buttonbox.pack() 2357 self.pi_buttonbox.grid() 2341 2358 self.pi_buttonbox.add('Show',command=self.showPosSurface) 2342 2359 self.pi_buttonbox.add('Hide',command=self.hidePosSurface) 2343 2360 self.pi_buttonbox.add('Update',command=self.updatePosSurface) … … 2351 2368 datatype = 'real', 2352 2369 entryfield_validate = {'validator' : 'real', 'min':0} 2353 2370 ) 2354 self.pos_surf_val.pack(side=LEFT) 2355 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)) 2356 2375 2357 2376 self.ni_group = Pmw.Group(self.interior(),tag_text='Negative Isosurface') 2358 2377 self.ni_buttonbox = Pmw.ButtonBox(self.ni_group.interior(), padx=0) 2359 self.ni_buttonbox.pack() 2378 #self.ni_buttonbox.pack() 2379 self.ni_buttonbox.grid() 2360 2380 self.ni_buttonbox.add('Show',command=self.showNegSurface) 2361 2381 self.ni_buttonbox.add('Hide',command=self.hideNegSurface) 2362 2382 self.ni_buttonbox.add('Update',command=self.updateNegSurface) … … 2370 2390 datatype = 'real', 2371 2391 entryfield_validate = {'validator' : 'real', 'max':0} 2372 2392 ) 2373 self.neg_surf_val.pack(side=LEFT) 2374 self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2393 #self.neg_surf_val.pack(side=LEFT) 2394 self.neg_surf_val.grid() 2395 #self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) 2396 self.ni_group.grid(column = 1, row=2, padx = 4, pady = 5, sticky=(N, S, E, W)) 2375 2397 2376 2398 2377 2399