Re: [PyMOL] question on differential coloring of protein chains
Hi Alex. hello- 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 sanc...@if.sc.usp.br
[PyMOL] powermate in linux
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... Cheers, Zac HOWTO: 1) put the python interface (powermate.py) in ${PYMOL_PATH}/modules http://www.sowerbutts.com/powermate/powermate.py 2) put the code below in your $HOME/.pymolrc.py 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: continue sec,usec,type,code,value = event if code == 256: dial_down = not dial_down continue if dial_down: cmd.turn('x',value) else: cmd.turn('y',value) pm = threading.Thread(target=powermate_reader) print 'PowerMate' pm.setDaemon(1) pm.start()
[PyMOL] RE: pymol and powermate
Thanks for sharing this. my pleasure Will your python script, along with powermate.py, 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. Cheers, Zac