Greetings All,

I am a software developer starting a project for a biology lab doing
work in protein structure. I am not a biologist. We'll be using Pymol
as the basis for the visualization component of the application, and I
am at the beginning stages of understanding how pymol works and is put
together.

I already have a number of questions but I am going to hold off until
I have more experience with the package. But there is one issue I need
settled soon and I'm hoping some of you can point me in the right
direction.

We are not going to use the existing external UI or the internal GLUT
UI.  Our application will be doing a bunch of things not related to
3-D structure, and my thinking right now is to simply start pymol in a
separate thread as it is done in examples/devel/start_pymol.py,
handing it the -x and -i flags. Then our app will use cmd.* calls to
get protein structures loaded and manipulated.

What I don't understand is how I can get notified of events that
happen when the user uses the mouse to select residues etc. For
example, once a protein is loaded, our app may color certain residues
if we know that there have been experiments that mutated that
position(s). And if a user clicks on one of those residues, our app
needs to open up another window and present the data by fetching it
from a relational database. Is there a way that the external GUI can
be notified of events? I looked through the documentation and didn't
see anything obvious.

I looked through the code a bit, and I'm still at a very early stage
of learning. But I did see that the pmg_tk module sets pymol._ext_gui
and sets up a FIFO. I can't see that it is used anywhere by the pymol
module, but I'm thinking that this is the start of a 2-way
communication mechanism between pymol and an external GUI?

Can anyone tell me how to be notified that selections change? Or even
just receive raw mouse events?

Thanks!

----
Bob Terek
The Quarry, Inc.
http://www.thequarry.com/
rte...@thequarry.com



Reply via email to