This is a very basic, beginner's guide to pymol, however at the end we'll have a very nice picture that required very little work! The thumbnails at the right are links to larger images that illustrate the steps. Click on the thumbnail for a larger image. |
|
For this tutorial I'll assume that you have pymol running on your system and a pdb file to play with. I'm using pdb id 1BDT, you can always get that from the pdb. The images were made on a Mac but the steps are pretty much the same for any platform. The image at the right will be our final product. |
|
First things first. We need to launch pymol and get a pdb file in to work with. Very simply go to the file menu, choose open, select your pdb file and it opens. Your presented with a line diagram of the file, showing all atoms present including ligands and any waters that may be present. Files from the pdb will have secondary structure assigned but if this is a file you made a quick and dirty way to assign secondary structure is to simply go to the action menu (A) by the pdb file and choose 'assign secondary structure' as illustrated in the image at right. SS structure assignment is necessary for proper display of cartoons. |
|
Now that we have our file in we want a easy to view representation of our molecule. For this we'll use the cartoon. Go the the show (S) menu next to your object created in the step above. Select cartoon, and up will pop a nice cartoon representation of our molecule. If you don't dee nice cartoon SS structure elements like in the picture then either you have no SS structure or something has gone wrong with the SS structure assignment. Note that the lines and waters are still present, and the cartoon for the DNA just a ribbon. We'll take care of that in a minute. |
|
OK so now to spruce up things like we want before the final image. First we want a better look for the DNA. So we need to do a little command line selection. The easy ay to do this is to create a separate selection containing only the DNA. Go to the pymol command line and type: (I've highlighted the command line in the full size image to the right) select DNA, chain E or chain F That selects all of the atoms in chain E and F of the pdb file and puts them in a selection titled DNA. In our case these are our DNA chains. Next we want a stick reprentation for the DNA, so we go to the show (S) menu by the DNA selection we just created an choose: sticks. |
|
Now that we hace our nice protein cartoon and DNA sticks we need to get rid or the stuff that we don't want. We want to hide all of the lines so choose the hide (H) menu next to the ALL object and select lines. Do the same for the waters by selecting nonbonded under the same menu. Finally go down to our DNA selection and hide the cartoon by selection H, cartoon. |
|
The next steps add some details that I think make for a nicer final image. First select the cartoon menu from the GUI dropdown and select 'fancy helices' this produces a nice ridge on the helices like molescript does and helps to define the edges a little better. Also I like to use the 'cartoon highlight color' option in that same menu as well. It gives the helices a little more depth. The highlight color can be adjusted to whatever the user desires using the command line: set cartoon_highlight_color='rgb value' |
|
Now turn on the orthroscopic view option, found under the display menu. This will produce a view closer to what the ray tracing engine will provide for our final figure. |
|
On to the ray tracing options. First set the shadows, I like a lighter shadow which prevents too many details of the structure from being occluded. Go to Display-Rendering-Shadows and select your shadow setting. While you're in the rendering menu make sure that antialias is checked to produce the sharpest possible image. Antialiasing takes up more mem/cpu time so it may be best to leave this off when setting up shots, espically if its a very complicated scene. |
|
I'm going to make the background white before I ray trace so I go to Display -> background color and select white. Again there is a command line way to do this that allows the use of any background color: bg_color white Some people prefer to turn off depth cue and fog with light backgrounds as well, those options can be found under the Display menu. Now just type: ray at the command line, wait a minute and there's your pretty ray traced image! |
|
I'm not really happy with the green DNA, I want something that stands out a little more. So I'll go to the color menu (C) next to our DNA selection we made earlier. I'll select color by element and then CHNOS. Now we have a nicely contrasting DNA molecule. so we just run ray again, to reay trace. Once you're happy with the image its time to export it. At the command line type: png /path/to/where/you/want/the/file/saved.png And pymol will export a png to that file. One word of warning is that it will overwrite files of the same name automatically. And a tip for *NIX/OS x users: type png ~/filename.png To dump the file straight into your home directory. |
|