From: Michelle G. <mic...@ya...> - 2006-04-18 16:02:57
|
While we're discussing ways to make our favorite program a little better, I had an idea I thought I'd throw out there... While making some figures the other day, I found myself scrolling endlessly through the edit settings menu (under Setting --> Edit All) a number of times, mostly to locate a relatively small number of settings related to ray tracing. This got me thinking about a way to improve access to the many wonderful features that have been added to PyMOL. The solution I came up with is a filter line which could be placed directly above the window listing all the settings. Users could then type a word, say "ray" or "cartoon", and only the settings containing this word would be shown. The best example of a program containing this feature is the "about:config" window in Firefox. When you open a browser and type "about:config" instead of an address, a window containing hundreds of settings appears. At the top is a filter bar which you can use to pare down the number of settings listed below. I think this would be a great addition to PyMOL and would help users familiarize themselves with the many new settings which have been (and will be) implemented. :) Perhaps others have even better solutions to this problem. The use of a filter is just the first idea which came to my mind. I think it would be relatively easy to implement, although my python programming skills are somewhat limited. Thanks, Michelle Gill |
From: <an...@bi...> - 2006-04-19 22:44:51
|
Hey Michelle, Ezequiel Panepucci wrote grepset, a little script that allows you to do=20 exactly what you want and even more. No need even to open the edit=20 settings menu, just type 'grepset ray', and you're cruising. Get grepset from http://www.pymolwiki.org/index.php/Grepset and put it=20 into your .pymolrc file as 'run /path/to/grepset.py'. Life is good. Andreas Michelle Gill wrote: > While we're discussing ways to make our favorite program a little=20 > better, I had an idea I thought I'd throw out there... >=20 > While making some figures the other day, I found myself scrolling=20 > endlessly through the edit settings menu (under Setting --> Edit All) a= =20 > number of times, mostly to locate a relatively small number of settings= =20 > related to ray tracing. This got me thinking about a way to improve=20 > access to the many wonderful features that have been added to PyMOL. >=20 > The solution I came up with is a filter line which could be placed=20 > directly above the window listing all the settings. Users could then=20 > type a word, say "ray" or "cartoon", and only the settings containing=20 > this word would be shown. >=20 > The best example of a program containing this feature is the=20 > "about:config" window in Firefox. When you open a browser and type=20 > "about:config" instead of an address, a window containing hundreds of=20 > settings appears. At the top is a filter bar which you can use to pare=20 > down the number of settings listed below. >=20 > I think this would be a great addition to PyMOL and would help users=20 > familiarize themselves with the many new settings which have been (and=20 > will be) implemented. :) >=20 > Perhaps others have even better solutions to this problem. The use of a= =20 > filter is just the first idea which came to my mind. I think it would b= e=20 > relatively easy to implement, although my python programming skills are= =20 > somewhat limited. >=20 > Thanks, > Michelle Gill >=20 --=20 --> Andreas F=F6rster <-- 8 rue Doudart de Lagr=E9e, 38000 Grenoble ++33.(0)438.866201 and ++33.(0)456.452000 www.biochem.utah.edu/~andreas docandreas.blogspot.com |
From: Jerome P. <j.p...@pa...> - 2006-04-20 09:04:15
|
Hello Michelle, You can also edit the SetEditor.py file. The file is in the=20 '/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the=20 feature. It can be done by adding to small portion of add-on code to the=20 file. If you do so: Keep a copy of the original file in a safe place ! Here is a part of the modified file: ####################################### class SetEditor: def __init__(self,app): self.app =3D app self.list =3D [] for a in pymol.setting.get_index_list(): self.list.append("%-30s %s"%(pymol.setting._get_name(a), cmd.get_setting_text(a,'',-1))) self.index =3D {} c =3D 0 for a in pymol.setting.get_name_list(): self.index[a] =3D c c =3D c + 1 =20 self.dialog =3D Pmw.SelectionDialog(self.app.root,title=3D"Settings", buttons =3D ('Edit', 'Done'), defaultbutton=3D'Edit', scrolledlist_labelpos=3DN, label_text=3D'Double click to edit', scrolledlist_items =3D self.list, command =3D self.command) self.dialog.geometry("500x400") # start of the add-on interior =3D self.dialog.interior() self.filter =3D Pmw.EntryField(interior, labelpos =3D 'w', label_text=3D 'Filter:', validate =3D None, command =3D self.filter_list) self.filter.pack() # end of the add-on self.listbox =3D self.dialog.component('scrolledlist') self.listbox.component('listbox').configure(font=3Dapp.my_fw_font) self.dialog.protocol('WM_DELETE_WINDOW',self.cancel) app.my_show(self.dialog) # start of the add-on def filter_list(self): self.list =3D [] for a in pymol.setting.get_index_list(): if self.filter.getvalue() in pymol.setting._get_name(a): self.list.append("%-30s %s"%(pymol.setting._get_name(a), cmd.get_setting_text(a,'',-1))) self.dialog.setlist(self.list) self.dialog.update() # end of the add-on def cancel(self,event=3DNone): self.command(result=3D'Done') ####################################### This code works fine on my linux box. If you have some problem, don't hesit= ate=20 to ask me ! Cheers, Jerome Pansanel Le Mardi 18 Avril 2006 18:02, Michelle Gill a =E9crit=A0: > While we're discussing ways to make our favorite program a little > better, I had an idea I thought I'd throw out there... > > While making some figures the other day, I found myself scrolling > endlessly through the edit settings menu (under Setting --> Edit All) a > number of times, mostly to locate a relatively small number of settings > related to ray tracing. This got me thinking about a way to improve > access to the many wonderful features that have been added to PyMOL. > > The solution I came up with is a filter line which could be placed > directly above the window listing all the settings. Users could then > type a word, say "ray" or "cartoon", and only the settings containing > this word would be shown. > > The best example of a program containing this feature is the > "about:config" window in Firefox. When you open a browser and type > "about:config" instead of an address, a window containing hundreds of > settings appears. At the top is a filter bar which you can use to pare > down the number of settings listed below. > > I think this would be a great addition to PyMOL and would help users > familiarize themselves with the many new settings which have been (and > will be) implemented. :) > > Perhaps others have even better solutions to this problem. The use of a > filter is just the first idea which came to my mind. I think it would be > relatively easy to implement, although my python programming skills are > somewhat limited. > > Thanks, > Michelle Gill > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users |
From: Jerome P. <j.p...@pa...> - 2006-04-20 09:49:30
|
Hello Michelle, You can also edit the SetEditor.py file. The file is in the=20 '/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the=20 feature. It can be done by adding to small portion of add-on code to the=20 file. If you do so: Keep a copy of the original file in a safe place ! Here is a part of the modified file: ####################################### class SetEditor: def __init__(self,app): self.app =3D app self.list =3D [] for a in pymol.setting.get_index_list(): self.list.append("%-30s %s"%(pymol.setting._get_name(a), cmd.get_setting_text(a,'',-1))) self.index =3D {} c =3D 0 for a in pymol.setting.get_name_list(): self.index[a] =3D c c =3D c + 1 =20 self.dialog =3D Pmw.SelectionDialog(self.app.root,title=3D"Settings", buttons =3D ('Edit', 'Done'), defaultbutton=3D'Edit', scrolledlist_labelpos=3DN, label_text=3D'Double click to edit', scrolledlist_items =3D self.list, command =3D self.command) self.dialog.geometry("500x400") # start of the add-on interior =3D self.dialog.interior() self.filter =3D Pmw.EntryField(interior, labelpos =3D 'w', label_text=3D 'Filter:', validate =3D None, command =3D self.filter_list) self.filter.pack() # end of the add-on self.listbox =3D self.dialog.component('scrolledlist') self.listbox.component('listbox').configure(font=3Dapp.my_fw_font) self.dialog.protocol('WM_DELETE_WINDOW',self.cancel) app.my_show(self.dialog) # start of the add-on def filter_list(self): self.list =3D [] for a in pymol.setting.get_index_list(): if self.filter.getvalue() in pymol.setting._get_name(a): self.list.append("%-30s %s"%(pymol.setting._get_name(a), cmd.get_setting_text(a,'',-1))) self.dialog.setlist(self.list) self.dialog.update() # end of the add-on def cancel(self,event=3DNone): self.command(result=3D'Done') ####################################### This code works fine on my linux box. If you have some problem, don't hesit= ate=20 to ask me ! Cheers, Jerome Pansanel Le Mardi 18 Avril 2006 18:02, Michelle Gill a =E9crit=A0: > While we're discussing ways to make our favorite program a little > better, I had an idea I thought I'd throw out there... > > While making some figures the other day, I found myself scrolling > endlessly through the edit settings menu (under Setting --> Edit All) a > number of times, mostly to locate a relatively small number of settings > related to ray tracing. This got me thinking about a way to improve > access to the many wonderful features that have been added to PyMOL. > > The solution I came up with is a filter line which could be placed > directly above the window listing all the settings. Users could then > type a word, say "ray" or "cartoon", and only the settings containing > this word would be shown. > > The best example of a program containing this feature is the > "about:config" window in Firefox. When you open a browser and type > "about:config" instead of an address, a window containing hundreds of > settings appears. At the top is a filter bar which you can use to pare > down the number of settings listed below. > > I think this would be a great addition to PyMOL and would help users > familiarize themselves with the many new settings which have been (and > will be) implemented. :) > > Perhaps others have even better solutions to this problem. The use of a > filter is just the first idea which came to my mind. I think it would be > relatively easy to implement, although my python programming skills are > somewhat limited. > > Thanks, > Michelle Gill > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users |