Difference between revisions of "Gromacs/C2/Creating-Input-Files/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 spoken tutorial on '''Creating Input Files'''. |- || '''...")
 
Line 1: Line 1:
  
{| border=1
+
{border=1
 
|| '''Visual Cue'''
 
|| '''Visual Cue'''
 
|| '''Narration'''
 
|| '''Narration'''
Line 16: Line 16:
 
|| In this tutorial, we will learn about,
 
|| In this tutorial, we will learn about,
 
* Flow chart to setup a MD run for a protein in a solvent box
 
* Flow chart to setup a MD run for a protein in a solvent box
* Delete water molecules present in the starting pdb file
+
* Delete water molecules present in the starting '''pdb''' file
 
* '''pdb2gmx''' command and syntax
 
* '''pdb2gmx''' command and syntax
 
* Generate .'''gro''' and '''.top''' files
 
* Generate .'''gro''' and '''.top''' files
Line 24: Line 24:
  
 
'''Learning Objectives'''
 
'''Learning Objectives'''
|| * About force field and selecting a force field
+
|| * About selecting a force field  
* Generate the '''topology''' file
+
* Specifiy the size and shape of bounding box for MD
 
* '''editconf''' command
 
* '''editconf''' command
 
  
 
|-
 
|-
Line 54: Line 53:
  
 
'''Code Files'''
 
'''Code Files'''
|| * Files used in this tutorial are provided in the '''code files''' link.
+
|| * Files used in this tutorial are provided in the '''Code files''' link.
 
* Please download and extract the files.
 
* Please download and extract the files.
 
* Make a copy and then use them while practising.
 
* Make a copy and then use them while practising.
 
  
 
|-
 
|-
 
|| Open a web browser and go to [https://manual.gromacs.org/archive/5.0/online/flow.html https://manual.gromacs.org/archive/5.0/online/flow.html] .
 
|| Open a web browser and go to [https://manual.gromacs.org/archive/5.0/online/flow.html https://manual.gromacs.org/archive/5.0/online/flow.html] .
|| Open a web browser and go to the '''Gromacs''' link as seen here.
+
|| Open a web browser.
 +
Go to the '''Gromacs''' manual link as seen here.
  
 
The flow chart here, shows the procedure for '''MD''' and data analysis.
 
The flow chart here, shows the procedure for '''MD''' and data analysis.
Line 68: Line 67:
 
|| Cursor on the flow chart.
 
|| Cursor on the flow chart.
 
|| I will demonstrate parts of this procedure till the addition of a bounding box.
 
|| I will demonstrate parts of this procedure till the addition of a bounding box.
 +
 +
|-
 +
||
 +
|| Let’s consolidate all our input files into one folder.
 +
From now on, I will not mention this separately.
  
 
|-
 
|-
Line 76: Line 80:
  
 
|-
 
|-
|| Type '''mkdir firstmd''' and press '''Enter'''.
+
|| Type '''cd Documents''' and press '''Enter'''.
|| Type '''mkdir space firstmd''' to create a new directory.
+
|| '''Linux''' users can change directory to Documents using the cd''' command as seen.
  
 
|-
 
|-
|| Type '''cd firstmd''' and press '''Enter'''.
+
|| Windows users may skip this step and remain in '''home''' directory.
|| Change path to the newly created '''firstmd''' directory with the '''cd''' command.
+
|| Windows users must create this directory first.
 +
Hence, type '''mkdir Documents''' before changing path with '''cd''' command.
  
 
|-
 
|-
|| Open the '''File Manager'''.
+
|| Type '''mkdir firstmd''' and press '''Enter'''.
|| Open the '''File Manager''' and go to the '''firstmd''' directory.  
+
|| I will create a new directory and name it '''firstmd'''.
  
 
|-
 
|-
||  
+
|| Type '''cd firstmd''' and press '''Enter'''.
|| Let’s consolidate all our input files here.
+
|| Change path to the newly created '''firstmd''' directory.
 
+
From now on, I will not mention this separately.
+
  
 
|-
 
|-
Line 99: Line 102:
 
|| * '''Windows''' users must find the path of this directory in '''Windows'''.
 
|| * '''Windows''' users must find the path of this directory in '''Windows'''.
 
* Detailed instructions are provided with the tutorial.
 
* Detailed instructions are provided with the tutorial.
* Use this path when locating, opening or moving files, which are saved to here.
+
* Use this path when locating, opening or moving files, which are saved here.
 +
 
 +
|-
 +
|| Open the '''File Manager'''.
 +
|| Open the '''File Manager'''.
  
 
|-
 
|-
 
|| Copy '''1AKI.pdb''' to the '''firstmd''' directory.
 
|| Copy '''1AKI.pdb''' to the '''firstmd''' directory.
|| Copy the provided '''1AKI.pdb''' input file to this directory.
+
|| Copy the '''1AKI.pdb''' file input file to this directory.
 +
 
 +
For Windows users this path is likely to be in C drive.
  
 
|-
 
|-
 
|| Open the '''1AKI.pdb''' file in a text editor.
 
|| Open the '''1AKI.pdb''' file in a text editor.
|| Open the '''1AKI.pdb''' file in a text editor.
+
|| Then, open the '''pdb''' file in a text editor.
  
 
|-
 
|-
Line 113: Line 122:
 
|| Scroll to the bottom of the file.
 
|| Scroll to the bottom of the file.
  
In many files downloaded from the '''PDB''' website, water molecules will be present.
+
In most files downloaded from the '''PDB''' website, water molecules will be present.
  
 
|-
 
|-
Line 127: Line 136:
 
|| Let’s select all the lines starting with '''HOH''' molecules and delete them.
 
|| Let’s select all the lines starting with '''HOH''' molecules and delete them.
  
Lysozyme is well studied, stable and a model protein.
+
Lysozyme is a well studied, stable and model protein.
  
 
Hence we will also use it for learning the steps of protein '''MD''' for beginners.
 
Hence we will also use it for learning the steps of protein '''MD''' for beginners.
Line 138: Line 147:
  
 
The '''Gromacs''' commands will add the hydrogens for the user later on.
 
The '''Gromacs''' commands will add the hydrogens for the user later on.
 +
 +
|-
 +
||
 +
|| Structures determined by '''NMR''' methods may not contain the water molecules.
  
 
|-
 
|-
 
|| Save the file and quit the text editor.
 
|| Save the file and quit the text editor.
 
|| Now, save the file and quit the text editor.
 
|| Now, save the file and quit the text editor.
 
|-
 
||
 
|| Structures determined by '''NMR''' methods may not contain the water molecules.
 
  
 
|-
 
|-
 
|| Annotation: '''Windows''' users use appropriate path in your system.
 
|| Annotation: '''Windows''' users use appropriate path in your system.
 
|| Let’s learn a few '''terminal''' commands to generate input files for '''MD'''.
 
|| Let’s learn a few '''terminal''' commands to generate input files for '''MD'''.
 +
 +
|-
 +
|| Go to the '''terminal'''.
 +
|| GO back to the '''terminal'''.
  
 
|-
 
|-
 
|| Type '''gmx pdb2gmx -f 1AKI.pdb -o first.gro''' .
 
|| Type '''gmx pdb2gmx -f 1AKI.pdb -o first.gro''' .
|| All the commands start with the phrase '''gmx''' which calls '''Gromacs'''.
+
|| Enter the commands as seen and retain the syntax.
 
+
All the commands start with the phrase '''gmx''' which calls '''Gromacs'''.
Enter the commands as seen and retain the syntax.  
+
  
 
|-
 
|-
Line 161: Line 173:
 
|| The second word tells '''Gromacs''', what command is to be performed.  
 
|| The second word tells '''Gromacs''', what command is to be performed.  
  
Here, it is '''pdb2gmx''', which will convert the '''pdb''' file to '''gro''' file input file format.
+
Here, it is '''pdb2gmx''', which will convert the '''pdb''' file to '''gro''' file format.
  
 
|-
 
|-
Line 187: Line 199:
 
|-
 
|-
 
|| Type '''4''' as seen here and press the '''Enter''' key.
 
|| Type '''4''' as seen here and press the '''Enter''' key.
|| Learner must know their system to select the number for the desired force field.
+
|| Learner must know their system to select the desired force field.
  
 
'''Lysozyme''', is a protein without unnatural modifications.  
 
'''Lysozyme''', is a protein without unnatural modifications.  
  
Hence I want to select '''AMBER94'''.  
+
Hence I want to select '''AMBER99'''.  
  
 
To select '''AMBER''', type '''4''' as seen here and press the '''Enter''' key.
 
To select '''AMBER''', type '''4''' as seen here and press the '''Enter''' key.
Line 199: Line 211:
 
|| Gromacs returns the force field that will be used as '''amber99.ff'''.  
 
|| Gromacs returns the force field that will be used as '''amber99.ff'''.  
  
By convention, '''.ff''' denotes '''force field '''files and the path of file is also seen.
+
By convention, '''.ff''' denotes '''force field '''files.
 +
 
 +
The path of the file is also seen.
  
 
|-
 
|-
 
|| Highlight solvent environment options.
 
|| Highlight solvent environment options.
 
  
 
Type '''2''' and press '''Enter'''.
 
Type '''2''' and press '''Enter'''.
 
|| Next, the user is prompted to add a water model to the system.
 
|| Next, the user is prompted to add a water model to the system.
 +
 +
Notice that only an aqueous environment is present in the list.
  
 
Type '''2''' for '''tip4p''' and press the '''Enter''' key.
 
Type '''2''' for '''tip4p''' and press the '''Enter''' key.
  
 
|-
 
|-
||  
+
|| Show output and total charge of the system.
|| Sometimes, users desire for different solvent system to be added.
+
|| In the output notice the total charge on the system listed.
 
+
Learner is encouraged to pause the video and explore more on the solvent addition.
If so, create a '''topology''' file and add it to the library.
+
 
+
 
|-
 
|-
 
|| Show file manager with the newly created files.
 
|| Show file manager with the newly created files.
Line 228: Line 242:
 
|-
 
|-
 
|| Open '''first.gro''' in text editor.
 
|| Open '''first.gro''' in text editor.
|| Let’s open the generated '''first.gro''' file that gets created in a text editor.
+
|| Let’s open the generated '''first.gro''' file in a text editor.
  
Notice that, this command has also added hydrogens to the file.
+
Notice that, this command has also added hydrogens.
  
 
|-
 
|-
Line 240: Line 254:
  
 
Press '''Ctrl+L'''.
 
Press '''Ctrl+L'''.
|| Let’s close the '''firstmd.gro''' file.
+
|| Let’s close the file.
  
 
I will clear the '''terminal''' screen for clarity in the video.
 
I will clear the '''terminal''' screen for clarity in the video.
 
|-
 
|| Show '''Gromacs''' manual website on '''getting started'''.
 
 
[https://manual.gromacs.org/archive/5.0.4/online/getting_started.html#setup https://manual.gromacs.org/archive/5.0.4/online/getting_started.html#setup]
 
|| Learner may go through the '''Gromacs''' website on '''getting started'''.
 
 
The link is shown here.
 
  
 
|-
 
|-
Line 262: Line 268:
 
|-
 
|-
 
|| Cursor on '''-f''' and '''-o''' flag.
 
|| Cursor on '''-f''' and '''-o''' flag.
|| This command also generates '''.gro''' file like the '''editconf''' command.
+
|| This command also generates '''.gro''' file like '''pdb2gmx''' command.
  
 
Again '''-f''' denotes input file and '''-o''' denotes output file.
 
Again '''-f''' denotes input file and '''-o''' denotes output file.
Line 274: Line 280:
 
|-
 
|-
 
|| Type''' -d 1 '''.
 
|| Type''' -d 1 '''.
|| The''' -d''' flag denotes distance from the  
+
|| The''' -d''' flag denotes distance from the center of the box to the boundary.
 
+
center of the box to the boundary.
+
  
 
Here 1 denotes 1nm, which is half of the length of the box.
 
Here 1 denotes 1nm, which is half of the length of the box.
Line 284: Line 288:
 
|-
 
|-
 
||  
 
||  
|| If using '''lysozyme''', the max length for '''lysozyme''' can be of the order of 90 A.
+
|| So the box length is a little bigger than the molecule under study.
 
+
So the box length is a little bigger than the molecule under study.
+
  
 
|-
 
|-
 
|| Type''' -bt cubic '''.
 
|| Type''' -bt cubic '''.
|| Next, enter the shape of the box, which I will enter to be of cubic shape.
+
|| Next, enter the shape of the box, which is cubic.
  
 
If another shape is desired, use the '''-bt''' flag with the shape name.
 
If another shape is desired, use the '''-bt''' flag with the shape name.
Line 298: Line 300:
 
|| Let’s run the command.
 
|| Let’s run the command.
  
This generates another input '''.gro''' file, with box size and sets file names.
+
Cubic and hexagonal shapes are popularly used for the bounding box.
 +
 
 +
This generates another input '''.gro''' file, with box size and file name.
  
 
|-
 
|-
Line 318: Line 322:
 
|| Learner may pause the video, and explore the options further.
 
|| Learner may pause the video, and explore the options further.
  
Close the text editor window.
+
|-
 +
|| Show '''Gromacs''' manual website on '''getting started'''.
 +
 
 +
[https://manual.gromacs.org/archive/5.0.4/online/getting_started.html#setup https://manual.gromacs.org/archive/5.0.4/online/getting_started.html#setup]
 +
|| Learner may go through the '''Gromacs''' website on '''getting started'''.
 +
 
 +
The link is shown here.
  
 
|-
 
|-
Line 330: Line 340:
 
* About adding a force field
 
* About adding a force field
 
* Generated .'''gro''' and '''.top '''files
 
* Generated .'''gro''' and '''.top '''files
 +
* About '''editconf''' command
  
 
|-
 
|-
Line 336: Line 347:
 
'''Summary 9'''
 
'''Summary 9'''
 
||  
 
||  
* About '''editconf''' command
 
 
* Define the size of a bounding box  
 
* Define the size of a bounding box  
 
* Set the position of the molecule in the box
 
* Set the position of the molecule in the box
Line 356: Line 366:
 
'''http://www.mdtutorials.com/gmx/'''
 
'''http://www.mdtutorials.com/gmx/'''
 
|| * Go to the website seen below.
 
|| * Go to the website seen below.
* Choose a tutorial of your choice and read it
+
* Choose a tutorial of your choice and read it.
  
 
|-
 
|-

Revision as of 22:26, 24 October 2021

{border=1 || Visual Cue || Narration

|- || Slide Number 1

Title Slide || Welcome to the spoken tutorial on Creating Input Files.

|- || Slide Number 2

Learning Objectives || In this tutorial, we will learn about,

  • Flow chart to setup a MD run for a protein in a solvent box
  • Delete water molecules present in the starting pdb file
  • pdb2gmx command and syntax
  • Generate .gro and .top files

|- || Slide Number 3

Learning Objectives || * About selecting a force field

  • Specifiy the size and shape of bounding box for MD
  • editconf command

|- || Slide Number 4

System and Software Requirement || To record this tutorial, I am using

  • Ubuntu Linux v20.04 OS
  • Firefox web browser v92
  • gedit 3.36
  • Gromacs v2021.2

|- || 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 a web browser and go to https://manual.gromacs.org/archive/5.0/online/flow.html . || Open a web browser. Go to the Gromacs manual link as seen here.

The flow chart here, shows the procedure for MD and data analysis.

|- || Cursor on the flow chart. || I will demonstrate parts of this procedure till the addition of a bounding box.

|- || || Let’s consolidate all our input files into one folder. From now on, I will not mention this separately.

|- || Press Ctrl, Alt and T keys together. || Open a terminal by pressing Ctrl, Alt and T keys together.

Windows users can open the Ubuntu 20.04 app.

|- || Type cd Documents and press Enter. || Linux users can change directory to Documents using the cd command as seen.

|- || Windows users may skip this step and remain in home directory. || Windows users must create this directory first. Hence, type mkdir Documents before changing path with cd command.

|- || Type mkdir firstmd and press Enter. || I will create a new directory and name it firstmd.

|- || Type cd firstmd and press Enter. || Change path to the newly created firstmd directory.

|- || Slide Number 7

FIle path for Windows Users || * Windows users must find the path of this directory in Windows.

  • Detailed instructions are provided with the tutorial.
  • Use this path when locating, opening or moving files, which are saved here.

|- || Open the File Manager. || Open the File Manager.

|- || Copy 1AKI.pdb to the firstmd directory. || Copy the 1AKI.pdb file input file to this directory.

For Windows users this path is likely to be in C drive.

|- || Open the 1AKI.pdb file in a text editor. || Then, open the pdb file in a text editor.

|- || Scroll to the end of the file. || Scroll to the bottom of the file.

In most files downloaded from the PDB website, water molecules will be present.

|- || Show water molecules HOH from 1AKI.pdb file. || They are denoted as HOH and present at the end, before the model ends.

|- || Highlight the HOH from 1AKI.pdb. || If so, be sure to delete them and save the file, before proceeding further.

|- || select all the HOH containing rows molecules and delete them. || Let’s select all the lines starting with HOH molecules and delete them.

Lysozyme is a well studied, stable and model protein.

Hence we will also use it for learning the steps of protein MD for beginners.

|- || Show absence of H atom in the file. || Notice that hydrogens atoms are absent in this structure file.

We will not add them.

The Gromacs commands will add the hydrogens for the user later on.

|- || || Structures determined by NMR methods may not contain the water molecules.

|- || Save the file and quit the text editor. || Now, save the file and quit the text editor.

|- || Annotation: Windows users use appropriate path in your system. || Let’s learn a few terminal commands to generate input files for MD.

|- || Go to the terminal. || GO back to the terminal.

|- || Type gmx pdb2gmx -f 1AKI.pdb -o first.gro . || Enter the commands as seen and retain the syntax. All the commands start with the phrase gmx which calls Gromacs.

|- || Highlight pdb2gmx. || The second word tells Gromacs, what command is to be performed.

Here, it is pdb2gmx, which will convert the pdb file to gro file format.

|- || Highlight -f 1AKI.pdb . || The hyphen f flag denotes the input file and it is 1AKI.pdb.

|- || Press Enter. || The hyphen o flag refers to the output file and I will name it first.gro.

Press the Enter key and we will enter an interactive mode.

|- || Cursor on the force field and publication details selection. || Selection of force field and solvent addition is interactive in this command.

First, several forcefieds are listed, for the user to pick from.

|- || Cursor on the details page. || The details off publication for each of the force field is also listed.

To learn further, learner is referred to the publication listed.

|- || Type 4 as seen here and press the Enter key. || Learner must know their system to select the desired force field.

Lysozyme, is a protein without unnatural modifications.

Hence I want to select AMBER99.

To select AMBER, type 4 as seen here and press the Enter key.

|- || Cursor and highlight the response on the terminal. || Gromacs returns the force field that will be used as amber99.ff.

By convention, .ff denotes force field files.

The path of the file is also seen.

|- || Highlight solvent environment options.

Type 2 and press Enter. || Next, the user is prompted to add a water model to the system.

Notice that only an aqueous environment is present in the list.

Type 2 for tip4p and press the Enter key.

|- || Show output and total charge of the system. || In the output notice the total charge on the system listed. Learner is encouraged to pause the video and explore more on the solvent addition.

|- || Show file manager with the newly created files. || Open the file manager and notice the newly created files.

|- || Cursor on the file manager showing the newly generated files. || Three files, with .gro, .top and .itp extension are created with this command.

.top is the topology file and .itp is include topology file.

|- || Open first.gro in text editor. || Let’s open the generated first.gro file in a text editor.

Notice that, this command has also added hydrogens.

|- || Cursor on 4-6 columns. || The 4th, 5th and 6th columns are the atomic coordinate positions of the atom.

|- || Close the firstmd.gro file.

Press Ctrl+L. || Let’s close the file.

I will clear the terminal screen for clarity in the video.

|- || Type gmx editconf -f first.gro -o box-added.gro -c -d 1 -bt cubic. || Next, enter the editconf command, which adds a solvent box to the system.

This is to define the volume where the simulation will be performed.

Editconf does not create a new conformational state for the protein.

|- || Cursor on -f and -o flag. || This command also generates .gro file like pdb2gmx command.

Again -f denotes input file and -o denotes output file.

|- || Type -c . || Cubic and hexagonal shapes are popularly used for the bounding box.

The hyphen c flag places the center of the molecule in the center box.

|- || Type -d 1 . || The -d flag denotes distance from the center of the box to the boundary.

Here 1 denotes 1nm, which is half of the length of the box.

Increasing the box size will considerably lengthen the MD run time.

|- || || So the box length is a little bigger than the molecule under study.

|- || Type -bt cubic . || Next, enter the shape of the box, which is cubic.

If another shape is desired, use the -bt flag with the shape name.

|- || Press Enter to run the command. || Let’s run the command.

Cubic and hexagonal shapes are popularly used for the bounding box.

This generates another input .gro file, with box size and file name.

|- || Cursor on the details. || The box volume that is created is displayed in cubic nanometers.

|- || || The extent of shift of the coordinates is also mentioned in nanometer.

|- || Show screenshot of box-added.gro. || Let’s open the box-added.gro in a text editor.

Notice that, the coordinates have shifted to accommodate aligning in the box.

|- || Close the text editor. || Learner may pause the video, and explore the options further.

|- || Show Gromacs manual website on getting started.

https://manual.gromacs.org/archive/5.0.4/online/getting_started.html#setup || Learner may go through the Gromacs website on getting started.

The link is shown here.

|- || Slide Number

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

  • Steps in a MD run for a protein in a solvent box
  • The pdb2gmx command and syntax
  • About adding a force field
  • Generated .gro and .top files
  • About editconf command

|- || Slide Number

Summary 9 ||

  • Define the size of a bounding box
  • Set the position of the molecule in the box

|- || Slide Number

Assignment 10 || For assignment activity, please do the following.

  • Use a PDB ID of another protein of your choice.
  • Practice the commands learnt in this tutorial.
  • Read publications of your choice which use Gromacs.

|- || Slide Number

Assignment 11

http://www.mdtutorials.com/gmx/ || * Go to the website seen below.

  • Choose a tutorial of your choice and read it.

|- || 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