Re: [PyMOL] GUI to improve interaction between user and PyMOL

2012-03-23 Thread David Hall
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
 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


Re: [PyMOL] GUI to improve interaction between user and PyMOL

2012-03-23 Thread Troels Emtekær Linnet
Sorry for being rude, it was not meant in that way.

I was just puzzled by the fact, that you would be graded higher if you
don't use the command line.
That is just weird.

Back to the question.
Suhaila, you should try to explore the "action button".

First get a protein, which is good to illustrate.
Go to the menu: "Plugin"->"PDB Loader Service". Enter: "1hpu"
(Or write in command: fetch 1hpu )  :-)

Then go to the "A" (Action) button in the right menu.
Press: preset -> ligand sites -> cartoon

Try some of the presets. They are very good!

If you want to find some polar contacts.
Select your residue by clicking it:
Action -> find -> polar contacts -> Then something from the menu

I hope that helps!

Best
Troels

2012/3/23 Suhaila Haji Mohd Hussin 

>  OK. It does sound pretty weird prolly because the way I asked isn't
> precise.
>
> We plot predicted contacts that can be viewed in various ways. So it'd be
> better to create a GUI select menu or something like that for user's ease
> of interacting with our project.
>
> Suhaila.
>
> --
> From: tlin...@gmail.com
> Date: Thu, 22 Mar 2012 22:14:39 +0100
> CC: pymol-users@lists.sourceforge.net
> Subject: Re: [PyMOL] GUI to improve interaction between user and PyMOL
>
>
> That is seriously the strangest thing I ever heard about...
>
> The GUI is for the small fast thing to do.
> Why just don't press all button and see?
> It can only take a little time.
>
> Or google: pymol + "name of button"
> That should give you an answer...
>
> The command line is where the power is.
> Use that.
>
> /Troels
>
>
>
> 2012/3/22 Suhaila Haji Mohd Hussin 
>
>  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
>
--
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

Re: [PyMOL] GUI to improve interaction between user and PyMOL

2012-03-22 Thread Suhaila Haji Mohd Hussin

OK. It does sound pretty weird prolly because the way I asked isn't precise.
We plot predicted contacts that can be viewed in various ways. So it'd be 
better to create a GUI select menu or something like that for user's ease of 
interacting with our project.

Suhaila.

From: tlin...@gmail.com
Date: Thu, 22 Mar 2012 22:14:39 +0100
CC: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] GUI to improve interaction between user and PyMOL

That is seriously the strangest thing I ever heard about...
The GUI is for the small fast thing to do.Why just don't press all button and 
see?It can only take a little time.


Or google: pymol + "name of button"That should give you an answer...
The command line is where the power is.Use that.

/Troels




2012/3/22 Suhaila Haji Mohd Hussin 









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 
  --
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

Re: [PyMOL] gui-programming

2006-02-13 Thread Charlie Moad
radiovar.get() seems to work fine for me with the code you provided. 
You mention .get() but you never say radiovar.get(), so is that what
you meant?  Also, radiovar.set(2) works as well for changing the
selection.

- Charlie

On 2/13/06, Martin Weisel  wrote:
> Hi folks,
>
> I figured out how to preselect a Radiobutton in a Tkinter-GUI. One ought to
> use .select() instead of .set().
> But now I've come up with another problem: How do I get the actual value of
> that Radiobutton? For some reason .get() is returning 0 all the times.
>
> from Tkinter import *
> radio = Tk()
>
> radiovar = IntVar()
> Yes = Radiobutton(radio, text='Yes', value =1, variable = radiovar)
> Yes.pack(side = LEFT)
> Yes.select()
> No = Radiobutton(radio, text='No', value =2, variable = radiovar)
> No.pack(side=LEFT)
>
> Although .get() does not work, displaying the actual value of radiovar as a
> dynamic label on the GUI works very well:
>
> Label(radio, textvariable=radiovar).pack(side = RIGHT)
>
> How do I get the actual value of that Radiobutton? In case .get() doesn't
> work at all, is there a way of reading out the textvariable of the Label?
>
> I would appreciate any help.
> Regards,
> Martin
>
>
> --
> DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
> GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



RE: [PyMOL] GUI

2006-01-20 Thread David A. Horita
Hi-
I'd second this; my brain doesn't do well keeping track of whether I'm,
for example, in maximum or reasonable performance mode. 
David

- 
David A. Horita, Ph.D.
Department of Biochemistry
Wake Forest University School of Medicine
Winston-Salem, NC 27157-1016 
Tel: 336 713-4194
Fax: 336 716-7671 
email:  dhor...@wfubmc.edu
web:  http://www1.wfubmc.edu/biochem/faculty/Horita.htm

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Mark A
Saper
Sent: Friday, January 20, 2006 3:01 PM
To: Pymol
Subject: [PyMOL] GUI

Hi Warren,

Why can't we have little check marks in the main menu that indicate the
current setting?
For example, Setting>Rendering>Antialias   gets a check, but  
selecting Setting>Rendering>Shadows>None doesn't give a check (as do any
of the other rendering options).

Mark
_
Mark A. Saper, Ph.D.
Associate Professor of Biological Chemistry Biophysics Research
Division, University of Michigan Chemistry Building Room 3040 930 N
University Ave Ann Arbor MI 48109-1055 U.S.A.

sa...@umich.edu(734) 764-3353fax (734) 764-3323
http://www.biochem.med.umich.edu/biochem/research/profiles/saper.html




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users



RE: [PyMOL] GUI output font size too small

2006-01-19 Thread Warren DeLano
Hi Bjorn,

Unfortunately, this isn't configurable at runtime yet.  We'll need to do 
something about this...

For now, you'll need to directly edit the code in 
modules/pmg_tk/skins/normal/__init__.py

look for self.font and text.configure.

Cheers,
Warren


--
Warren L. DeLano, Ph.D. 
Principal Scientist

. DeLano Scientific LLC  
. 400 Oyster Point Blvd., Suite 213   
. South San Francisco, CA 94080 USA   
. Biz:(650)-872-0942  Tech:(650)-872-0834 
. Fax:(650)-872-0273  Cell:(650)-346-1154
. mailto:war...@delsci.com  
 

> -Original Message-
> From: pymol-users-ad...@lists.sourceforge.net 
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
> Björn Kauppi
> Sent: Thursday, January 19, 2006 5:02 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] GUI output font size too small
> 
> Hi,
> 
> 
> How do I control the GUI output window font size? It is too 
> small for my eyes on a 1600x1200 screen. I can change it 
> manually to 12 points in the GUI window Setting/Output size, 
> but I can not find a command to do it for my .pymolrc! 
> Preferably to more than 12 points as well...
> I use 0.99beta33 on Linux and windows.
> 
> 
> Thanks,
> 
> 
> Björn Kauppi
> 
> **
> *
> This e-mail may contain confidential information proprietary 
> to Karo Bio AB and is meant for the intended addressee(s) 
> only. Any unauthorized review, use, disclosure or 
> distribution is prohibited. If you have received this message 
> in error, please advise the sender and delete the e-mail and 
> any attachments from your files. Thank you!
> **
> *
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files for problems?  Stop!  Download the new AJAX 
> search engine that makes searching your log files as easy as 
> surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 
> 
> 
>