Tutorial 2. Visualize molecular structures

Learning objectives

  • Learn to visualize molecular structures for molecular simulation.
  • Topics:
    1. Common software for molecular structure visualization.
    2. Visualize a static molecule structure.
    3. Visualize a trajectory (a moving molecule).

Prerequisites

  1. Install the free molecule visualizers Avogadro, VMD

Visualize a static structure

In Tutorial 0, we generated the initial structure for geometry optimization for water molecule in xyz format (the file is here). How do we visualize the molecule?

For beginners of molecular simulation, we highly recommend using Avogadro for visualizing static structures because of the simple interface and intuitive manipulation of the molecules. Specifically, you are encouraged to explore the following features of Avogadro:

  • Measure bond lengths, angles, and dihedrals (for molecules with more atoms)

  • Build molecules from scratch as if you are drawing in Paint Brush.

  • Insert molecule fragments as starting point to build a new molecule

  • Drag the molecule to change its structure (bond lengths, angles, dihedrals)

Exercise:

  • Substitute elements (change H2O to SH2)
  • Drag the water molecule to have both bonds at 1.0 Angstrom
  • Generate the xyz file for a toluene molecule

Visualize a moving structure

In Tutorial 1, we have a gif figure showing a water doing scissor vibration. How do we make a cool figure like that?

Alt text that describes the graphic

In Tutorial 1, you have already generated the water structures with different H-O-H angles, then the figure with the vibrating water molecule can be generated from VMD

First get the water xyz files ready. No worries if you have not done Tutorial 1. You can download the xyz files here. Unzip the file.

Now in your terminal, type

vmd *.xyz

Then you will see the screen with a line that does not look like water at all. startVMD

The red straight line with white ends is actually the water molecule viewed from 180 degrees. We can change the representation to make it look nicer.

First in the small control window (shown below), select the graphics menu and representations.

startVMD

Click and you will see a new window like below:

startVMD

Change the drawing method from line to CPK, then the structure will look like the following:

startVMD

Now it looks like a molecule. Click the play button on the control window to play the movie and watch the molecule move!

startVMD

Exercise: Can you save the movie into a gif graph or a movie file? Search the VMD manual for the answer.

Written on July 23, 2020