Difference between revisions of "Gromacs/C3/Energy-Minimization/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| border=1 | | '''Visual Cue''' | | '''Narration''' |- | | '''Slide Number 1''' '''Title Slide ''' | | Welcome to the tutorial '''Energy Minimization'''. |- | | '''S...")
 
Line 272: Line 272:
 
Else delete the files from this aborted process.
 
Else delete the files from this aborted process.
  
If aborting the process, use the provided files for further analysis.
 
  
 
|-
 
|-

Revision as of 12:26, 21 January 2022

Visual Cue Narration
Slide Number 1

Title Slide

Welcome to the tutorial Energy Minimization.
Slide Number 2

Learning Objectives

In this tutorial, we will learn about,
  • Unfavorable interactions in the Gromacs generated file
  • Commands to set up energy minimization
  • mdrun and verbose option
  • About edr file
Slide Number 3

Learning Objectives

* Parameters for energy minimization
  • The Energy command
  • Create a file containing potentials in xvg format
  • Plot and check the output file with Grace
Slide Number 4

System and Software Requirement

To record this tutorial, I am using
  • Ubuntu Linux v20.04 OS
  • Gromacs v2021.2
  • Firefox web browser v92
  • Gedit v3.36
  • VMD 1.9.3
  • Grace v5.1.25
  • QtGrace v0.2.6 fork for Windows
Slide Number 5

Pre-requisites

https://spoken-tutorial.org

To follow this tutorial,
  • Learner must be familiar with basics of Gromacs and 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 input files to the firstmd directory. Several files are provided with this tutorial.

Copy the provided mdp file to the working directory.

Ubuntu 20.04 LTS app (Windows) or terminal (Linux). Open a terminal.

Windows users may open the Ubuntu 20.04 app.

Type, cd Documents/firstmd and press Enter. Change path to the firstmd directory, where the files are saved.
Type, vmd ions-added.gro . Let’s open the .gro file with the ions added, in vmd.
VMD opens. Windows users must first open VMD.

Then open the gro file in VMD.

Point to the VMD Main window.

Click on Graphics, Representations.

We cannot see the ions clearly, among the large number of water molecules.

Hence, let’s change the display.

In the VMD Main window click on Graphics, Representations.

Point to the window. Graphical Representations window opens.
Point to the Coloring Method.


Select Name in Coloring Method.

Select Name in Coloring Method.


Type protein for Selected Atoms.


Press Enter and show protein in the graphics window.

Type protein for Selected Atoms and press Enter.

Now, only the protein is visible.

Click on Create rep and select the newly created display. Then click on Create Rep to create a new display.

Select the new display.

For selected atoms type name CL and press Enter. For selected atoms enter name space CL.
For Drawing method, choose beads. For Drawing method, choose beads.

Notice the 8 chloride ions added randomly in the box.

Type, pbc box in the vmd terminal prompt. Let’s also display the box with the pbc box command in the vmd terminal.

Now the box is also displayed.

Show VMD graphical window. Adding several molecules and ions may create unfavourable atomic interactions.
Hence the input structure file of the system needs to be energy minimized.

This is a precursor procedure, before starting the MD simulation.

Close VMD. Let’s close VMD.
Show files in file manager for firstmd directory.

em.mdp in a text editor.

Open the provided em.mdp file in a text editor and look at the parameters.
Cursor on method integrator and nssteps. Notice that, energy minimization uses steepest descent method.

One ps time duration is selected since minimization is for a short timescale.

Cursor over nstxout and nstlist. The neighbor list is updated every 20 steps.

Every 10 steps the coordinates are written to a file.

Cursor over pbc. Pbc shows that, the periodic boundary condition is on.

Beginner may visualize pbc as follows.

If a molecule or atom diffuses out of the box, it will be added back to the box.

Learner may pause the video and explore the parameters further.
Close the mdp file and go to the terminal. Detailed information can be accessed from Gromacs documentation.

Close the mdp file and go to the terminal to start energy minimization.

Type, gmx energy -f em.edr -o energy.xvg and press Enter. Enter the grompp command as seen here.


em.mdp provides the parameters for the energy minimization.

Cursor on ions-added.gro. Here, Input file here is the output gro file from the genion command.
cursor on em.tpr. The tpr file is the output file from this step.
Cursor on the interactions message. The number of interactions the program will consider is shown here.
Cursor on the molecule and atom details. The protein atoms, number of solvent molecules and ions are also listed.
Press Ctrl+L and press Enter. I will clear the screen for clarity.
Type ls and press Enter. Enter ls on the terminal to list the files.

