Difference between revisions of "Gromacs/C3/Visualization-With-VMD/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 475: Line 475:
 
'''Assignment'''
 
'''Assignment'''
 
|  | * Create a new representation for '''npt.gro''' molecule
 
|  | * Create a new representation for '''npt.gro''' molecule
* In '''Selected atoms''' enter, '''''water and within 2 of protein'''''
+
* In '''Selected atoms''' enter, '''''water and within 2A of protein'''''
* This displays water molecules present only within 2A of protein
+
* This displays water molecules present only within 2 angstroms of protein
  
 
|-
 
|-

Revision as of 10:49, 3 June 2022

Visual Cue Narration
Slide Number 1

Title Slide

Welcome to the tutorial Visualization With VMD of Gromacs generated files.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Open a Gromacs generated trajectory file
  • Play and view the frames in the trajectory
  • Color and display structures from selected frames
Slide Number 3

Learning Objectives

  • Create a movie from the trajectory
  • Align structures from two different states of the protein
Slide Number 4

System and Software Requirement

To record this tutorial, I am using
  • Ubuntu Linux v20.04 OS
  • VMD 1.9.3
  • VLC media player 3.0.8
Slide Number 5

Pre-requisites

https://spoken-tutorial.org

To follow this tutorial,
  • Learner must be familiar with basics of VMD.
  • For pre-requisite tutorials, please visit this site.
Slide Number 6

Code Files

  • Files used in this tutorial are provided in the code files link.
  • Please download and extract the files.
  • Make a copy and then use them while practising.
Copy the provided folder with input files to the Desktop directory. Copy the provided folder containing the input files to the working directory.

VMD can open the trr, gro and pdb files present here.

Show input files in the file manager. The npt.trr is a trajectory file, which is readable by VMD.

This file was generated in the pressure equilibration step.

It contains the many conformational states of the protein during the simulation.

Let’s open the npt.gro file in VMD.
Showm opening a terminal, changing to working directory and Linux users, can open a terminal and change to the working directory.

Windows users must first open VMD.

Type VMD npt.gro at the terminal prompt.

Press Enter.

The gro file is the final output of the npt step from Gromacs.
The molecule npt.gro gets loaded. This is the starting structure file for the MD simulation of the protein.
Click on Graphics, Representations. Let’s change the display mode and show only the protein for clarity.
In the Selected atoms form, type protein and press Enter. In the Selected Atoms form enter protein.

Now water molecules get hidden.

For Drawing method, choose Ribbons. For Drawing method, choose Ribbons.
In the VMD terminal enter the command pbc box. I will also display the box with the pbc space box command.
Show VMD graphics window. Let’s ascertain the protein is not split into parts in the box.

It may happen so and due to the periodic boundary condition.

If such a situation is observed, user must rerun the equilibration step.
Click on File, New Molecule. Let’s next load the trajectory file.


Click on File, New Molecule.

In the Load Files for pulldown, choose the npt.gro molecule. In the Load Files for pulldown, choose npt.gro.

Let's load the the trajectory file npt.trr.

Click on Browse, choose npt.trr.

Click on Ok and then on Load.

Click on Browse, choose npt.trr.

Click on Ok and then on Load.

Close the Load window. Let’s close the Load window.

The trajectory file is loaded to a structure by VMD.

Show loading of all the states.

Show number of frames in the Main window.

VMD loads all the conformational states of the protein from the trajectory file.

These are called the different frames.

The number of frames or states, in the trajectory is also displayed here.

Click on the play button. Next, click on the play button, seen on the lower right end of the main window.
Show the playing of the trajectory. Notice, all the states in the trajectory being played.
Play the trajectory. The duration of the equilibration step is short.
Slide the speed slider to slow it down. We can also adjust the speed at which the states are played.
Click on pause and step buttons. We can pause and step through the states of the trajectory as seen here.
Click on Graphics, Representations. Now, let’s view the chloride ions, which are present in the system .

For this, first click on Graphics, Representations.

Click on Create New rep. Then, click on Create New rep.
In the Selected atoms form, type name CL and press Enter. In the Selected Atoms form enter name CL.
For Drawing method, choose beads.

Close the Representations window.

For Drawing methods, choose beads.

Close the Representations window.

Notice the 8 chloride ions.

Play the trajectory again. Now, play the trajectory file again.
Notice that, the chloride ions, being smaller, moves faster than the protein.

This movement is due to diffusion.

Show the ion exiting the box and being added back. Occasionally, an ion exits the box and it gets added back to the box.

This is due to the periodic boundary condition which was set up in the mdp file.

Let’s make a movie of all the frames in the trajectory.
Click on Extensions, Visualization and choose Movie Maker. For this click on Extensions, Visualization and choose Movie Maker.
The VMD Movie Generator window opens. The VMD Movie Generator window opens.
Click on Set working directory.

In the dialog box, change to Videos folder.

I will first Set the working directory. Click on it.

In the dialog box, change to the Videos path to save the videos.

You may choose this directory as you desire.

Click on Movie settings and choose Trajectory. Click on Movie settings and choose Trajectory.
Click on Format and choose MPEG-2 (ffmpeg). Click on Format and choose MPEG-2 (ffmpeg) to choose the video format.
Click on Renderer and hover over Snapshot. For Renderer I will retain Snapshot.

