I've updated the wiki with a script doing just that: resicolor.py. The script is available here: http://pymolwiki.org/index.php/Resicolor You can edit the coloring scheme to your liking from within the script. I haven't checked what the exact scheme was in sPDBv, it may be the same.
Garteiser Philippe > Message: 3 > Date: Mon, 9 Apr 2007 13:37:11 +0200 > From: "Mirek Cygler" <mi...@bri.nrc.ca> > Subject: [PyMOL] Color by residue type > To: <pymol-users@lists.sourceforge.net> > Message-ID: <000201c77a9b$6a22bed0$8657f...@pcmsg23> > Content-Type: text/plain; charset="US-ASCII" > > Hi, > I would like to color residues by their type using (more or less) > standard colors (e.g. like in sPDBv). Could not find a command in > Pymol that > would do that. Did I miss it? Is there a way to avoid doing this one residue > type at the time? > Thanks for you help, > > Mirek > > > > > ------------------------------ > ****************************** Garteiser Philippe OMRF, Cardiovascular Biology dpt. Doctoral candidate, OU Bioengineering Advisors: Dr. Tim Mather, Dr M. Uli Nollert 12600 N Macarthur Crown Pointe apt. #1423 Oklahoma City, OK 73142 home: (405) 603 7091 work: (405) 271 4924 "It does not pay to leave a live dragon out of your calculations" - Tolkien ----- Original Message ----- From: pymol-users-requ...@lists.sourceforge.net Date: Tuesday, April 10, 2007 8:54 am Subject: PyMOL-users Digest, Vol 11, Issue 5 To: pymol-users@lists.sourceforge.net > Send PyMOL-users mailing list submissions to > pymol-users@lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, visit > > or, via email, send a message with subject or body 'help' to > pymol-users-requ...@lists.sourceforge.net > > You can reach the person managing the list at > pymol-users-ow...@lists.sourceforge.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of PyMOL-users digest..." > > > Today's Topics: > > 1. How to make different colour on backbone cartoon and > sidechain stick (adi di) > 2. Re: How to make different colour on backbone cartoon and > sidechain stick (Tsjerk Wassenaar) > 3. Color by residue type (Mirek Cygler) > 4. Re: Single transparent sphere (Michael Lerner) > 5. Re: between views (Andreas Forster) > 6. transparency cross-fading (Andreas Forster) > 7. Re: transparency cross-fading (Harry M. Greenblatt) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 7 Apr 2007 11:50:56 -0700 (PDT) > From: adi di <adipho...@yahoo.com> > Subject: [PyMOL] How to make different colour on backbone cartoon and > sidechain stick > To: pymol-users@lists.sourceforge.net > Message-ID: <432973.33789...@web53402.mail.re2.yahoo.com> > Content-Type: text/plain; charset=iso-8859-1 > > Dear all, > > I have several questions, please help me for this > > 1. I would like to show side chain one colour by stick > and its backbone by cartoon another colour. So I tried > to create to same molecules. One with normal backbone > (no1) and the other with backbone and a sidechain > stick (no2). And it seem fine the no1 can cover no2 > backbone so I have no problem with the unwanted > backbone colour on the sidechain that I want but when > I tried to ray and png them the colour was change it > show only no2 molecule so I have backbone as the > sidechain. Does anyone have suggestion on how can I > let the no1 shows on no2? Or if you have easier > suggestion please don't hesitate to tell. > > 2. How to show hydrogen bond and other interactions? > > 3. What different between normal 'aline' and > 'optAlign'? > > 4. How to fix the molecule (lock or make it not move). > > > 5. Does pymol have any build in procheck or > Ramachandran plot? > > 6. Do you know any website for pymol beginner > tutorial? Esp. how to create movie. I tried to read > from pymol manual but I'm quite confuse. > > Thank you cery much. > Adiphol > > > > ____________________________________________________________________________________ > Food fight? Enjoy some healthy debate > in the Yahoo! Answers Food & Drink Q&A. > > > > > ------------------------------ > > Message: 2 > Date: Sat, 7 Apr 2007 21:43:38 +0200 > From: "Tsjerk Wassenaar" <tsje...@gmail.com> > Subject: Re: [PyMOL] How to make different colour on backbone cartoon > and sidechain stick > To: "adi di" <adipho...@yahoo.com> > Cc: pymol-users@lists.sourceforge.net > Message-ID: > <8ff898150704071243k4e8f40ebk468dc38d7480a...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Adiphol, > > It would have been better to state "several questions" as subjcts, but > ok... > > > 1. I would like to show side chain one colour by stick > > and its backbone by cartoon another colour. So I tried > > to create to same molecules. One with normal backbone > > (no1) and the other with backbone and a sidechain > > stick (no2). And it seem fine the no1 can cover no2 > > backbone so I have no problem with the unwanted > > backbone colour on the sidechain that I want but when > > I tried to ray and png them the colour was change it > > show only no2 molecule so I have backbone as the > > sidechain. Does anyone have suggestion on how can I > > let the no1 shows on no2? Or if you have easier > > suggestion please don't hesitate to tell. > > > > What about "set cartoon_color" to control the color of the cartoon to > show for the backbone? This is completely separated from the atom > colors. Alternatively, you may colour everything the way you want for > the atoms and then color the c-alpha atoms otherwise (which control > the cartoon color). The difference with the first approach is that in > the latter the bond with the side chain will be partially coloured as > the backbone. > > > 2. How to show hydrogen bond and other interactions? > > You can create distance objects to show these things... have a look at > the command "dist". Particularly useful with the selection statement > "x within r of y". > > > > 3. What different between normal 'aline' and > > 'optAlign'? > > > > optAlign uses a different algorithm and I believe that it can do > several molecules at the same time (though I'm not completely sure on > this one; Isn't this explained on the Wiki?). > > > 4. How to fix the molecule (lock or make it not move). > > You can "disable" an object (which also hides it from view) or you can > "mask" a selection, which makes atoms "unpickable". There's also the > command "protect". Have a look at the help files for these. > > > 5. Does pymol have any build in procheck or > > Ramachandran plot? > > No. > > > > > 6. Do you know any website for pymol beginner > > tutorial? Esp. how to create movie. I tried to read > > from pymol manual but I'm quite confuse. > > No. There must be a "movie.py" around somewhere, written by Kristian > Rother and edited by myself, which contains handy movie-making > functions. > > > > > Thank you cery much. > > Adiphol > > > > You're cery welcome :p > > Tsjerk > > > > > > > ____________________________________________________________________________________ > > Food fight? Enjoy some healthy debate > > in the Yahoo! Answers Food & Drink Q&A. > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > opinions on IT & business topics through brief surveys-and earn cash > > > > _______________________________________________ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > > > > > > -- > Tsjerk A. Wassenaar, Ph.D. > Junior UD (post-doc) > Biomolecular NMR, Bijvoet Center > Utrecht University > Padualaan 8 > 3584 CH Utrecht > The Netherlands > P: +31-30-2539931 > F: +31-30-2537623 > > > > ------------------------------ > > Message: 3 > Date: Mon, 9 Apr 2007 13:37:11 +0200 > From: "Mirek Cygler" <mi...@bri.nrc.ca> > Subject: [PyMOL] Color by residue type > To: <pymol-users@lists.sourceforge.net> > Message-ID: <000201c77a9b$6a22bed0$8657f...@pcmsg23> > Content-Type: text/plain; charset="US-ASCII" > > Hi, > I would like to color residues by their type using (more or less) > standard colors (e.g. like in sPDBv). Could not find a command in > Pymol that > would do that. Did I miss it? Is there a way to avoid doing this one residue > type at the time? > Thanks for you help, > > Mirek > > > > > ------------------------------ > > Message: 4 > Date: Mon, 9 Apr 2007 09:26:19 -0400 > From: "Michael Lerner" <mgler...@gmail.com> > Subject: Re: [PyMOL] Single transparent sphere > To: "DeLano Scientific" <del...@delsci.info> > Cc: jjv5 <j...@jjv5.net>, PyMOL-users@lists.sourceforge.net > Message-ID: > <e4c539ed0704090626t2d9d6e57ie475b040529be...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > The pseudoatom business looks very cool. I'll have to try it out. > > In the meantime, I wanted to mention that you certainly can make > transparent CGOs. Here's some code that I wrote to visualize dock > output in our lab. The files it reads in have lines that look like > > <junk> x y z r <junk> temp <junk> > > Where x,y,z are the coordinates, r is the radius and temp is some > index that we use to look up colors. If you save this in a file, > you'll have a new command, sds, that will read in such a file and show > the output as spheres. Transparency defaults to 0.4, but you can > change it. > > -michael > > #!/usr/bin/env python > > """ > Use PyMOL to show DOCK spheres > """ > from pymol import cmd,cgo > > colors = {'1':[.66,.66,.66],#'grey' > '2':[1,0,0],#'red', > '3':[.55,0,0],#'dark red', > '4':[0.65,1,1],#'blue2', > '5':[.25,.88,.82],#'blue7', > '6':[0.004,.55,.55],#'blue8', > '7':[0.004,.55,.55],#'blue8', > '8':[0,1,1],#'blue13', > '9':[0,1,1],#'blue13', > '11':[0.60,.98,.60],#'pale green', > '12':[0.56,.93,.56],#'light green', > '13':[.20,.80,.20],#'lime green', > '14':[.23,.70,.44],#'green8', > '15':[.23,.70,.44],#'sea green', > '16':[.18,.55,.34],#'sea green', > '17':[.18,.55,.34],#'green', > '18':[0,.5,0],#'forest green', > '19':[0,.5,0],#'forest green', > '20':[.13,.55,.13],#'dark green', > '21':[.13,.55,.13],#'dark green', > } > > def graph_temp_via_cgo(name,data,transparency=0): > """ > Data should be [x,y,z,r,temp] where > x,y,z are the coordinates, > r is the radius > temp is something like temperature that we > use to look up colors. > """ > obj = [] > for x,y,z,r,temp in data: > #transparency = (y/200.0) > obj.extend( [ cgo.ALPHA,1-transparency]) > obj.extend( [ cgo.COLOR] + colors[temp]) > obj.extend( [ cgo.SPHERE,x,y,z,r] ) > cmd.load_cgo(obj,name,1) > return name > > def dock_file_to_data(filename): > data = [] > f = file(filename) > for line in f: > if not line.strip(): > continue > if line.startswith('#'): > continue > junk1,x,y,z,r,junk2,temp,junk3 = line.split() > x,y,z,r = map(float,(x,y,z,r)) > data.append([x,y,z,r,temp]) > f.close() > return data > def show_dock_spheres(filename,transparency=0.40): > """ > Reads in a DOCK sphere file and graphs the > results as dock spheres. You can pass the > transparency as an additional argument. > """ > transparency = float(transparency) > data = dock_file_to_data(filename) > graph_temp_via_cgo('dock_spheres',data,transparency) > > cmd.extend('sds',show_dock_spheres) > > > On 4/6/07, DeLano Scientific <del...@delsci.info> wrote: > > > > > > Pre 1.0: > > > > fragment methane, mysph > > remove hydro and mysph > > alter mysph, vdw=2.0 > > as spheres, mysph > > set sphere_transparency, 0.5, mysph > > > > Post 1.0: > > > > pseudoatom mysph, vdw=2.0 > > > > as spheres, mysph > > > > set sphere_transparency, 0.5, mysph > > > > Cheers, > > Warren > > > > > > > > ________________________________ > > From: pymol-users-boun...@lists.sourceforge.net > > [ On > > Behalf Of jjv5 > > Sent: Friday, April 06, 2007 4:55 AM > > To: PyMOL-users@lists.sourceforge.net > > Subject: [PyMOL] Single transparent sphere > > > > > > > > Hi, > > > > Does anyone know of a good way to create a single transparent sphere > of > > varying size? We've tried using a single atom and changing the vdw, > but we > > are unable to produce a surface of a single atom. CGO objects work but > > cannot be made transparent. What we'd really like is a transparent CGO > > sphere. Any ideas? > > > > Thanks, > > Jim > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > opinions on IT & business topics through brief surveys-and earn cash > > > > _______________________________________________ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > > > > > > > > -- > Biophysics Graduate Student > Carlson Lab, University of Michigan > > > > > ------------------------------ > > Message: 5 > Date: Tue, 10 Apr 2007 12:49:51 +0200 > From: "Andreas Forster" <docandr...@gmail.com> > Subject: Re: [PyMOL] between views > To: "Dirk Kostrewa" <dirk.kostr...@psi.ch>, a.perra...@nki.nl > Cc: PYMOLBB <pymol-users@lists.sourceforge.net> > Message-ID: > <77fa84b50704100349h761e8ef7te35da7280ea33...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Tassos, Dirk, > > sorry for the very late reply, but I've just now finished going > through a > few hundred list mails that had accumulated. > > For converting scenes to movies, Joel Bard's slerpy is really shweet. > Check > it out at > > What I do is the following - after putting slerpy's two scripts into the > current directory and opening pymol: > - load session.pse > - import slerpy > - F1 (or wherever your first scene resides) > - sscene (makes slerpy understand scene 1) > - F2 > - sscene (makes slerpy understand scene 2) > - swrite arbitraryName (saves parameters for interpolation) > - srecord (does the interpolation) > - set ray_trace_frames, 1 (makes sure your images are ray-traced > before they > are saved) > - mpng anotherName (writes out 50 images covering the interpolation from > scene 1 to scene 2) > - go have a coffee > - make movie from images in ImageReady > > I was amazed. This worked exactly as I had expected. The most taxing > part > was walking to the coffee machine. Thanks, Joel! > > > Andreas > > > On 3/30/07, Dirk Kostrewa <dirk.kostr...@psi.ch> wrote: > > > > Hi Tassos, > > > > I found the following article, but haven't tried it on my own: > > > > > > > > I hope this helps! > > > > Best regards, > > > > Dirk. > > > > Anastassis Perrakis wrote: > > > Dear pymolers - > > > > > > One can store 'Scenes' and then switch between them; the algorithm > > > that goes from one scene to each other is very nice. > > > > > > Can one ask Pymol to write frames going from one scene to another > to > > > png files to make a movie ? > > > > > > or does anyone have python code that can render the transitions > > > between views/scenes in a different way ? > > > > > > best - tassos > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 6 > Date: Tue, 10 Apr 2007 13:12:04 +0200 > From: "Andreas Forster" <docandr...@gmail.com> > Subject: [PyMOL] transparency cross-fading > To: pymol-users@lists.sourceforge.net > Message-ID: > <77fa84b50704100412k1ea1d0ceg8a66be0ef6bfd...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hey all, > > I've run into the following problem while making some movies with MacPyMOL > 0.99rc6. > > I have a protein in surface representation that I start with > transparency = > 0 and a cavity (voidoo-created map) as surface with transparency = 1. > In > other words, the protein surface is visible, the cavity is not. When > I > cross-fade the transparencies, like so: > > for i in range (1, 41): > cmd.set ("transparency", i*0.025, "protein") > cmd.set ("transparency", 1-(0.016*i), "cavity") > cmd.ray > cmd.png ("fadeOut_%02d" %i) > > the protein disappears and the cavity appears gracefully. However, those > parts of the cavity hidden behind a wall of protein don't fade in as the > protein surface disappears. They only appear when the protein surface > transparency has reached 1, and there is a sudden jerk between the > second-to-last and the last image created by above script as the cavity > becomes fully visible. I remember that this issue has come up before > but > don't remember if there is a solution. Could someone enlighten me please? > > Thanks. > > > Andreas > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 7 > Date: Tue, 10 Apr 2007 16:52:50 +0300 > From: "Harry M. Greenblatt" <harry.greenbl...@weizmann.ac.il> > Subject: Re: [PyMOL] transparency cross-fading > To: pymol-users@lists.sourceforge.net > Message-ID: <f8584f2c-37ab-4f9c-8d98-b44080caf...@weizmann.ac.il> > Content-Type: text/plain; charset="us-ascii" > > BS"D > > Dear Andreas > > I ran into a similar problem more than two years ago when I wanted > > to fade one surface and bring in another one. *But*, I thought the > problem did not appear when you ray trace the image; are you implying > > the problem exists even in the ray traced image? Below is the query I > > sent, and Warren's answer to me: > > > I wanted to slowly fade in one surface while fading out > > another. In other words, make one progressively less > > transparent, while the other is made more transparent. It > > turns out, unfortunately, that during the transition, the two > > transparent surfaces affect each other adversely, and one > > essentially blocks the other, even though they should be > > transparent. This is shown on the second picture. The gray > > surface is 20% transparent, and the salmon surface is 80% > > transparent. The gray surface is fine by itself, but seems > > "covered" in certain regions when the (mostly transparent) > > salmon surface is present. In ray tracing, this seems not to > > be a problem (see first picture...). > > > > Harry, > > > > You've hit a limitation with PyMOL's OpenGL renderer: it can't > > currently do > > a global Z-sort of all transparent triangles in a scene...just > > within a > > single object. This will be addressed eventually, but not soon. > > > > Ray tracing with transparency_mode=1 is the only way to get proper > > intersections of transparent surfaces. > > > > Sorry! > > > > Warren > > > > On Apr 10, 2007, at 2:12 PM, Andreas Forster wrote: > > > Hey all, > > > > I've run into the following problem while making some movies with > > MacPyMOL 0.99rc6. > > > > I have a protein in surface representation that I start with > > transparency = 0 and a cavity (voidoo-created map) as surface with > > > transparency = 1. In other words, the protein surface is visible, > > > the cavity is not. When I cross-fade the transparencies, like so: > > > > for i in range (1, 41): > > cmd.set ("transparency", i*0.025, "protein") > > cmd.set ("transparency", 1-(0.016*i), "cavity") > > cmd.ray > > cmd.png ("fadeOut_%02d" %i) > > > > the protein disappears and the cavity appears gracefully. However, > > > those parts of the cavity hidden behind a wall of protein don't > > fade in as the protein surface disappears. They only appear when > > the protein surface transparency has reached 1, and there is a > > sudden jerk between the second-to-last and the last image created > > by above script as the cavity becomes fully visible. I remember > > that this issue has come up before but don't remember if there is a > > > solution. Could someone enlighten me please? > > > > Thanks. > > > > > > Andreas > > > ---------------------------------------------------------------------- > > > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys-and earn cash > > > > > page=join.php&p=sourceforge&CID=DEVDEV________________________________ > > > _______________ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > > > ------------------------------------------------------------------------ > > - > Harry M. Greenblatt > Staff Scientist > Dept of Structural Biology harry.greenbl...@weizmann.ac.il > Weizmann Institute of Science Phone: 972-8-934-3625 > Rehovot, 76100 Facsimile: 972-8-934-4159 > Israel > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > > > ------------------------------ > > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > > > > End of PyMOL-users Digest, Vol 11, Issue 5 > ******************************************