Re: [PyMOL] question on differential coloring of protein chains

2004-02-17 Thread Mario Sanches

Hi Alex.

 i am new to pymol and am trying to figure out how to differentially
 color different chains (i.e. different proteins) in the structure i am
 viewing.  the structure i am working with is actually a structure of two
 proteins that were co-crystalized and i would like assign different
 colors to them.
 thanks for your help.
 alex dajkovic

As long as I know you can do that by creating copies of the same molecule. Do 
like this:

load molecule.pdb, mole
create copy, (mole)

Then assign different colors to each (for example):

color blue, mole
color red, copy

Finally show each chain separately:

show cartoon, (mole  c;A)
show cartoon, (copy  c;B)

(in the case you what a cartoon representation of chains A and B).

I hope that helps you.

Mario Sanches,  PhD Student
Protein Crystallography Group
São Paulo University, São Carlos Physics Institute
Phone:  +55 (16) 273 9868

[PyMOL] powermate in linux

2004-02-17 Thread Ezequiel Panepucci
Hello There,

I've written a very little piece of python code that uses 
William R Sowerbutts's rudimentary (his own words) python
interface to the powermate device.

BE WARNED!! This hack will crash your pymol session when you type
quit to terminate your pymol session. this wouldn't be a problem if
it didn't leave python threads floating around...Anyone knows a workaround?

The safest way to quit is to CTRL-C the prompt that started pymol.

This a first announcement. /dev/input/event* is indeed the future...

1) put the python interface ( in ${PYMOL_PATH}/modules

2) put the code below in your $HOME/

3) tweak the line that says CONFIGURE to match your setup

# code below starts here
def powermate_reader(): # thread for reading powermate dial
import sys
from pymol import cmd
from powermate import PowerMate
dial_down = 0
pm1 = PowerMate('/dev/input/event1') #CONFIGURE
while 1:
event = pm1.WaitForEvent(1)
if event == None:
sec,usec,type,code,value = event
if code == 256:
dial_down = not dial_down
if dial_down:

pm = threading.Thread(target=powermate_reader)
print 'PowerMate'

[PyMOL] RE: pymol and powermate

2004-02-17 Thread Panepucci, Ezequiel
 Thanks for sharing this. 
 my pleasure

 Will your python script, along with, work on other 
 platforms like OSX where the default driver/kernel extensions that 
 come with the powermate have been installed, or is this specific to 
 the linux driver? 
 as far as I know, the code I wrote uses the linux generic event interface
 so it will only work under linux, but then again, I only touch Macs every
 now and then so it could be that porting is easy for a MacOS X expert.