Re: [PyMOL] NMR Chemical shift perturbation data to surfacerepresentation
First, load a PDB file with values encoded in the B-factor column. Then issue a command like the following: spectrum b specturm b, minimum=10, maximum=50 spectrum b, minimum=10, maximum=50, palette=blue_red Predefined palettes include: blue_greengreen_white_magenta red_cyan blue_magenta green_white_red red_green blue_red green_white_yellowred_white_blue blue_white_green green_yellow red_white_cyan blue_white_magentagreen_yellow_red red_white_green blue_white_redmagenta_blue red_white_yellow blue_white_yellow magenta_cyan red_yellow blue_yellow magenta_green red_yellow_green cbmr magenta_white_bluermbc cyan_magenta magenta_white_cyanyellow_blue cyan_red magenta_white_green yellow_cyan cyan_white_magentamagenta_white_yellow yellow_cyan_white cyan_white_redmagenta_yellowyellow_green cyan_white_yellow rainbow yellow_magenta cyan_yellow rainbow2 yellow_red gcbmryrainbow2_rev yellow_white_blue green_bluerainbow_cycle yellow_white_green green_magenta rainbow_cycle_rev yellow_white_magenta green_red rainbow_rev yellow_white_red green_white_blue red_blue yrmbcg Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:supp...@delsci.com _ From: pymol-users-boun...@lists.sourceforge.net [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Chavas Leo Sent: Sunday, June 22, 2008 1:55 AM To: Ankit Gupta Cc: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] NMR Chemical shift perturbation data to surfacerepresentation Dear Ankit -- On 20 Jun 2008, at 18:38, Ankit Gupta wrote: I want my chemical shift perturbation data to be mapped to the stucture. I am trying different things such as trying to get it to b-factor like position but haven't been successful. Is there any way I can get the data to be shown in pdb with various colors representing low/high perturbation in chemical shifts? I'm feeling that doing the ADP thing is the best solution. ConSurf is using this column to display the conservation of amino acids, and it's working very well! I don't know why it shouldn't with the chemical shift. You just have to be careful that you don't have a negative value, although I'm not sure PyMol cannot deal with those. Just normalize the all values and change the ADP column of your pdb might do the trick. Just my opinion though. HTH. Kind regards. -- Leo -- Chavas Leonard, Ph.D. Research Associate Faculty of Life Sciences The University of Manchester The Michael Smith Building Oxford Road Manchester Lancashire M13 9PT Tel: +44(0)161-275-1586 e-mail: leonard.cha...@manchester.ac.uk http://personalpages.manchester.ac.uk/staff/leonard.chavas/
Re: [PyMOL] Question about PyMOL development
Fengyuan, Unfortunately, the PyMOL's internal gui pop-up menu system was not designed as nor intended to be a programmers interface and is subject to change at any time. Any code which relies upon its behavior may therefore break with future versions of the software. Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:supp...@delsci.com _ From: pymol-users-boun...@lists.sourceforge.net [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of NeO Sent: Sunday, June 22, 2008 7:46 AM To: supp...@delsci.com; pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] Question about PyMOL development Hi Warren, I've read 'Executive.c' under '/trunk/pymol/layer3', it seems that you've pre-defined all the cases that button actions and popup menu changes in function ' ExecutiveClick ', I can understand only part of it. Now, I'm wondering that if I want to implement my thought ( - left-click the C-alpha atom in the structure, there will be a PopUp window coming out with self-defined information in the Viewer window), I have to modify the source code in C-layer and compile the whole source? Am I right? Or, is there any trick to do this in Python-layer? Fengyuan On Sun, Jun 22, 2008 at 1:59 PM, NeO wrote: Dear Warren, How are you? I'm writing a wizard, in which I want to implement the function that when I left-click the C-alpha atom, there will be a PopUp window coming out with my defined information in the Viewer window. I can do it using 'tkMessageBox.showinfo', but I want to make it beautiful. I know that when you left-double click or right-click the protein structure, the popup menu show up. I read the source code of 'menu.py', I'm not sure in the function, the parameter 'self_cmd', what's it for? where the menu functions are called? If I figure it out, I think I can code it in my wizard. Hope you can help me :) Best Wishes Fengyuan
Re: [PyMOL] Question about PyMOL development
Fengyuan, Although we cannot answer specific questions about an unsupported interface, your question about "self_cmd" is relevant to the overall project since we are intending to support multiple PyMOL instances within a single Python interpreter via: from pymol2 import PyMOL instance1 = PyMOL() instance2 = PyMOL() Thus, the old way of messaging the PyMOL API: from pymol import cmd will not work correctly if there two or more active instances. Instead, each instance has its own "cmd" module and programming interface: instance1.cmd instance2.cmd For example: instance1.cmd.load("pdb1.pdb") instance2.cmd.load("pdb2.pdb") As for "self_cmd", all Python-based code called from the C layer must therefore be given a handle pointing at the instance from which it was called so that it can do useful work. This is the role of the self_cmd argument, and you'll see similar constructs in both the Python-based wizards and the Tcl/Tk GUIs. Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:supp...@delsci.com _ From: DeLano Scientific [mailto:del...@delsci.info] Sent: Monday, June 23, 2008 9:31 AM To: 'NeO'; 'supp...@delsci.com'; 'pymol-users@lists.sourceforge.net' Subject: RE: [PyMOL] Question about PyMOL development Fengyuan, Unfortunately, the PyMOL's internal gui pop-up menu system was not designed as nor intended to be a programmers interface and is subject to change at any time. Any code which relies upon its behavior may therefore break with future versions of the software. Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:supp...@delsci.com _ From: pymol-users-boun...@lists.sourceforge.net [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of NeO Sent: Sunday, June 22, 2008 7:46 AM To: supp...@delsci.com; pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] Question about PyMOL development Hi Warren, I've read 'Executive.c' under '/trunk/pymol/layer3', it seems that you've pre-defined all the cases that button actions and popup menu changes in function ' ExecutiveClick ', I can understand only part of it. Now, I'm wondering that if I want to implement my thought ( - left-click the C-alpha atom in the structure, there will be a PopUp window coming out with self-defined information in the Viewer window), I have to modify the source code in C-layer and compile the whole source? Am I right? Or, is there any trick to do this in Python-layer? Fengyuan On Sun, Jun 22, 2008 at 1:59 PM, NeO wrote: Dear Warren, How are you? I'm writing a wizard, in which I want to implement the function that when I left-click the C-alpha atom, there will be a PopUp window coming out with my defined information in the Viewer window. I can do it using 'tkMessageBox.showinfo', but I want to make it beautiful. I know that when you left-double click or right-click the protein structure, the popup menu show up. I read the source code of 'menu.py', I'm not sure in the function, the parameter 'self_cmd', what's it for? where the menu functions are called? If I figure it out, I think I can code it in my wizard. Hope you can help me :) Best Wishes Fengyuan
[PyMOL] NMR Chemical shift perturbation data to surface representation
Ankit, This has been detailed on the PyMOLWiki. All you need is (1) a structure and (2) a text file with one number for each residue. To make it more accurate, you can do one number per atom, but then the script(s) will need to be changed a little. So, check out http://www.pymolwiki.org/index.php/Color#Reassigning_B-Factors_and_Coloring and the section following it, called "Expanding to Surface" and you should be set. Let me know if this isn't clear enough. -- Jason > Hi > > I want my chemical shift perturbation data to be mapped to the stucture. I > am trying different things such as trying to get it to b-factor like > position but haven't been successful. Is there any way I can get the data > to be shown in pdb with various colors representing low/high perturbation > in chemical shifts? > > Ankit -- Jason Vertrees, PhD Dartmouth: j...@cs.dartmouth.edu (new) UTMB: javer...@utmb.edu (old) http://www.best.utmb.edu/ http://www.pymolwiki.org/
[PyMOL] question on making movie between two scenes with different point of view
Hello everybody, I'm trying to make a movie for chaning the point of view on a structure. I let PyMol read in matrix then define it as a scene. After the movie was set up, I can watch the movie playing well on the PyMol window. However, if I try to save the PNG sequence, I get few discontinuous picutures and a lot of identical pictures. Can anybody please give me some suggestions? Thanks in advance! Please see the following script that I wrote for making the movie. script for make movie # read in point of view for two scene @pml/view-ts3ab.pml scene int3b , store @pml/view-ts4.pml scene int3b2 , store # set up a movie mset 1 x100 mdo 1: scene int3b mdo 50: scene int3b2 mplay # save the PNG sequences set ray_trace_frames = 1 set cache_frame = 0 mpng png/int3b === All the best! Junjun