This captures each frame as seen in the graphics window.

In Name of movie field, type firstmovie. For Name of movie, I will enter firstmovie.
Hover over trajectory step and duration. Notice, the trajectory step is 1 and movie duration is 4 seconds now.

I will retain the defaults.

Click on Make Movie. Click on Make Movie and notice the progress.
Close the VMD Movie Generator window. After the process is completed, close the VMD Movie Generator window.
Open file manager and go to the Videos folder. Open the file manager and go to the Videos folder where the movie was created.
Open the firstmovie.mpg file. Open the firstmovie.mpg.

I will use VLC media player for it.

Play the firstvideo.mpg video. Pause the tutorial video and play the movie that you just created.
Close VLC and go back to VMD. I will close VLC and let’s go back to VMD.
Open the graphical representations window. Next, let’s display color and select frames for display from the trajectory.

Go to the graphical representations window.

Show Selected atoms form with npt.gro molecule selected. Make sure that the npt.gro molecule is selected as seen.
In the Coloring methods pulldown, select Trajectory and chooseTimestep. In the Coloring method pulldown, select Trajectory and choose

Timestep.

Cursor on Drawing method.

Click on the play button in VMD main window.

You may change the Drawing method if desired.

Now, play the trajectory.

Show color change in the graphics window. Notice the starting frame is red by default and ending frame is in blue color.
Click on play again to stop. I will stop to play the frames.
Go to Representations, and select the Trajectory tab. Go to Representations, and select the Trajectory tab.
Cursor on Draw multiple frames. By default, Draw multiple frames is set to now, which is the current frame.
Type, 0:20:102 in the Draw multiple frames form. To show every 20 frames, type 0 colon 20 colon 102.

My trajectory range is 0 to 102 and hence the limits are specified.

Show the 5 displayed frames. Now, notice the 5 frames that are displayed in the graphical window.
Next, let’s choose specific user selected frames for display.
In the Draw multiple frames form, Type, 1 and 49 and 100 and press Enter. Say I want to display, 1st, 49th and 100 th frame only.

Type, 1 and 49 and 100 and press Enter as seen here.

Show the displayed frames in graphical window. This will show the three specified frames.
Let’s compare the npt.gro structure with the starting structure of first.gro.

We will read both molecules and align them for comparison.

In the Draw multiple frames form, Type, now and press Enter. First I will reset the display to the present frame.

Then alignment process will be clearly visible.

Close the Window. Close the representations Windows.
Click on File, New Molecule.

Click on Browse, choose first.gro.

Click on Ok and then on Load.

Let’s read in first.gro.


First.gro has hydrogens added to it.

It’s precursor is, 1aki.pdb.

Both molecules have the same number of atoms in the protein.


Click on Graphics, Representations. Click on Graphics, Representations.
Choose the protein representation. Choose the protein representation.
For Drawing method, choose Lines. For Drawing method, choose Lines.

Let’s show all the atoms and bonds of the protein from npt.gro file also.


Rotate the graphics window to show both the molecules. Then, the loaded structures may not be discernible separately.

If so, rotate them in the graphics window to view them.

Cursor on the graphics windows. Now the molecules are not aligned properly, to view any conformational differences.

Hence, we will align the two molecules or overlay them .

Click on Extensions and Tk console. For this first click on Extensions and Tk console.

A VMD TKconsole window opens.

Type, set sel0 [atomselect 0 protein] and press Enter. Type the command as seen and press Enter.

This selects all atoms in the protein from the first structure.

Type, set sel1 [atomselect 1 protein] and press Enter. Now select all the atoms from the second structure using the command as seen.
Type, set A [measure fit $sel0 $sel1] and press Enter. This command fits the positions of the atoms in the two protein molecules.


The fit command works, only when the number of atoms are the same.

Type, $sel0 move $A and press Enter. The move command, realigns the position of the molecule in the graphics window.

The coordinates of the first molecule is aligned with that of the second.

Cursor in VMD graphics window. The change in positions and conformational change if any is clearly seen.
Slide Number 7

Summary

Now let’s summarize. In this tutorial, we,
  • Loaded a trajectory file
  • Played and viewed frames from the trajectory
  • Created a movie using the frames in the trajectory
Slide Number 8

Summary

  • Changed color and viewed selected frames
  • Aligned the starting and equilibrated structures of the protein
Slide Number 9

Assignment

For assignment activity, please do the following.

Answer the following question.* Can 1AKI.pdb be aligned with npt.gro, with the measure fit command?

  • Explain the reasoning and demonstrate it
Slide Number 10

Assignment

* Create a new representation for npt.gro molecule
  • In Selected atoms enter, water and within 2A of protein
  • This displays water molecules present only within 2 angstroms of protein
Slide Number 11

Assignment

* Play the trajectory and notice the movement of water molecules
Slide Number 12

Spoken Tutorial Project

This video summarises the Spoken Tutorial Project.

Please download and watch it.

Slide Number 13

Spoken Tutorial workshops

We conduct workshops using spoken tutorials and give certificates.

Please write to us.

Slide Number 14

Forum for questions

Post your timed queries in this forum.
Slide Number 15

Acknowledgment

Spoken Tutorial Project is funded by MoE, Government of India.
This is Rani from IIT, Bombay. Thank you for joining.

Contributors and Content Editors

Ranipv076, Snehalathak