Ticket #38516: apbs_tkinter.patch

File apbs_tkinter.patch, 10.3 KB (added by howarth@…, 11 years ago)

apbs_tkinter.patch adjusted for pymol 1.6.0

  • modules/pmg_tk/startup/apbs_tools.py

    old new  
    612612        # Set up the Main page
    613613        page = self.notebook.add('Main')
    614614        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))
    616617        self.selection = Pmw.EntryField(group.interior(),
    617618                                        labelpos='w',
    618619                                        label_text='Selection to use: ',
     
    658659        page = self.notebook.add('Configuration')
    659660
    660661        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))
    662664        group.grid(column=0, row=0)
    663665        self.interior_dielectric = Pmw.EntryField(group.interior(),labelpos='w',
    664666                                   label_text = 'Protein Dielectric:',
     
    677679            #entry.pack(side='left',fill='both',expand=1,padx=4) # side-by-side
    678680            entry.pack(fill='x',expand=1,padx=4,pady=1) # vertical
    679681        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))
    681684        group.grid(column=1, row=1,columnspan=4)
    682685        self.max_mem_allowed = Pmw.EntryField(group.interior(),labelpos='w',
    683686                                              label_text = 'Maximum Memory Allowed (MB):',
     
    735738
    736739
    737740        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))
    739743        group.grid(column=0, row=1, )
    740744        self.ion_plus_one_conc = Pmw.EntryField(group.interior(),
    741745                                                labelpos='w',
     
    794798            entry.pack(fill='x',expand=1,padx=4)
    795799
    796800        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))
    798803        group.grid(column = 1, row = 0)
    799804        for coord in 'x y z'.split():
    800805            setattr(self,'grid_coarse_%s'%coord,Pmw.EntryField(group.interior(),
     
    809814
    810815
    811816        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))
    813819        group.grid(column = 2, row = 0)
    814820        for coord in 'x y z'.split():
    815821            setattr(self,'grid_fine_%s'%coord,Pmw.EntryField(group.interior(),
     
    824830
    825831
    826832        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))
    828835        group.grid(column = 3, row = 0)
    829836        for coord in 'x y z'.split():
    830837            setattr(self,'grid_center_%s'%coord,Pmw.EntryField(group.interior(),
     
    838845            getattr(self,'grid_center_%s'%coord).pack(fill='x', expand=1, padx=4, pady=1)
    839846
    840847        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))
    842850        group.grid(column = 4, row = 0)
    843851        for coord in 'x y z'.split():
    844852            setattr(self,'grid_points_%s'%coord,Pmw.EntryField(group.interior(),
     
    856864        page.grid_columnconfigure(5,weight=1)
    857865        page = self.notebook.add('Program Locations')
    858866        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))
    860869        def quickFileValidation(s):
    861870            if s == '': return Pmw.PARTIAL
    862871            elif os.path.isfile(s): return Pmw.OK
     
    955964       
    956965        page = self.notebook.add('Temp File Locations')
    957966        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))
    959969        self.pymol_generated_pqr_filename = Pmw.EntryField(group.interior(),
    960970                                                           labelpos = 'w',
    961971                                                           label_pyclass = FileDialogButtonClassFactory.get(self.setPymolGeneratedPqrFilename),
     
    10031013        page = self.notebook.add('Visualization (1)')
    10041014        group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=1)
    10051015        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))
    10071018
    10081019        page = self.notebook.add('Visualization (2)')
    10091020        group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=2)
    10101021        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))
    10121024
    10131025        # Create a couple of other empty pages
    10141026        page = self.notebook.add('About')
    10151027        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))
    10171030        text = """This plugin integrates PyMOL (http://PyMOL.org/) with APBS (http://www.poissonboltzmann.org/apbs/).
    10181031
    10191032Documentation may be found at
     
    22672280            self.update_buttonbox = Pmw.ButtonBox(self.mm_group.interior(), padx=0)
    22682281            self.update_buttonbox.pack(side=LEFT)
    22692282            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))
    22712285
    22722286            self.ms_group = Pmw.Group(self.interior(),tag_text='Molecular Surface')
    22732287            self.ms_buttonbox = Pmw.ButtonBox(self.ms_group.interior(), padx=0)
     
    23172331                                            )
    23182332            bars = (self.mol_surf_low,self.mol_surf_middle,self.mol_surf_high)
    23192333            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))
    23222337
    23232338            self.fl_group = Pmw.Group(self.interior(),tag_text='Field Lines')
    23242339            self.fl_buttonbox = Pmw.ButtonBox(self.fl_group.interior(), padx=0)
     
    23332348                                  text = """Follows same coloring as surface.""",
    23342349                                  )
    23352350            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)
    23372353
    23382354            self.pi_group = Pmw.Group(self.interior(),tag_text='Positive Isosurface')
    23392355            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()
    23412358            self.pi_buttonbox.add('Show',command=self.showPosSurface)
    23422359            self.pi_buttonbox.add('Hide',command=self.hidePosSurface)
    23432360            self.pi_buttonbox.add('Update',command=self.updatePosSurface)
     
    23512368                                            datatype = 'real',
    23522369                                            entryfield_validate = {'validator' : 'real', 'min':0}
    23532370                                            )
    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))
    23562375
    23572376            self.ni_group = Pmw.Group(self.interior(),tag_text='Negative Isosurface')
    23582377            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()
    23602380            self.ni_buttonbox.add('Show',command=self.showNegSurface)
    23612381            self.ni_buttonbox.add('Hide',command=self.hideNegSurface)
    23622382            self.ni_buttonbox.add('Update',command=self.updateNegSurface)
     
    23702390                                            datatype = 'real',
    23712391                                            entryfield_validate = {'validator' : 'real', 'max':0}
    23722392                                            )
    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))
    23752397
    23762398
    23772399