Next: Scripting in VMD
Up: VMD Tutorial
Previous: Working with a Single
Time evolving coordinates of a system are called trajectories. They are most commonly obtained in simulations of molecular systems, but can also be generated by other means and for different purposes. Upon loading a trajectory into VMD, one can see a movie of how the system evolves with time and analyze various features throughout the trajectory. This section will introduce the basics of working with trajectory data in VMD. You will also learn how to analyze trajectory data in Section 6.
Trajectories and Movie Making
Trajectory files are normally binary files that contain several sets of coordinates for the system. Each set of coordinates corresponds to one frame in time. An example of a trajectory file is a DCD file. Trajectory files do not contain information of the system contained in the protein structure files (PSF). Therefore we first need to load the structure file, and then add the trajectory data to this file.
- Start a new VMD session. In the VMD Main window, select File
New Molecule.... The Molecule File Browser window should appear on your screen.
- Use the Browse... button to find the file ubiquitin.psf in vmd-tutorial-files in the tutorial directory. When you select the file, you will be back in the Molecule File Browser window. Press the Load button to load the molecule.
- In the Molecule File Browser window, make sure that ubiquitin.psf is selected in the Load files for: pull-down menu on the top, and click on the Browse button. Browse for pulling.dcd. Note the options available in the Molecule File Browser window: one can load trajectories starting and finishing at chosen frames, and adjust the stride between the loaded frames. Leave the default settings so that the whole trajectory is loaded.
- Click on the Load button in the Molecule File Browser window. You will be able to see the frames as they are loaded into the molecule. After the trajectory finishes loading, you will be looking at the last frame of your trajectory. To go to the beginning, use the animation tools at the lower part of the VMD Main menu (see Fig. 17). You can close the Molecule File Browser window.
Animation tools in the main menu of VMD. The tools allow one to go over frames of the trajectory (e.g., using the
slider) and to play a movie of the trajectory in various modes (Once, Loop, or Rock) and at an adjustable speed.
- For a convenient visualization of the protein, choose Graphics
Representations in the VMD Main menu. In the Selected Atoms field, type protein and hit Enter on your keyboard; in the Drawing Method, select NewCartoon; in the Coloring Method, select Structure.
The trajectory you just loaded is a simulation of an AFM (Atomic Force Microscopy) experiment pulling on a single ubiquitin molecule, performed using the Steered Molecular Dynamics (SMD) method (Isralewitz et al., Curr. Opin. Struct. Biol., 11:224, 2001). We are looking at the behavior of the protein as it unfolds while being pulled from one end, with the other end being constrained to its original position. Each frame step corresponds to 10ps. Ubiquitin has many functions in the cell, and it is currently believed that some of these functions depend on the protein's elastic properties. Such elastic properties are usually due to hydrogen bonding between residues in
strands of the protein molecules.
You can now play the movie of the loaded trajectory back and forth, using the animation tools in Fig. 17.
Main Menu Animation Tools
- By dragging the slider one navigates through the trajectory. The buttons to the left and to the right from the slider panel allow one to jump to the end of the trajectory or go back to the beginning.
- For example, create another representation for water in the Graphical Representations window: click on the Create Rep button; in the Selected Atoms field, type water and hit enter; in Drawing Method, choose Lines; in the Coloring Method, select Name. This shows the water droplet present in the simulation to mimic the natural environment for the protein. Using the slider, observe the behavior of the water around the protein. The shape of the water droplet changes throughout the simulation, because water molecules follow the protein as it unfolds, due to interactions with the protein surface.
- When playing animations, you can choose between three looping styles: Once, Loop and Rock. You can also jump to a frame in the trajectory by entering the frame number in the window on the left of the slider panel.
We will now learn some basic visualization tricks that are useful for working with trajectories.
- For clarity, turn off the water representation by double-clicking on it in the Graphical Representations window. As you might have noticed, when we play the animation, the protein movements are not very smooth due to thermal fluctuations (as the simulation is performed under the conditions that mimic a thermal bath).
We will learn now how to display many frames of the same trajectory at once.
- VMD can smooth the animation by averaging some number of frames. In the Graphical Representations window, select your protein representation and click the Trajectory tab. At the bottom, you see Trajectory Smoothing Window Size set to zero. As your animation is playing, increase this setting. Notice that
the motion gets smoother and smoother as the setting goes up.
- In the Graphical Representations window, highlight your protein representation by clicking on it and press the Create Rep button. This creates an identical representation, but note that smoothing is set to zero. Hide the old protein representation.
- Highlight the new protein representation and click the Trajectory tab. Above the smoothing control, notice the Draw Multiple Frames control. It is set to now by default, which is simply the current frame. Enter 0:10:99, which selects every tenth frame from the range 0 to 99.
- Go back to the Draw style tab, and change the Coloring Method to Timestep. This will draw the beginning of the trajectory in red, the middle in white, and the end in blue.
- We can also use smoothing to make the large-scale motion of the protein more apparent. Go back to the Trajectory tab, set the smoothing window to 20. The result should be similar to Fig. 18.
Image of every tenth frame showed at once, smoothed with a 20-frame window.
Now we will see how to make VMD update the selection each frame.
- Hide the current representation showing all frames, and display only the water representation by double-clicking on it. Change the text in the Selected Atoms from water to water and within 3 of protein and hit enter. This will show all water atoms within 3Å of the protein.
- Play the trajectory. Although the displayed water atoms may be near the protein for a little while, they soon wander off, and are still shown despite no longer meeting the selection criteria. The Update Selection Every Frame option in the Trajectory tab of the Graphical Representations window remedies this. If the option box is checked, the selection is updated every frame. See Fig. 19.
- Quit VMD.
Water within 3 Å of the protein, shown for a selection that is not updated and for the one that is updated each
frame. The snapshots shown are (from left to right) for frames 0, 17, and 99.
The Basics of Move Making in VMD
We will now learn how to make a basic movie.
- Start a new VMD session. Repeat steps 1-5 in Section 2.1 to load the ubiquitin trajectory into VMD and display the protein in a secondary structure representation.
- To make movies, we will use the VMD Movie Maker plugin. In the VMD Main window, go to menu item Extensions
Movie Maker. The VMD Movie Generator window will appear (Fig. 20).
- First, let us look at some of the options for making a movie. Click on the Movie Settings menu in the VMD Movie Generator window. You can see that in addition to a trajectory movie, Movie Maker can also make a movie by rotating the view point of a single frame. In the Renderer menu, one can choose the type of renderer for making the movie. We will use the default option, Snapshot. One can also choose the output file format for the movie in menu item Format.
- We will first make a movie of just one frame of the trajectory. For that purpose, select Rock and Roll option in the Movie Settings menu in the VMD Movie Generator window. Set the working directory to any convenient directory of your choice, give your movie a name, and click Make Movie.
- Once rendering is finished, open and view the movie with your favorite application. This movie setting is good for showing one side of your system primarily.
- Now we will make a movie of the trajectory. In the VMD Movie Generator window, select Movie Settings
Trajectory, give this one a different name, and click Make Movie. Note that the length of the movie is automatically set 24 frames per second. For a trajectory, duration of the movie can be decreased, but cannot be increased.
The VMD Movie Generator window.
- Try out different options in the VMD Movie Generator window. Once you are done, quit VMD.
Next: Scripting in VMD
Up: VMD Tutorial
Previous: Working with a Single