Plotting using POVray

POVray is a program for creating graphics output (in our case of atomic structures) for publications.

You can export graphics output from our GUI, the JSmol viewer in this webpage or directly from Jmol. It doesn't actually require to have povray installed in the system to export in this format (unless you have checked the box that says "Run POV-Ray directly" in Jmol) .

POV-ray is run directly from the terminal, type 'povray' to see if it's installed or 'which povray' to see if it finds it, if your computer does not have povray installed see me about it (we're talking linux here of course).

When you export into povray format, it saves two files with the same name: one with the .pov extension, and one with the .pov.ini extension, both are actually text files. We normally have to change some settings in the .pov.ini file to change the output, and NEVER change anything in the .pov file.

Here's a sample of the content of a .pov.ini file (the file is called out1.pov.ini) :
; Created by: Jmol 13.0.15 2012-04-28 18:49
; Creation date: 2014-12-10, 13:52
; File created: /home/triad/folded1/out1.pov (1364404 bytes)
; Jmol state: (embedded in input file)

We need to modify and add some lines to make it more presentable:

  • You can change the Output_File_Name to your liking (usually just modify the .pov.png extension to .png).
  • You can change the Width and Height values if your export window was too small (try using a minimum of 1000 for good resolution results).
  • Change Display=true to false so it does not show a graphics output upon creation (you can view the file one the process is done).
  • Change Pause_When_Done=true to false since we are not generating a graphic upon creation we don't to pause the program (we get the prompt back once it creates the file).
  • Add the line Output_Alpha=true to reomove the black background and make it transparent (this is known as "Alpha transparency" in the computer graphics world).

Once you make the changes run POV-ray with the command povray out1.pov.ini which will produce a out1.pov.png file.