[PyMOL] Simulating electron density
Hey everyone, I remember at some point there was a command you could issue to pymol to generate a simulated electron density map around a structure. I'm trying to do this for a cover figure. Does anyone remember what the command (and syntax) is and if you can set the resolution (I actually want to draw it very low, approx 7.5 Å). Thanks, Tony
[PyMOL] Secondary Structure assignments and Molscript compatability
Hello All, I am a long-time Molscript user and devotee and am trying to make the move to PyMol for various reasons. A lot of the structures I work with are at moderate-low resolution making automated secondary-structure prediction difficult and most of them don't contain SS flags in the original PDB file or they aren't very good. DSSP, dss, and util.ss all produce different solutions (as expected) and none of them are quite correct. Over the years I have manually edited my Molscript input files with the 'correct' assignments and would like to continue using them (especially ones I've used for structural interpolations where the assignments needed to change in a few of the intermediates). I was wondering if anyone has a way of importing secondary structure assignments from molscript input files (for example reading the .in file and then exporting the header info for a PDB file that can be pasted into the coordinate file)? It seems like it would be a relatively straight-forward kind of script but that's a little out of my expertise. Also, I'm happy that PyMol takes .r3d files from Molscript, but I was wondering if any effort is being made to make PyMol capable of reading Molscript .in files? I noticed on the website that there is some effort being made to get a RasMol interpreter. Around here nobody uses Rasmol, but many of us have learned to speak Molscript and also have large libraries of input files and it would be great if they could be ported. Does anyone have any experience doing that? Thanks, Tony
[PyMOL] Series of general questions
Dear PyMol users, I realize the following may be somewhat basic questions, but after fiddling with the program a while and trying out example scripts from the web, I cannot seem to get things to work properly. The last question is kind of advanced and would have cool effects if someone knows how to get it working (I'm also using MacPyMol 0.95). 1) I would like to show certain residues and have no problem getting the ones I want selected and displayed as sticks or whatever. The problem is color. When I change the color of the selection, it changes the color of the associated section of the ribbon. I would like to leave the ribbon, say green, and show the residues in yellow. Is there a way to uncouple the color assignment of the ribbon and the residue. For example, if I load a molecule, make the cartoon diagram, and color it green it's fine. If I then select, say, all the cysteine using: Select allcys, (resn cys) Show sticks, allcys Color yellow , allcys The sticks turn yellow, but so do the small sections of the ribbon. How do I keep the ribbon green? 2) When selecting specific sidechains, it is often preferable to choose only the sidechain atoms instead of the sidechain+backbone. In the good ol' molscript days you would say select and not c or n or o but if you do that in pymol it thinks you mean all carbon, nitrogen, and oxygen atoms instead of their id in the PDB file. I'm sure this is worked out but I don't see it in the example scripts I've found on line. 3) Is there a way to change the particular rendering of the beta-strands at a paritcular residue. If you use 'flat sheets,' which one often does, then the path of the sheet doesn't always intersect the the alpha-carbon of the residue and you wind up with 'floating' sidechains.' This is generally ok, but for some altering the path to the type of rendering where the strand passes through the CA would be fine and wouldn't look weird. Is there a way to set this kind of rendering for particular residues? 4) This is the hard but cool one. Is there a way to make a particular atom or object the light source for an image. You can imagine if you turned off all other lighting and put your omnidirectional light on your cooridnated metal atom it could look pretty cool (or just have a dim headlight seeting). Does anyone know how to arbitrarily set the lighting in this fashion? Thank you all so much. Tony
[PyMOL] Ball and stick
I've noticed that 'stick_ball' was an added feature to PyMol in a recent version, however I can't seem to get it to work. I can change the stick_ball_ratio, but MacPyMol 0.95 doesn't recognize stick_ball in any format. Does anyone know how to create ball-and-stick representations in this version? Thanks, Tony
Re: [PyMOL] Motion Blur
Waren's example for a torsion looks pretty cool. If you're trying to make it look like a molecule is translating in some direction, you can actually pull this off quite nicely in photoshop. Select the thing you want create the action shot for and copy it. Before deselecting it use the motion blur filter, or whatever blur you want to use, and blur it out. Then paste the original image back over the blur and maybe nudge it around a little to make it look right and you're done! Hope that helps some people, Tony On 5/5/04 10:36 AM, "Warren DeLano" wrote: >> is there any way of showing movement of a >> molecule in a static image, for example as speed lines or a >> blur between the two states? If this makes any sense please >> let me know if you have some ideas!Mike, > > Motion blur in PyMOL is possible, but the process is a bit tedious. You > need to create separate states for the "moving" portion of the molecule with > different transparency. Also, it doesn't look right from every vantage > point. > > Here is an example image with the accompanyning script: > > http://www.delsci.com/img/blur.png > > # get some object > > fragment phe, blur > > # create multiple states > > for a in range(2,21):\ > cmd.create("blur","blur",1,a) > > # rotate the bond in each state > > for a in range(1,21):\ > cmd.frame(a) \ > cmd.edit("blurcb","blurca") \ > cmd.torsion((a-1)/1.5) > > # show sticks only > > hide everything,blur > show sticks,blur > > # adjust stick transparency for each state > > for a in range(1,21):\ > cmd.set("stick_transparency",(20.0-a)/20,"blur",a) > > # show all states > > set all_states, on > > # adjust transparency settings > > set ray_transparency_shadows, off > set ray_transparency_specular, off > > # set a good view > > set_view (\ >0.962713897, -0.181692749, -0.200423554,\ > -0.189038053, -0.981805086, -0.017973814,\ > -0.193509772,0.055190988, -0.979543626,\ >0.00393, -0.00030, -22.716976166,\ > -0.364352912,0.062815413,0.104579724,\ > 12.716978073, 72.716979980,0.0 ) > > # now ray trace > > ray > > # END SCRIPT > > Cheers, > Warren > > -- > mailto:war...@delanoscientific.com > Warren L. DeLano, Ph.D. > Principal Scientist > DeLano Scientific LLC > Voice (650)-346-1154 > Fax (650)-593-4020 > > > > > > > --- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver > higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users >
[PyMOL] Creating cell surface
Hey Fellow PyMolers, I should be able to figure this out but I simply haven't after much fiddling and googling. I'm trying to create a cell surface for a cover figure and in Molscript I usually did this by making a PDF file with a single atom, rendering it in CPK, and then blowing its atom_radius way up to several thousand angstroms to create a slightly curved surface on which molecules could be positioned. I'm trying this in PyMol and can't figure out the command sequence. Basically, how do I alter the radius for a single atom, especially because I don't want all atoms I draw as a surface to have the same radius? Alternatively I've been trying to do this with the CGO utility using one of Gareth's scripts I found on the web: from pymol.cgo import * from pymol import cmd def cgo_sphere(x,y,z,r,name="cgo_sphere"): # Create a CGO object obj = [ SPHERE, float(x), float(y), float(z), float(r) ] # Load it into PyMOL cmd.load_cgo(obj,name) # Add to PyMOL API cmd.extend("cgo_sphere",cgo_sphere) But in adding these lines sequentially to the PyMol command line, or running it as a script, it fails at: def cgo_sphere(x,y,z,r,name="cgo_sphere"): and I get the following error message def cgo_sphere(x,y,z,r,name="cgo_sphere"): Traceback (most recent call last): File "/Users/delwarl/pymol/products/MacPyMOL.app/pymol/modules/pymol/parser.py", line 144, in parse exec(com2[nest]+"\n",pymol_names,pymol_names) File "", line 1 def cgo_sphere(x,y,z,r,name="cgo_sphere"): ^ SyntaxError: unexpected EOF while parsing Is there some other way the script is supposed to be used. . .I'm using MacPyMol 0.95. Thanks for any tips/help. Tony
Re: [PyMOL] Creating cell surface
Thanks to Warren's help I was able to create a nice CGO sphere that makes a convincing cell membrane. And for most of today I was even able to render molecules placed near the membrane, AND it even created shadows on the CGO surface cast by the molecules. However, after a couple of hours it seems to have stopped working. Initially it would think about it and then crashn. Now, whenever I hit 'ray' when the large cgo sphere is on-screen it automatically crashes PyMol. I'm doing this on our lab's dual G5 using MacPyMol. I went back to my laptop, which was rendering the sphere just fine last night, and now it automatically crashes when I try to render just the sphere. I installed a fresh version of PyMol on the G5 (by unpacking the archive again) and that didn't help either, nor did rebooting the machine. Any ideas? I'm on a tad bit of a deadline and would like to get this rendered soon, preferably with the shadows. I don't have the patched version of pov-ray at the moment and anyways the output from PyMol was looking really good before it acted all weird. On 5/10/04 1:12 PM, "Warren DeLano" was all like: > Tony, > > In order to enter multi-line Python code on the command line, you > need to use explicit end-of-line continuations. Otherwise, PyMOL won't know > where your Python code stops and PyMOL commands again begin. > > from pymol.cgo import * > from pymol import cmd > > set cgo_sphere_quality, 3 > > def cgo_sphere(x,y,z,r,name="cgo_sphere"): \ > # Create a CGO object \ > obj = [ \ >SPHERE, float(x), float(y), float(z), float(r) \ > ] \ > # Load it into PyMOL \ > cmd.load_cgo(obj,name) > > # Add to PyMOL command language > cmd.extend("cgo_sphere",cgo_sphere) > > # end Python, begin PYMOL commands > > cgo_sphere 0,0,0,500,test > > -- > > For example, I can paste the above directly into the PyMOL command line (on > win32), in order to get a sphere on the screen. > > A better alternative it to simply put all of that Python code into a ".py" > file and "run" it from within PyMOL. > > NOTE: PyMOL doesn't currently render large and small objects together very > efficiently, and there's precious little that you can do about it at the > present time. Increasing hash_max won't help, though decreasing it can give > a modest gain in performance. Sticking exclusively to CPK can also help. > > Cheers, > Warren > > -- > mailto:war...@delanoscientific.com > Warren L. DeLano, Ph.D. > Principal Scientist > DeLano Scientific LLC > Voice (650)-346-1154 > Fax (650)-593-4020 > > >> -Original Message- >> From: pymol-users-ad...@lists.sourceforge.net >> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of >> Tony Giannetti >> Sent: Monday, May 10, 2004 12:25 PM >> To: pymol-users@lists.sourceforge.net >> Subject: [PyMOL] Creating cell surface >> >> Hey Fellow PyMolers, >> I should be able to figure this out but I simply haven't >> after much fiddling and googling. I'm trying to create a >> cell surface for a cover figure and in Molscript I usually >> did this by making a PDF file with a single atom, rendering >> it in CPK, and then blowing its atom_radius way up to several >> thousand angstroms to create a slightly curved surface on >> which molecules could be positioned. >> >> I'm trying this in PyMol and can't figure out the command sequence. >> Basically, how do I alter the radius for a single atom, >> especially because I don't want all atoms I draw as a surface >> to have the same radius? >> >> Alternatively I've been trying to do this with the CGO >> utility using one of Gareth's scripts I found on the web: >> >> from pymol.cgo import * >> from pymol import cmd >> >> def cgo_sphere(x,y,z,r,name="cgo_sphere"): >> >> # Create a CGO object >> obj = [ >> SPHERE, float(x), float(y), float(z), float(r) >> ] >> >> # Load it into PyMOL >> cmd.load_cgo(obj,name) >> >> # Add to PyMOL API >> cmd.extend("cgo_sphere",cgo_sphere) >> >> >> But in adding these lines sequentially to the PyMol command >> line, or running it as a script, it fails at: >> >> def cgo_sphere(x,y,z,r,name="cgo_sphere"): >> >> and I get the following error message >> >> def cgo_sphere(x,y,z,r,name="cgo_sphere"): >> Traceback (most recent call last): >> File >> "/Users/delwarl/pymol/products/MacPyMOL.
[PyMOL] Moving Objects
Hey fellow PyMoler's, If you have multiple objects loaded and on screen at once, is it possible to rotate one without rotating the others? I've had success using rotate and translate commands with selections, and it works, but it can be slow with lots of objects. In Swiss-PDB viewer, you are allowed to lock layers and then continue working with the other ones with the mouse. This would also be similar to 'move-object-zone' in O where the dials are locked onto a single object. I was wondering if PyMol has a functionality like this and how it can be activated. I'm interested in this both for still frame images and for possible animations where one or two objects move relative to other ones. Thanks, Tony
[PyMOL] Rtools Question
Hello all, This may have already been answered but I don't see it in the archives. I've got rTools working under MacPyMol and the effects are great. I'm working with a scene that has many objects loaded at once and I want to have some of them move independently over each other. So far I can only get rTools to apply rotations/translations to the whole scene, but not to individual objects. I can probably work around this using the alpha channel and then pasting the rendered images back onto the original scene in photoshop, but I'm wondering if there's a command scheme that will allow object one to rotate and translate according to rTools commands without altering the other objects in the scene. Thanks much, Tony
Re: [PyMOL] Rtools Question
Hey Olve, Not a prob, and since this is a common problem I will post my answer to the list. Kelley Moreman actually did a lot of this legwork so I give props to him. You are correct, the rTools that you can download from the web does not work on MacPyMol directly. Kelley was able to obtain an earlier version of the script that does work. I've attached it and it's called movie.py. Very simply, you put it in the same directory as the MacPyMol executable file (in the Mac system this is simply where the MacPyMol icon is located; you don't even have to open the archive. Once PyMol is loaded, type 'run movie.py' and everything is loaded. You can then input commands like mvSinrot and mvMov and all those great commands. Enclosed are other files from Kelley including more detailed setup instructions and a description of how the animation commands work. It's pretty easy once you get started. In about 2 days I constructed the movie for my thesis defense that can currently be viewed at: www.its.caltech.edu/~tonyg/smaller_fpnhyp.mov Of course moving objects independently of scene rotations isn't trivial, though it apparently can be done (Kelley and Warren have tips on this). For this movie, anything that moves was rendered with the rest of the scene objects turned off and then spliced into background scenes using photoshop scripts. Hope this helps you, and other Mac users. Tony On 5/21/04 11:12 PM, "Olve Peersen" wrote: > Tony, > I was wondering if you could e-mail me or post the details of how > you got rTools to work with MacPymol as opposed to X11 pymol for the > Mac. I've fiddled with it a bit, but I cannot seem to get the movie > commands to work. > > Thanks, > > Olve Peersen > > > On May 15, 2004, at 11:25 PM, Tony Giannetti wrote: > >> Hello all, >> This may have already been answered but I don't see it in the >> archives. >> I've got rTools working under MacPyMol and the effects are great. I'm >> working with a scene that has many objects loaded at once and I want >> to have >> some of them move independently over each other. So far I can only get >> rTools to apply rotations/translations to the whole scene, but not to >> individual objects. I can probably work around this using the alpha >> channel >> and then pasting the rendered images back onto the original scene in >> photoshop, but I'm wondering if there's a command scheme that will >> allow >> object one to rotate and translate according to rTools commands without >> altering the other objects in the scene. Thanks much, >> Tony >> >> >> >> >> --- >> This SF.Net email is sponsored by: SourceForge.net Broadband >> Sign-up now for SourceForge Broadband and get the fastest >> 6.0/768 connection for only $19.95/mo for the first 3 months! >> http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >> ___ >> PyMOL-users mailing list >> PyMOL-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pymol-users >> > > --- > Olve Peersen > Assistant Professor > Dept. of Biochemistry & Molecular Biology > 1870 Campus Delivery > Colorado State University > Ft. Collins, CO 80523-1870 > --- > 970.491-0433Office > 970.491-0271Lab > 970.491-0494Fax > --- > > Instructions - Read #135488.rtf Description: Binary data movie.py Description: Binary data AnimationCommands.txt Description: Binary data
[PyMOL] Breaking down PDB files
Hey everyone, I know I should be past this, but I can't seem to figure out how to do this. I have a couple of crystal structures that contain multiple copies in the asymmetric unit, and I would like to superimpose each copy to see what the differences are. One way is to break the PDB file into one file for each chain, but I'm wondering if there's a better way to handle this in PyMol? One file (1CX8) has 8 copies and the other (1DE4) had three. I tried split_states but it didn't work. I also tried aligning say chain A onto chain B directly but that failed too (as expected). Is there a straightforward way to do this or do I begin splitting these 700 residues proteins up by hand. I wouldn't ask except it's a recurring problem with many of the structures we study so I'm wondering if a general solution or script exists or can be made to deal with this. Tony
[PyMOL] Quicktime movies from PyMol
Hey Everyone, I was just looking through website and noticed references to MacPyMol being able to export Quicktime movies directly. However I cannot find the settings/commands to make this happen. Does anyone know how to do this? I have methods for assembling the quicktime movies after rendering, but it would save a few steps to be able to do this directly. Thanks, Tony
[PyMOL] Never mind
Found it. . .never mind. . .it was in the export movie option in the file menu. . .I just wonder why I never noticed it before.