CSB Home | Search | Table of Contents | General Information

POV-Ray Output for VMD

One can use the Render dialog box to output a POV-Ray command file from VMD. However, the default command in the dialog box will not reflect the actual size of your graphics screen or some of the settings. So the file may require some editing.

Below is a worked example:

To create a similar image to that above, from the VMD Main Menu:

Click Mol

Then from the Mol menu:

Click Load from files
Select pdb only
Click Select pdb
Highlight your PDB file and click Ready
Click the Load Molecule button.

Then from the Graphics menu:

In the Pull Down Coloring Method menu, choose Structure
Then in the pull down Drawing Method menu, choose Cartoon
Then click the Create New button
Then in the Selected Atoms box, type:

resname CYS and not name N C O

Then click the Apply Changes button

Then from the Display menu:

In the Axes pull down menu, choose Off
In the Projection pull down menu, choose Orthographic

Size the graphics window as you want it.

With the cursor in the graphics window, click right button and choose Mouse Mode | Scale, and scale the image properly.

From the Main Menu:

Choose Render

From the Render menu

Choose POV in the Output Formats box.
Delete the Render Command in the magenta box.
Press Go

VMD will now output a file, plot.pov.

You should open that file in your favorite editor. At the top there will be a line suggesting the proper povray command such as:

// try povray +H500 +W637 -Iplot.pov -Oplot.pov.tga +P +X +A +FT

This line includes the height and width (in pixels) of your VMD graphics screen.

If you want a Perspective graphic just type:

setup povray
povray +H500 +W637 -Iplot.pov -Oplot.pov.tga

But if you want an orthographic image, make the following changes in the plot.pov file:

In the first camera section, change:

look_at <0.000000, 0.000000, 2.000000>

to

look_at <0.000000, 0.000000, 0.000000>

and add the following:

orthographic

as the last line in the camera section after the sky line.

Then just type:

setup povray
povray +H500 +W637 -Iplot.pov -Oplot.pov.tga

You can view the plot.pov.tga image using GIMP.


CSB Home | Search | Table of Contents | General Information
Center for Structural Biology (www.csb.yale.edu), Yale University (www.yale.edu)
Contact: webadmin(at)mail^csb^yale^edu
Last Modified: Thursday, 12-Aug-1999 14:08:35 EDT