Difference between revisions of "Gromacs/C3/Solvate-and-Grompp-Commands/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 162: Line 162:
 
|| Type, '''gmx solvate -cp box-added.gro -cs tip4p.gro -p topol.top -o solvated.gro'''
 
|| Type, '''gmx solvate -cp box-added.gro -cs tip4p.gro -p topol.top -o solvated.gro'''
 
|| Enter the '''solvate''' command as seen here.  
 
|| Enter the '''solvate''' command as seen here.  
 +
 +
This command adds the water molecules in the box with '''lysozyme.
  
 
|-
 
|-
 
|| Highlight '''-cp '''.
 
|| Highlight '''-cp '''.
|| Here '''-cp''' flag denotes the position and aligned input file of the protein structure.
+
|| Here '''-cp''' flag denotes the input file.
  
 
|-
 
|-

Revision as of 13:15, 10 November 2021

Visual Cue Narration
Slide Number 1

Title Slide

Welcome to the tutorial on Solvate and grompp commands.
Slide Number 2

Learning Objectives

In this tutorial, we will learn about,
  • Solvent input files with coordinates
  • Add solvent molecules to the system with solvate command
  • Open the solvated.gro file in VMD
Slide Number 3

Learning Objectives

  • About mdp file
  • Generate tpr file with the grompp command and
  • Add ions to the system with the genion command
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
Slide Number 5

Pre-requisites https://spoken-tutorial.org

To follow this tutorial,
  • Learner must be familiar with basic computer skills.
  • 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.


Open File manager.


Show files in the firstmd working directory.

Open File manager .

Copy the necessary input files to the working directory.

Cursor on the page. Let’s learn about adding solvent molecules in the box with the protein.

The input file for adding solvent is the output file from the editconf command.

Open File manager and go to the extracted Gromacs tarball. In the File manager, go to the extracted directory of Gromacs tarball.
Go to the Share directory, then to the top directory. Go to the share directory in the downloaded Gromacs files.

Navigate to the top directory.

Search for .gro files in the directory.

Show the files.

Search for file with .gro extension and notice few files in it.

Water and methanol solvent types are available in the downloaded files.

Cursor on the water solvent files. Notice files with water solvation in different types.
Cursor on methanol solvent file. Methanol file is provided as an example organic solvent system as seen here.
Users may desire to add water for aqueous medium or organic solvents.
Open the tip4p.gro file in a text editor. Let’s open the tip4p.gro file in a text editor.
Cursor on the header and file. Header line shows the number of water molecules, box size and temperature.

This file has 216 water molecules.

Solvent file can be customized to user preference.

Close tip4p.gro file. Let’s close the text editor.
Press Ctrl, Alt and T keys together. Open a terminal by pressing Ctrl, Alt and T keys together.

Windows users can open the Ubuntu app.

Type, cd Documents/firstmd and press Enter. I will change to the firstmd directory, where all the files are saved.
Type, vmd box-added.gro and press Enter. Linux users may also do the following.

Enter vmd space box-added.gro, to open the input file in VMD.

Cursor on VMD. Windows users must open VMD through windows.

Locate the path of the box-added.gro file in your computer and open it.

Show the graphics interface. VMD opens with the aligned, centered molecule in the graphics interface.
Type pbc box in the terminal. Enter the command pbc space box in the VMD command prompt.

This will show the box in the graphical interface.

Let’s command add the water molecules inside the box around lysozyme.
Close VMD. Let’s close VMD.
Type, gmx solvate -cp box-added.gro -cs tip4p.gro -p topol.top -o solvated.gro Enter the solvate command as seen here.

This command adds the water molecules in the box with lysozyme.

Highlight -cp . Here -cp flag denotes the input file.
Continue to type, -cs tip4p.gro . The -cs flag is added before the solvent coordinate file.

Then Gromacs identifies it as the solvent file that is to be added to the box.

Type -p topol.top -o solvated.gro . We will also update the topology file.

Then specify the output filename with hyphen o flag.

Press Enter and then scroll up. Let’s execute the command, and scroll up to see the messages.
Cursor on the output details. The program gives a detailed output.

Notice that many water molecules are added in the file.

Amino acid residues of the protein come from the 1AKI.pdb file.

Highlight ‘PLEASE READ AND CITE THE FOLLOWING REFERENCE’. A reference paper is also seen with a message for users to read it.

Please read and understand it.

Press Ctrl+L. I will clear the screen.
Type, vmd solvated.gro and press Enter. Enter vmd space solvated.pdb, to open the newly created file in VMD.
Show the graphics interface. Notice the protein and water molecules in the graphics window of VMD.
Type pbc box in the terminal. Enter the command pbc space box in the VMD command prompt.

This will show the box in the graphical interface.

Cursor around the box. The water molecules are positioned inside the box, around the protein.

The shape and dimensions of this box was defined in the editconf command.

Cursor outside box. Outside the box is vacuum.

There are no solvent molecules present outside.

Motion of the protein inside this box is simulated for a duration in MD.
Close VMD. Hence, the input structure file of the system needs to be energy minimized.

Let’s close VMD.

Show solvated .gro in the File Manager. Open the newly created file solvated.gro file in a text editor.

Pause this video, scroll down the file, and notice the added water molecules.

Cursor on the file. The tip4p.gro file for solvent that we added had only 216 water molecules.

However, more are present in this file.

Cursor on the number of water molecules. When the box size increases, the number of water molecules will also increase.
Next, we will add ions to the system to neutralize the let charge.
Close the topology.top file. Let’s close the topology file.
Cursor on the File manager. Gromacs will replace few solvent molecules with ions of choice.
For this purpose, we will use an mdp file.
Open a web browser and go to https://manual.gromacs.org/archive/5.0.4/online/mdp.html . Open a web browser and go to this site.

Mdp stands for molecular dynamic parameters.

Cursor on the web page. Example mdp files are available on the Gromacs website.

Gromacs also uses a mdp file, to assemble the system configuration.

This file defines several parameters for the MD run.

Parameters such as time interval, number of steps or temperature are given.

Go to the terminal. Let’s go to the terminal.
Type,

gmx grompp -f ions.mdp -c solvated.gro -p topol.top -o input1.tpr -maxwarn 1

and press Enter.

Enter the grompp command as seen here to generate the input file.

Grompp is the preprocessor command to generate the structure file.

Highlight grompp. We will use the mdp file provided with this tutorial with fewer parameters.
Highlight input and topology file. Input file is the solvated molecule in the box.

The .top is the topology file.

Highlight -maxwarn 1. There could be a charge difference between the system and topology file.

To ignore it in this step, we will add the maxwarn flag and set it to 1.

Users must be careful when using this flag.

Highlight input1.tpr. The tpr file is the output.

This is not a text file like earlier outputs.

To know what is in the file, you need to convert it to a user readable format.
Press Ctrl+L. I will clear the screen for clarity.
Type,

gmx dump -s input1.tpr and press Enter.

Let’s use the dump command as seen here to make it readable.
Scroll up the file. Scroll up and notice the file and the many details added to the structure file.
Show the dump file. Let’s add ions to the system to balance charges in the system.
Open the file manager. Let’s open the file manager.

First find the charge on the system from the topology file.

Highlight the file topol.top.1# We will use the topology file generated by the pdb2gmx command.
Gromacs backs up the topology files with the hash suffix as seen here.
Highlight the line in the file, which gives the command which created it. I will open this file in a text editor.

This file was created by the pdb2gmx command.

Scroll through the file. Scroll down to find the total charge which is represented by the qtot line.
Go to the last line of qtot. Go to the last line of qtot, which gives the total charge in the system.
Highlight 8. Here, it is 8.

Hence, to create a neutral system, we need to add 8 negative charges.

Close the topology file. Let’s close the topology file.
Press Ctrl+L. I will clear the screen.
Type, gmx genion -s input1.tpr -o input2-ions.gro -p topol.top -pname NA -nname CL -nn 8 . The genion command adds ions to the system.

pname is for positive ion and NA stand for sodium ion. nname is for negative ion, which is chloride ions here.

The nn flag tells Gromacs how many chloride ions are to be added to the system.

Press the Enter key. The nn 8 flag can be replaced by neutral flag to create a neutral system.
Highlight the options for replacing. The user is prompted to choose which atoms are to be replaced from the box.
Type 13 for solvent. We don’t want to replace the atoms of the protein with ions.

Choose 13 to replace solvent molecules for ions.

Scroll up and show the changes. Notice that, the number of water molecules in the box have decreased.
Slide Number 7

Summary

Now let’s summarize. In this tutorial, we learned about,


  • Solvent input files with coordinates
  • Added solvent molecules with solvate command
  • About mdp file
Slide Number 8

Summary

* Opened the solvated gro file in VMD
  • Generated a tpr file with the grompp command
  • About dump command
  • Added ions with genion command
Slide Number 9

Assignment

For assignment activity, please do the following.
  • Use a PDB ID of another protein of your choice.
  • Practice the commands learnt in this tutorial.


Slide Number 10

Assignment

From the Gromacs manual ,* Read on the following file extensions.
    • top, gro , mdp , tpr , itr
  • Create a table to keep track of which file gets generated in which step.
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