Hi Boris,
Boris Kheyfets wrote, On 10/23/12 19:28:
[...]
But I want bk_hides_W to be a toggler. So I need a way to set a state of
my defun.
If I do
def bk_toggles_W ():
Hides W molecules.
if cmd.get(bk_toggles_W):
cmd.hide(all)
cmd.show(spheres, not (resn W))
If you need a global variable, use pymol.stored
Thank You Thomas -- that solves it.
Boris.
On Tue, Oct 23, 2012 at 9:28 PM, Boris Kheyfets kheyfbo...@gmail.comwrote:
Found a solution.
Basically it is to add
pmg_tk/startup/newmenu.py
file with the following content:
from Tkinter
http://pymolwiki.org/index.php/Set_Key
http://pymolwiki.org/index.php/Extend is also useful.
-David
On Tuesday, October 23, 2012 at 6:02 AM, Boris Kheyfets wrote:
Hello PyMOL users,
Menus
=
Is there a way I can add custom menu in PyMOL?
Ideally I'd like to be able to call
Found a solution.
Basically it is to add
pmg_tk/startup/newmenu.py
file with the following content:
from Tkinter import *
from pymol import cmd
def __init__(self):
self.menuBar.addmenu('NewMenu', 'Sample Menu')
self.menuBar.addmenuitem('NewMenu', 'command',
Hi Boris,
David Hall's suggestions are perfect.
Let me offer one more. If you can put up with programming a little
Python, check out pymol/modules/pymol/menu.py and
pymol/modules/pymol/preset.py. In menu.py you could add a No W menu
option (or similar) to the A Preset
Cheers,
-- Jason
On