Visualization

Summary

ParaView and VisIt are two general purpose visualization tools, which support volume rendering and other advanced techniques. VTK is an open-source C++ library for 3D computer graphics, image processing and visualization, and has several interpreted interface layers including Tcl/Tk, Java, and Python. VMD is a very popular molecular visualization program.

Schrodinger

Install Schrodinger.

Jmol

Install Jmol

VMD

Installing VMD

  1. Go to the website
  2. Click on the VMD button and find your platform (preferably with Open GL). Click to begin the download.
  3. Follow the instructions to create a user account (used to determine usage and reported to the NSF or other funding agency supporting VMD development) and browse the README file (onscreen) while the program downloads.
  4. When download is complete, open a Finder window and move VMD into the Applications folder. To do this, drag the VMD icon (looks like a water molecule) over the ‘Applications’ menu on the left of the Finder window. The cursor should become a green plus sign.

Generating high-quality images

  • Make sure that in the Graphical Representations window, all your visualized components have high values for their resolution.
  • Open File Render Controls: from VMD Main window, File -> Render.
  • Changing the method from “Snapshot (VMD OpenGL window)” to basically anything else will dramatically improve the image quality. VMD User’s Guide recommends “Tachyon (internal, in-memory rendering)”. The default Snapshot renderer just captures what is on the VMD OpenGL Display area. It will even include other objects that are on top of the display window at the time when you perform the rendering.
  • To use renderers other than “Snapshot (VMD OpenGL Window)” or “Tachyon (internal, in-memory rendering)”, you need to perform two steps: first generate a scene description file from VMD, and second run the separate rendering program with your desired options to generate a raster graphics file. See Chapter 8.2 Higher Quality Rendering of VMD User’s Guide for more details on the different rendering programs and recommended options.
  • For example, to use Tachyon renderer with custom parameters, choose “Tachyon”, and in the Render Command text box enter: “/Applications/VMD 1.9.1.app/Contents/vmd/tachyon_MACOSXX86” -aasamples 8 -rescale_lights 0.4 -add_skylight 0.7 %s -format TARGA -o %s.tga. VMD will generate a scene file suitable as input for the Tachyon rendering program, with the name specified in the Filename text box, and then run the command given in the Render Command box to actually render the image. “%s” is the file name specified in the Filename box.
  • In addition, you can manually modify the scene file in order to change settings such as the resolution, anti aliasing threshold, and re-run the rendering program from the command line to generate another image file with the modifications you just made to scene descriptions.

Add/remove bonds

When reading in a simulation snapshot, VMD will try to determine the bonds between atoms. Sometimes it will draw bonds where they should not exist and at other times it can also miss certain bonds. Use the pickbond script from VMD Script Library to add/remove bonds.

  • Save the file to your disk.
  • Open VMD Main Window -> Extensions -> Tk Console.
  • Change to the directory where you save the tcl script and invoke the script:
cd target/directory
source pickbond.tcl # read in the script
pickbond add/del/stop # add bond, remove bond, stop pickbond action
  • Change the mouse mode to Pick by pressing P or from VMD Main Window -> Mouse -> Pick.
  • Click the two atoms between which you want to create and delete a bond.

Perform periodic boundary conditions at arbitrary positions

Sometimes you will want a particular molecule to be at the center of your system while your movie file has it always at the boundary of the simulation box. Suppose the simulation box is cubic with sides of length 32.0, and the molecule of interest is at (16.0, 32.0, 0.0), you can do the following:

set sel [atomselect top "all"] # select all atoms in your top molecule
$sel moveby {0 -16 16} # move all molecules
pbc set {32.0 32.0 32.0 90.0 90.0 90.0} # set the lattice parameters of the simulation box
pbc wrap # perform periodic boundary conditions
pbc join connected # re-connect molecules

Comments

Comments powered by Disqus