Notice the output files created.

Type,

gmx mdrun -v -deffnm em and press Enter.

Next, enter the command as seen to perform the actual energy minimization.

The deffnm flag tells gromacs to use the em prefix for the generated files.

Show the output on the terminal. Hyphen v flag means the output is verbose.

Gromacs will display the output details in real time on the terminal.

Cursor on the terminal. Without this flag, user will not see the steps or the details displayed.

This process will take some time to complete, depending on your computer.

Notice the step number, energy and size parameters for each iteration.

Energy minimization will stop when it reaches below 500 KJ/mol.

Show screenshot of em.mdp file contents. It is set in the mdp file.
Learner may study the mdp file to know more about the parameters.
Press Ctrl+C. If there is time constraint right now, you may abort the process.

For this press the Control and C keys together.

Show the files em.edr, em.trr, em.log. You may also pause the tutorial and allow the process to complete.

Else delete the files from this aborted process.


Show the file em.gro which is to be copied. If you have completed the process, do not delete the files.

Copy the files provided for analysis to continue further.

An additional gro files will be created at the completion of the process.

Go to file manager. These files are provided for you as samples with this tutorial.

Please copy them to the working directory.

They have extensions, edr, log and trr.

show the four files. They have extensions, edr, log, trr and tpr.
Cursor on trr and edr files. The trr are trajectory files.

edr file contains details such as energies, temperature and so on.

Type, gmx energy -f em.edr -o potential.xvg and press Enter. Using the energy command, let’s extract data from the em.edr file.

The hyphen o flag is the output filename.

Show the selection for parameters.

Type 11.

The prompt asks user to select the parameters which are desired.


I will type 11 to choose potential for selecting the energy of the system.

This selects the energy of the system.

Press Enter twice. This number may be different for you.

Press Enter to exit.

Show potential.xvg file in the file manager. Potential.xvg file gets created.

This file can be opened by the Grace program.

Type, xmgrace potential.xvg and press Enter.

Point to the plot window.

I have already installed Grace on the computer.

Linux users can enter the command, xmgrace space potential.xvg in the terminal.

Grace window opens with the plot.

Cursor on the graph. Notice the higher potential at the starting point.

The energy decays smoothly and we completed about 1400 steps.

You may choose to learn the use of these software for ease of data analysis.

Close Grace window. Let’s close grace window.
Show Qtgrace directory and open Qtgrace.

Show opening the potential.xvg file.

Windows users may install Qtgrace fork for analysis.

Open Qtgrace, drag and drop the xvg file icon on the graph window to open it.

Resize graph to fit into recording window. Importing the xvg file through the menu options may show errors.

If you are plotting your own data, these values will be different.

Every MD run or minimization will have it’s own unique trajectory.

Users may also use gnuplot for data analysis if desired.
Show spoken tutorial website series for Grace and Gnuplot. Spoken tutorial website has tutorials on both software for your convenience.

gnuplot is also suited to create 3D or surface plots.

Spreadsheet editors such as Libreoffice Calc, Excel can also be utilized.
Screenshot of the energy command options to export to xvg file. You may pause this video, to create and plot more parameter outputs.
Slide Number 7

Summary

Now let’s summarize. In this tutorial, we learned about,
  • Unfavorable interactions in the in the Gromacs generated file
  • Commands to set up energy minimization
  • About mdrun and verbose option
  • About .edr file
Slide Number 8

Summary

  • Parameters for energy minimization
  • About energy command
  • Created a file containing potentials in xvg format
  • Plotted the xvg file with Grace
Slide Number 9

Assignment

For assignment activity, please do the following.
  • Extract few more parameters from the .edr file with the energy command.
  • Create and view the graphs with a plotting program of your choice.
Slide Number 10

Assignment

  • Open the em.gro file in VMD or another program of your choice.
  • Ascertain the protein molecule is seen as one unit in the box.


Slide Number 11

Spoken Tutorial Project

This video summarises the Spoken Tutorial Project.

Please download and watch it.

Slide Number 12

Spoken Tutorial workshops

We conduct workshops using spoken tutorials and give certificates.

Please write to us.

Slide Number 13

Forum for questions

Post your timed queries in this forum.
Slide Number 14

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