Tutorial 2. Visualize molecular structures
Learning objectives
- Learn to visualize molecular structures for molecular simulation.
- Topics:
- Common software for molecular structure visualization.
- Visualize a static molecule structure.
- Visualize a trajectory (a moving molecule).
Prerequisites
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?
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
Then you will see the screen with a line that does not look like water at all.
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.
Click and you will see a new window like below:
Change the drawing method from line to CPK, then the structure will look like the following:
Now it looks like a molecule. Click the play button on the control window to play the movie and watch the molecule move!
Exercise: Can you save the movie into a gif graph or a movie file? Search the VMD manual for the answer.