Hi Suhaila,

Correct me if I'm wrong but you want create *new* GUI elements for
pymol to enhance your application, right?

To my knowledge, there is not a great tutorial on this, but I can give
you some pointers to plugins that do this currently and hopefully you
can backfill some knowledge.

The first point I should make though is that, as far as I know, you
*cannot* modify the existing PyMol windows, that is, you can't add an
item to the menu you get when you right click on a protein or make it
so there are additional per object menus on the right side of the
screen for your application.

Generally, for PyMol, your plugin interface is written using Tkinter,
which is widely documented across the internet (
http://wiki.python.org/moin/TkInter ).

http://www.pymolwiki.org/index.php/Plugins_Tutorial provides a simple
example of a plugin with a graphical interface. The __init__ adds your
plugin to the menu bar in PyMol and tells PyMol what to execute when
you click on the button. From there, it is just Tkinter with python
and pymol scripting.

The only pymol plugin I currently use with a graphical interface is
the Autodock plugin:
https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/plugins/autodock_plugin.py
It's a pretty complex piece of code, but it is a nice plugin that
seems highly reliable, so understanding looking at how it does things
can probably help you solve any issues you have along the way. There
are other plugins that you can find by browsing the pymolwiki that
also use graphical elements and may also be helpful.

-David




On Thu, Mar 22, 2012 at 4:39 PM, Suhaila Haji Mohd Hussin
<bell_beaut...@hotmail.com> wrote:
> Hello everyone.
>
> Is there any useful online reference that can be shared for me to learn how
> to add GUI executed by Python script?
>
> I know PyMOL can visualize the protein just by typing in on PyMOL command
> but my supervisor will  grade my group project higher if we can make it more
> interactive where the user can just use a mouse to click button or something
> and less typing on command.
>
> Best regards,
> Suhaila
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to