Difference between revisions of "Gromacs/C3/Solvate-and-Grompp-Commands/English"
Snehalathak (Talk | contribs) |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
* Solvent input files with coordinates | * Solvent input files with coordinates | ||
* Add solvent molecules to the system with '''solvate''' command | * Add solvent molecules to the system with '''solvate''' command | ||
− | * Open the '''solvated | + | * Open the '''solvated gro''' file in '''VMD''' |
|- | |- | ||
Line 34: | Line 34: | ||
|| To record this tutorial, I am using | || To record this tutorial, I am using | ||
− | * '''Ubuntu Linux''' | + | * '''Ubuntu Linux''' version 20.04 OS |
− | * '''Gromacs''' | + | * '''Gromacs''' 2021.2 |
− | * '''Firefox''' web browser | + | * '''Firefox''' web browser 92 |
− | * '''Gedit''' | + | * '''Gedit''' 3.36 |
* '''VMD''' 1.9.3 | * '''VMD''' 1.9.3 | ||
Line 64: | Line 64: | ||
Show files in the '''firstmd''' working directory. | Show files in the '''firstmd''' working directory. | ||
− | || Open '''File manager''' . | + | || Open the '''File manager''' . |
Copy the necessary input files to the working directory. | Copy the necessary input files to the working directory. | ||
Line 88: | Line 88: | ||
Show the files. | Show the files. | ||
− | || Search for file with ''' | + | || Search for file with '''gro''' extension and notice few files in it. |
Water and '''methanol''' solvent types are available in the downloaded files. | Water and '''methanol''' solvent types are available in the downloaded files. | ||
Line 94: | Line 94: | ||
|- | |- | ||
|| Cursor on the water solvent files. | || Cursor on the water solvent files. | ||
− | || Notice files with water solvation in different types. | + | || Notice files, with water solvation in different types. |
|- | |- | ||
Line 143: | Line 143: | ||
|- | |- | ||
|| Show the graphics interface. | || Show the graphics interface. | ||
− | || '''VMD''' opens | + | || '''VMD''' opens the aligned, centered molecule in the graphics interface. |
|- | |- | ||
Line 153: | Line 153: | ||
|- | |- | ||
|| | || | ||
− | || Let’s | + | || Let’s add the water molecules inside the box around '''lysozyme'''. |
|- | |- | ||
Line 167: | Line 167: | ||
|- | |- | ||
|| Highlight '''-cp '''. | || Highlight '''-cp '''. | ||
− | || Here '''-cp''' flag denotes the input file. | + | || Here '''-cp''' flag denotes the input file of the protein structure. |
|- | |- | ||
Line 179: | Line 179: | ||
|| We will also update the '''topology''' file. | || We will also update the '''topology''' file. | ||
− | + | Specify the output filename with hyphen '''o''' flag. | |
|- | |- | ||
|| Press '''Enter''' and then scroll up. | || Press '''Enter''' and then scroll up. | ||
− | || Let’s execute the command, and scroll up to see the messages. | + | || Let’s execute the command, and scroll up, to see the messages. |
|- | |- | ||
Line 195: | Line 195: | ||
|- | |- | ||
|| Highlight '''‘PLEASE READ AND CITE THE FOLLOWING REFERENCE’'''. | || Highlight '''‘PLEASE READ AND CITE THE FOLLOWING REFERENCE’'''. | ||
− | || | + | || Reference for the publication is also seen with a message for users to read it. |
Please read and understand it. | Please read and understand it. | ||
Line 205: | Line 205: | ||
|- | |- | ||
|| Type, '''vmd solvated.gro''' and press '''Enter'''. | || Type, '''vmd solvated.gro''' and press '''Enter'''. | ||
− | || Enter '''vmd''' space '''solvated. | + | || Enter '''vmd''' space '''solvated.gro''', to open the newly created file in '''VMD'''. |
|- | |- | ||
Line 241: | Line 241: | ||
|- | |- | ||
|| Show solvated '''.gro''' in the File Manager. | || Show solvated '''.gro''' in the File Manager. | ||
− | || Open the newly created | + | || Open the newly created '''solvated.gro''' file in a text editor. |
+ | |||
Pause this video, scroll down the file, and notice the added water molecules. | Pause this video, scroll down the file, and notice the added water molecules. | ||
Line 256: | Line 257: | ||
|- | |- | ||
|| | || | ||
− | || Next, we will add ions to the system to neutralize the | + | || Next, we will add ions to the system to neutralize the net charge. |
|- | |- | ||
Line 267: | Line 268: | ||
|- | |- | ||
|| | || | ||
− | || For this purpose, we will | + | || For this purpose, we will create a '''mdp''' file. |
|- | |- | ||
Line 281: | Line 282: | ||
'''Gromacs''' also uses a '''mdp''' file, to assemble the system configuration. | '''Gromacs''' also uses a '''mdp''' file, to assemble the system configuration. | ||
− | This file | + | This file contains parameters required to assemble the system for '''MD''' run. |
Parameters such as time interval, number of steps or temperature are given. | Parameters such as time interval, number of steps or temperature are given. | ||
+ | |||
+ | This file defines several parameters for the '''MD''' run. | ||
|- | |- | ||
Line 331: | Line 334: | ||
|| I will clear the screen for clarity. | || I will clear the screen for clarity. | ||
|- | |- | ||
− | || Type, | + | || Type, '''gmx dump -s input1.tpr''' and press '''Enter'''. |
− | + | ||
− | '''gmx dump -s input1.tpr''' and press '''Enter'''. | + | |
| " | Let’s use the '''dump''' command as seen here to make it readable. | | " | Let’s use the '''dump''' command as seen here to make it readable. | ||
|- | |- | ||
|| Scroll up the file. | || Scroll up the file. | ||
− | | " | Scroll up and notice | + | | " | Scroll up and notice the many details added to the structure file. |
|- | |- | ||
|| Show the '''dump''' file. | || Show the '''dump''' file. | ||
− | || Let’s add ions to the system to balance charges | + | || Let’s add ions to the system to balance charges. |
|- | |- | ||
|| Open the file manager. | || Open the file manager. | ||
− | || | + | || Open the file manager. |
− | + | Find the charge on the system from the topology file. | |
|- | |- | ||
Line 390: | Line 391: | ||
|| The '''genion''' command adds ions to the system. | || The '''genion''' command adds ions to the system. | ||
− | '''pname''' is for positive ion and NA | + | '''pname''' is for positive ion and NA stands for sodium ion. |
'''nname''' is for negative ion, which is chloride ions here. | '''nname''' is for negative ion, which is chloride ions here. | ||
Line 397: | Line 398: | ||
|- | |- | ||
|| Press the '''Enter''' key'''.''' | || Press the '''Enter''' key'''.''' | ||
− | || The '''nn | + | || The '''nn''' flag can be replaced by '''neutral''' flag to create a neutral system. |
|- | |- | ||
Line 407: | Line 408: | ||
|| We don’t want to replace the atoms of the protein with ions. | || We don’t want to replace the atoms of the protein with ions. | ||
− | + | I will choose '''13''' to replace solvent molecules for ions. | |
|- | |- | ||
|| Scroll up and show the changes. | || Scroll up and show the changes. | ||
|| Notice that, the number of water molecules in the box have decreased. | || Notice that, the number of water molecules in the box have decreased. | ||
+ | |||
+ | They are replaced by the ions. | ||
|- | |- | ||
Line 420: | Line 423: | ||
− | * Solvent input files | + | * Solvent input files containing coordinates |
* Added solvent molecules with '''solvate''' command | * Added solvent molecules with '''solvate''' command | ||
* About '''mdp''' file | * About '''mdp''' file | ||
Line 447: | Line 450: | ||
'''Assignment''' | '''Assignment''' | ||
− | || From the '''Gromacs''' manual ,* Read on the following file extensions. | + | || From the '''Gromacs''' manual , |
+ | * Read on the following file extensions. | ||
** top, gro , mdp , tpr , itr | ** top, gro , mdp , tpr , itr | ||
* Create a table to keep track of which file gets generated in which step. | * Create a table to keep track of which file gets generated in which step. |
Latest revision as of 11:50, 14 December 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,
|
Slide Number 3
Learning Objectives |
|
Slide Number 4
System and Software Requirement |
To record this tutorial, I am using
|
Slide Number 5
Pre-requisites https://spoken-tutorial.org |
To follow this tutorial,
|
Slide Number 6
Code Files |
|
Open File manager.
|
Open the 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 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 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 of the protein structure. |
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.
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’. | Reference for the publication 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.gro, 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 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 net 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 create a 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 contains parameters required to assemble the system for MD run. Parameters such as time interval, number of steps or temperature are given. This file defines several parameters for the MD run. |
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 many details added to the structure file. |
Show the dump file. | Let’s add ions to the system to balance charges. |
Open the file manager. | Open the file manager.
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 stands 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 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.
I will 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.
They are replaced by the ions. |
Slide Number 7
Summary |
Now let’s summarize. In this tutorial, we learned about,
|
Slide Number 8
Summary |
* Opened the solvated gro file in VMD
|
Slide Number 9
Assignment |
For assignment activity, please do the following.
|
Slide Number 10
Assignment |
From the Gromacs manual ,
|
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. |