├── .gitignore ├── 1_tip4pew_water ├── README.md ├── eql-temp.png ├── eql-tmp.xvg ├── eql2-press.png ├── eql2-press.xvg ├── mdp │ ├── eql.mdp │ ├── eql2.mdp │ ├── min.mdp │ ├── min2.mdp │ └── prd.mdp ├── min-pot.png ├── min-pot.xvg ├── plot.plt ├── water1.png └── water2.png ├── 2_methane_in_water ├── README.md ├── plot.plt ├── rdf.png ├── rdf.xvg └── run ├── 3_methanes_in_water ├── README.md ├── plot.plt ├── pmf.png ├── rdf.xvg ├── rdf1.png └── rdf2.png ├── 4_methane_fe ├── README.md ├── dF_state.png ├── dF_t.png ├── dhdl_TI.png └── mdp │ ├── eql.mdp │ ├── eql2.mdp │ ├── min.mdp │ ├── min2.mdp │ └── prd.mdp ├── 5_umbrella ├── README.md ├── histo.png ├── histo.xvg ├── mdp │ ├── eql.mdp │ ├── eql2.mdp │ ├── min.mdp │ ├── min2.mdp │ └── prd.mdp ├── plot.plt ├── profile.xvg ├── profile1.png ├── profile2.png └── profile3.png ├── 6_tpi └── README.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.aux 3 | *.log 4 | *.pdf 5 | *.tga 6 | *.gro 7 | *.xtc 8 | -------------------------------------------------------------------------------- /1_tip4pew_water/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 1: Water 4 | ================= 5 | 6 | In this introductory tutorial, I'll show you how to create a box of water and 7 | run a simple simulation on it with constant temperature and pressure. At the end 8 | we'll find out the density of water. 9 | 10 | Setup 11 | ----- 12 | 13 | Every GROMACS simulations needs three essential files: structure (.gro/.pdb), 14 | topology (.top), and parameters (.mdp). The structure file contains the 15 | Cartesian coordinates of every atomic site in the system. The topology file 16 | contains information on how each atomic site interacts with other atomic sites, 17 | whether that is in non-bonded interactions or bonded interactions. This 18 | information is provided by the force field. Non-bonded interactions included van 19 | der Waals interactions and Coulomb interactions. Bonded interactions include 20 | bonds, angles, and dihedrals. The parameters file includes information on how 21 | long to run the simulation, the timestep, temperature and pressure coupling, 22 | etc. Below we'll obtain / create these files. 23 | 24 | At this point I would suggest creating a directory to store files for this 25 | tutorial. 26 | 27 | ### Topology file 28 | 29 | We'll start with the topology file. Typically a topology file uses an `#include` 30 | statement to include the force field to be used. This force field includes `[ 31 | atomtypes ]`, `[ bondtypes ]`, `[ angletypes ]`, and `[ dihedraltypes ]` 32 | directives. Then in the topology file usually we specify different `[ 33 | moleculetype ]` directives which contain `[ atoms ]`, `[ bonds ]`, and `[ 34 | dihedrals ]` which refer back to the force field. Don't worry about this too 35 | much right now. Water models include all of these for us. See Chapter 5 of the 36 | reference manual for more information. 37 | 38 | Create a file named `topol.top` with the following text: 39 | 40 | #include "oplsaa.ff/forcefield.itp" 41 | #include "oplsaa.ff/tip4pew.itp" 42 | 43 | [ System ] 44 | TIP4PEW 45 | 46 | [ Molecules ] 47 | 48 | As you can see we've included the force field for OPLS-AA. Additionally we've 49 | included the TIP4PEW water model. After this you'll see a `[ System ]` directive, 50 | which includes just the name of the system, which can be anything you want. 51 | Lastly, we list out each `moleculetype` and how many there are under `[ 52 | Molecules ]`. Right now we don't have any (we'll get those in a minute). 53 | 54 | ### Structure file 55 | 56 | The structure of TIP4PEW is already provided by GROMACS in the topology 57 | directory. This standard location is typically `/usr/share/gromacs/top`, but you 58 | my have it installed in a different directory. If you are properly sourcing 59 | GMXRC then it will be located at `$GMXDATA/top`. In that directory you'll see 60 | several `.gro` files, one of which is `tip4p.gro`. You'll also see the folder 61 | `oplsaa.ff` which we've included in our topology file above. There isn't a 62 | structure file specific to TIP4PEW. Four-point water structure is essentially 63 | the same for TIP4P and TIP4PEW. What makes them different is the force field 64 | parameters. 65 | 66 | To create a box of water using that structure file do: 67 | 68 | ```bash 69 | $ gmx solvate -cs tip4p -o conf.gro -box 2.3 2.3 2.3 -p topol.top 70 | ``` 71 | 72 | If you open back up `topol.top` you'll see that a line has been added at the 73 | end with the word `SOL` and number. `SOL` is the name of the `moleculetype` that 74 | is defined in `oplsaa.ff/tip4pew.itp`. When we ran _gmx solvate_, GROMACS added 75 | enough water molecules to fill a box 2.3 nm in each direction. 76 | 77 | ### Parameter files 78 | 79 | Now we need a set of parameter files so that GROMACS knows what to do with our 80 | starting structure. Simulations almost always have three main parts: 81 | minimization, equilibration, and production. Minimization and equilibration can 82 | be broken down into multiple steps. Each of these needs it's own parameters 83 | file. In this case we'll be doing two minimizations, two equilibrations, and one 84 | production run. 85 | 86 | Here are the files we'll be using: 87 | 88 | * [Minimization](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/min.mdp) 89 | * [Minimization 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/min2.mdp) 90 | * [Equilibration](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/eql.mdp) 91 | * [Equilibration 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/eql2.mdp) 92 | * [Production](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/prd.mdp) 93 | 94 | Create a folder in your project directory named `mdp` and download and store 95 | the files there. 96 | 97 | There will be a few things common to all five of our files. In each description, 98 | I only give a very small comment. See the [GROMACS page on 99 | this](http://manual.gromacs.org/documentation/5.1/user-guide/mdp-options.html) 100 | for more information on each option. 101 | 102 | | parameter | value | explanation | 103 | | ---------------|-----------|-------------| 104 | | cutoff-scheme | Verlet | Use in creating neighbor lists. This is now the default, but we provide it here in order to avoid any notes.| 105 | | coulombtype | PME | Use Particle-Mesh Ewald for long-range (k-space) electrostatics. | 106 | | rcoulomb | 1.0 | Cut-off for real/k-space for PME (nm). | 107 | | vdwtype | Cut-off | van der Walls forces cut-off at `rvdw`. | 108 | | rvdw | 1.0 | Cut-off for VDW (nm). | 109 | | DispCorr | EnerPress | Long-range correction for VDW for both energy and pressure. | 110 | 111 | Cut-off distances should be set keeping in mind how the force field was 112 | parameterized. In other words, its a good idea to look at the journal article 113 | that describes how the force field was created. We've chosen 1.0 nm for our 114 | cut-offs here, which is common enough for OPLS, but you may determine for your 115 | system to choose something else. 116 | 117 | Additionally in each part we'll also be outputting an energy file, a log file, 118 | and a compressed trajectory file. The rate of output (in simulation steps) for 119 | these is set using `nstenergy`, `nstlog`, and `nstxout-compressed`, 120 | respectively. We'll output more information in the production run. 121 | 122 | For each part, except for the second minimization, we'll also be constraining 123 | all bonds involving a hydrogen using the LINCS algorithm by setting 124 | `constraint-algorithm = lincs` and `constraints = h-bonds`. This allows us to use 125 | a larger time step than otherwise. 126 | 127 | For the first minimization we use the steepest descents algorithm by setting 128 | `integrator = steep` to minimize the energy of the system with a maximum of 129 | 1,000 steps (`nsteps = 1000`). The minimization will stop if the energy 130 | converges before then. Additionally we have `define = 131 | -DFLEXIBLE`. This lets GROMACS know to use flexible water, since by default all 132 | water models are rigid using an algorithm called SETTLE. In the water model's 133 | topology file, which we have includes, there is an if statement that looks for 134 | the `FLEXIBLE` variable to defined. The purpose of this first minimization is to 135 | get the molecules in a good starting position so we can turn on SETTLE without 136 | any errors. 137 | 138 | In the second minimization we are simply removing `define = -DFLEXIBLE` and 139 | increasing the number of maximum steps to 50,000. 140 | 141 | The last three parts---the two equilibrations and production---all use the 142 | leap-frog integrator by setting `integrator = md`. Additionally each one will 143 | use a 2 fs time step by setting `dt = 0.002`. 144 | 145 | For the first equilibration step there are a few things to note. We are adding 146 | several parameters shown below: 147 | 148 | | parameter | value | explanation | 149 | | ---------------|-------------|-------------| 150 | | gen-vel | yes | Generate velocities for each atomic site according to a Maxwell-Boltzmann distribution. **Only generate velocities for your first equilibration step**. This gets us close to the temperature at which we will couple the system. | 151 | | gen-temp | 298.15 | Temperature in K to use for `gen-vel`. Unless you are doing some strange / interesting stuff, this should be the same as `ref-t`. | 152 | | tcoupl | Nose-Hoover | The algorithm to use for temperature coupling. Nose-Hoover correctly produces the canonical ensemble. | 153 | | tc-grps | System | Which groups to couple. You can couple different groups of atoms separately, but we'll just couple the whole system. | 154 | | tau-t | 2.0 | Time constant for coupling. See the manual for details. | 155 | | ref-t | 298.15 | The temperature in K at which to couple. | 156 | | nhchainlength | 1 | Leap-frog integrator only supports 1, but by default this is 10. This is set so GROMACS doesn't complain to us. | 157 | 158 | The point of this first equilibration is to get us to the correct temperature 159 | (298.15 K) before adding pressure coupling. Adding temperature and pressure 160 | coupling at the same time can cause your system to be unstable and crash. We 161 | don't want to shock our system at the beginning. Additionally, we have set 162 | `nsteps = 50000`, so with a 2 fs timestep, that means that this will run for 100 163 | ps. This is adequate for what we are doing here, but in larger / more 164 | complicated systems you may need to equilibrate longer. 165 | 166 | The second equilibration adds pressure coupling. Note that we are _not_ 167 | generating velocities again, since that will undo some of the work we just did. 168 | We also set `continuation = yes` for the constraints, since we are continuing 169 | the simulation from the first equilibration. This part will run for 1 ns. Again, 170 | this may need to be longer for other systems. 171 | 172 | | parameter | value | explanation | 173 | | -----------------|-------------|-------------| 174 | | pcoupl | Parrinello-Rahman | The algorithm to use for pressure coupling. Parrinello-Rahman correctly produces the isobaric-isothermal ensemble when used with Nose-Hoover. | 175 | | tau-p | 2.0 | Time constant for coupling. See the manual for details. | 176 | | ref-p | 1.0 | The pressure in bar at which to couple. | 177 | | compressibility | 4.46e-5 | The compressibility of the system in bar^-1. | 178 | 179 | For the production run, everything is exactly the same as the last 180 | equilibration, except we are outputting more data and running for 10 ns. 181 | 182 | Simulation 183 | ---------- 184 | 185 | We have all the files we need now to run each part of the simulation. Each 186 | part you typically run *gmx grompp* to preprocess the three files we now have 187 | (.gro, .top, and .mdp) into a .tpr file (sometimes confusingly also called a 188 | topology file). 189 | 190 | ### Minmizations 191 | 192 | First, let's run our two minimization steps by doing the following: 193 | 194 | ```bash 195 | $ gmx grompp -f mdp/min.mdp -o min -pp min -po min 196 | $ gmx mdrun -deffnm min 197 | 198 | $ gmx grompp -f mdp/min2.mdp -o min2 -pp min2 -po min2 -c min -t min 199 | $ gmx mdrun -deffnm min2 200 | ``` 201 | 202 | At each part we are reading in the .mdp file with the `-f` flag. By default if 203 | `-c` and `-p` flags are not specified GROMACS uses `conf.gro` and `topol.top` 204 | for the structure and topology files. Additionally we are outputting a processed 205 | topology file `-pp` and mdp file `-po`. These are optional, but probably worth 206 | looking at, especially the processed mdp file, since it is commented. 207 | 208 | At each subsequent step we read in the previous step's last structure file or 209 | checkpoint file using the `-c` and `-t` flags. By default GROMACS outputs 210 | checkpoint files every 15 minutes and at the last step. If the checkpoint file 211 | is not present, GROMACS will use the structure file defined by `-c`, so it is a 212 | good practice to specify both. At each *gmx mdrun* we are telling GROMACS to use 213 | a default name for each input and output file, since several files are output. 214 | 215 | Note we are using `-maxwarn 1` for the second minimization. Only use this flag 216 | if you know what you are doing! In this case we get a warning about the 217 | efficiency of L-BFGS which we can safely bypass. 218 | 219 | To get a feel for what's going on, let's extract the potential energy of both of 220 | these parts using the GROMACS command *gmx energy*. Do the following and enter 221 | the number that corresponds with `Potential`, followed by enter again: 222 | 223 | ```bash 224 | $ gmx energy -f min.edr -o min-energy.xvg 225 | ``` 226 | 227 | Now do the same for the second minimization: 228 | 229 | ```bash 230 | $ gmx energy -f min2.edr -o min2-energy.xvg 231 | ``` 232 | 233 | The header of the resulting `.xvg.` file will contain information for use with 234 | the Grace plotting program. I use gnuplot so some of these lines will cause 235 | errors. I just simply replace every `@` character with `#` in the `.xvg.` file 236 | and then I can use gnuplot. To plot with first start gnuplot: 237 | 238 | ```bash 239 | $ gnuplot 240 | ``` 241 | 242 | Then in the gnuplot terminal do: 243 | 244 | ```gnuplot 245 | > plot 'min-energy.xvg' w l 246 | ``` 247 | 248 | To plot the second minimization step do: 249 | 250 | ```gnuplot 251 | > plot 'min2-energy.xvg' w l 252 | ``` 253 | 254 | Your first plot should look something like this: 255 | 256 | ![Minimization Potential](min-pot.png) 257 | 258 | My second minimization didn't change anything, so I have nothing to plot. 259 | 260 | 261 | ### Equilibration 1 (NVT) 262 | 263 | Now that we have a good starting structure, let's do the first equilibration 264 | step, by adding the temperature coupling: 265 | 266 | ```bash 267 | $ gmx grompp -f mdp/eql.mdp -o eql -pp eql -po eql -c min2 -t min2 268 | $ gmx mdrun -deffnm eql 269 | ``` 270 | 271 | Let's take a look at how the temperature varies throughout the simulation: 272 | 273 | ```bash 274 | $ gmx energy -f eql.edr -o eql-temp.xvg 275 | ``` 276 | 277 | Choose the number corresponding to `Temperature` at the prompt and hit enter 278 | again. Plot it in gnuplot as above. You should see something like: 279 | 280 | ![Equilibration Temperature](eql-temp.png) 281 | 282 | Note that the temperature initially fluctuates wildly but eventually 283 | settles. 284 | 285 | ### Equilibration 2 (NPT) 286 | 287 | For our last equilibration, as stated earlier, we're adding a pressure coupling: 288 | 289 | ```bash 290 | $ gmx grompp -f mdp/eql2.mdp -o eql2 -pp eql2 -po eql2 -c eql -t eql 291 | $ gmx mdrun -deffnm eql2 292 | ``` 293 | 294 | You can check out the temperature and pressure using *gmx energy* as above. 295 | Here's a plot of the pressure: 296 | 297 | ![Equilibration 2 Pressure ](eql2-press.png) 298 | 299 | Note that pressure fluctuates quite a bit, which is normal. The average after 300 | full equilibration should be close to 1 bar in this case. 301 | 302 | ### Production 303 | 304 | Now for the production part do: 305 | 306 | ```bash 307 | $ gmx grompp -f mdp/prd.mdp -o prd -pp prd -po prd -c eql2 -t eql2 308 | $ gmx mdrun -deffnm prd 309 | ``` 310 | 311 | Analysis 312 | -------- 313 | 314 | Using *gmx energy* as above on `prd.edr`, get the average temperature, pressure, 315 | and density. Are they what you expect? 316 | 317 | Here's my output: 318 | 319 | Energy Average Err.Est. RMSD Tot-Drift 320 | ------------------------------------------------------------------------------- 321 | Temperature 298.145 0.019 8.65629 0.0338992 (K) 322 | Pressure 3.25876 0.97 688.616 -2.75083 (bar) 323 | Density 995.381 0.15 12.92 0.0705576 (kg/m^3) 324 | 325 | If you look at the [TIP4PEW 326 | paper](http://link.aip.org/link/doi/10.1063/1.1683075) in figure 4, you can see 327 | we have achieved the correct density. Additionally note that [Wolfram Alpha 328 | says](http://www.wolframalpha.com/input/?i=density+of+water+298.15+K) 329 | the density of water at standard conditions is 997 kg/m^3. 330 | 331 | You can also visualize your simulation using a program like 332 | [vmd](http://www.ks.uiuc.edu/Research/vmd/). To open the production part with 333 | vmd do: 334 | 335 | ```bash 336 | $ vmd prd.gro prd.xtc 337 | ``` 338 | 339 | Here's a snapshot: 340 | 341 | ![Water](water1.png) 342 | 343 | Note that do to the period boundary condition this can look kind of strange 344 | with bonds stretching across the box. You can make molecules whole by using *gmx 345 | trjconv*: 346 | 347 | ```bash 348 | $ gmx trjconv -f prd.xtc -s prd.tpr -pbc mol -o prd-mol.xtc 349 | ``` 350 | 351 | Viewing that file should look much nicer: 352 | 353 | ![Water](water2.png) 354 | 355 | Summary 356 | ------- 357 | 358 | In this tutorial we generate a box of TIP4PEW water using *gmx solvate*. We 359 | simulated it in five distinct parts: minimization 1, minimization 2, 360 | equilbiration 1, equilibration 2, and production. Each part used its own .mdp 361 | files which were explained. At each part we used *gmx energy* to extract useful 362 | information about the simulation. After the production run we were able to find 363 | the density of TIP4PEW water. 364 | 365 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 366 | -------------------------------------------------------------------------------- /1_tip4pew_water/eql-temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/1_tip4pew_water/eql-temp.png -------------------------------------------------------------------------------- /1_tip4pew_water/eql-tmp.xvg: -------------------------------------------------------------------------------- 1 | # This file was created Sun Aug 16 13:07:46 2015 2 | # Created by: 3 | # :-) GROMACS - gmx energy, VERSION 5.1 (-: 4 | # 5 | # Executable: /usr/bin/gmx 6 | # Data prefix: /usr 7 | # Command line: 8 | # gmx energy -f eql.edr -o eql-tmp.xvg 9 | # gmx energy is part of G R O M A C S: 10 | # 11 | # GROningen Mixture of Alchemy and Childrens' Stories 12 | # 13 | # title "GROMACS Energies" 14 | # xaxis label "Time (ps)" 15 | # yaxis label "(K)" 16 | #TYPE xy 17 | # view 0.15, 0.15, 0.75, 0.85 18 | # legend on 19 | # legend box on 20 | # legend loctype view 21 | # legend 0.78, 0.8 22 | # legend length 2 23 | # s0 legend "Temperature" 24 | 0.000000 294.361603 25 | 0.400000 206.506866 26 | 0.800000 407.551971 27 | 1.200000 478.009247 28 | 1.600000 313.071564 29 | 2.000000 208.486923 30 | 2.400000 196.905624 31 | 2.800000 269.285065 32 | 3.200000 390.894592 33 | 3.600000 382.002014 34 | 4.000000 282.049866 35 | 4.400000 238.205750 36 | 4.800000 242.141113 37 | 5.200000 291.294556 38 | 5.600000 358.494751 39 | 6.000000 333.663605 40 | 6.400000 277.994904 41 | 6.800000 270.758392 42 | 7.200000 281.476135 43 | 7.600000 303.957275 44 | 8.000000 331.095642 45 | 8.400000 319.906494 46 | 8.800000 296.298248 47 | 9.200000 288.939362 48 | 9.600000 284.891235 49 | 10.000000 306.032562 50 | 10.400000 314.507111 51 | 10.800000 305.522064 52 | 11.200000 299.971313 53 | 11.600000 288.581543 54 | 12.000000 286.921814 55 | 12.400000 287.236359 56 | 12.800000 324.528168 57 | 13.200000 304.447662 58 | 13.600000 286.270142 59 | 14.000000 277.923523 60 | 14.400000 291.254395 61 | 14.800000 315.112213 62 | 15.200000 300.370361 63 | 15.600000 302.552948 64 | 16.000000 296.756897 65 | 16.400000 296.145416 66 | 16.800000 300.415588 67 | 17.200000 313.937256 68 | 17.600000 305.256836 69 | 18.000000 304.680359 70 | 18.400000 285.223724 71 | 18.800000 301.237244 72 | 19.200000 286.760162 73 | 19.600000 304.419312 74 | 20.000000 311.709137 75 | 20.400000 306.137939 76 | 20.800000 282.405060 77 | 21.200000 287.803986 78 | 21.600000 302.237488 79 | 22.000000 304.536072 80 | 22.400000 310.134857 81 | 22.800000 293.719208 82 | 23.200000 296.405762 83 | 23.600000 298.369934 84 | 24.000000 296.765289 85 | 24.400000 302.523224 86 | 24.800000 287.858673 87 | 25.200000 298.943726 88 | 25.600000 295.096588 89 | 26.000000 287.499512 90 | 26.400000 304.576172 91 | 26.800000 294.365845 92 | 27.200000 289.334625 93 | 27.600000 300.321228 94 | 28.000000 318.116943 95 | 28.400000 309.922729 96 | 28.800000 292.227539 97 | 29.200000 294.935730 98 | 29.600000 305.450867 99 | 30.000000 305.290955 100 | 30.400000 311.868774 101 | 30.800000 293.660980 102 | 31.200000 306.520782 103 | 31.600000 299.315491 104 | 32.000000 309.254211 105 | 32.400000 300.512329 106 | 32.800000 290.201111 107 | 33.200000 298.830322 108 | 33.600000 298.733459 109 | 34.000000 289.309296 110 | 34.400000 295.937103 111 | 34.800000 297.825378 112 | 35.200000 305.283112 113 | 35.600000 302.288788 114 | 36.000000 278.792175 115 | 36.400000 304.541199 116 | 36.800000 310.472870 117 | 37.200000 305.383301 118 | 37.600000 294.301544 119 | 38.000000 295.693787 120 | 38.400000 291.660217 121 | 38.800000 289.676056 122 | 39.200000 306.894379 123 | 39.600000 303.168182 124 | 40.000000 298.785858 125 | 40.400000 283.639252 126 | 40.800000 305.537476 127 | 41.200000 307.199585 128 | 41.600000 309.490356 129 | 42.000000 291.445160 130 | 42.400000 292.633392 131 | 42.800000 295.984619 132 | 43.200000 308.703918 133 | 43.600000 299.711670 134 | 44.000000 291.305267 135 | 44.400000 292.699982 136 | 44.800000 298.042755 137 | 45.200000 299.864746 138 | 45.600000 290.962189 139 | 46.000000 298.911804 140 | 46.400000 296.414978 141 | 46.800000 295.112549 142 | 47.200000 310.925049 143 | 47.600000 297.013641 144 | 48.000000 299.599243 145 | 48.400000 317.643188 146 | 48.800000 280.718323 147 | 49.200000 303.932800 148 | 49.600000 306.515320 149 | 50.000000 288.432556 150 | 50.400000 281.158112 151 | 50.800000 280.095673 152 | 51.200000 296.646210 153 | 51.600000 317.736755 154 | 52.000000 308.294495 155 | 52.400000 302.664520 156 | 52.800000 296.424133 157 | 53.200000 289.633698 158 | 53.600000 302.120728 159 | 54.000000 303.552521 160 | 54.400000 296.992371 161 | 54.800000 288.366791 162 | 55.200000 301.163330 163 | 55.600000 294.743286 164 | 56.000000 306.626373 165 | 56.400000 288.911041 166 | 56.800000 304.735107 167 | 57.200000 281.108246 168 | 57.600000 310.111267 169 | 58.000000 294.768646 170 | 58.400000 292.958496 171 | 58.800000 294.919922 172 | 59.200000 301.812195 173 | 59.600000 282.089722 174 | 60.000000 306.248047 175 | 60.400000 299.314972 176 | 60.800000 316.628937 177 | 61.200000 285.447205 178 | 61.600000 293.208801 179 | 62.000000 301.707275 180 | 62.400000 303.914520 181 | 62.800000 311.954742 182 | 63.200000 291.947113 183 | 63.600000 290.750397 184 | 64.000000 297.654144 185 | 64.400000 274.607025 186 | 64.800000 292.485382 187 | 65.200000 297.869354 188 | 65.600000 294.735352 189 | 66.000000 287.267303 190 | 66.400000 294.012878 191 | 66.800000 309.162567 192 | 67.200000 300.018738 193 | 67.600000 296.140106 194 | 68.000000 296.941833 195 | 68.400000 290.760101 196 | 68.800000 296.368530 197 | 69.200000 280.665771 198 | 69.600000 302.316101 199 | 70.000000 315.532928 200 | 70.400000 286.233978 201 | 70.800000 296.015472 202 | 71.200000 317.232971 203 | 71.600000 303.329346 204 | 72.000000 288.269775 205 | 72.400000 292.291290 206 | 72.800000 296.681091 207 | 73.200000 295.505157 208 | 73.600000 287.587982 209 | 74.000000 307.725098 210 | 74.400000 308.208832 211 | 74.800000 300.168976 212 | 75.200000 289.136536 213 | 75.600000 291.788422 214 | 76.000000 295.520142 215 | 76.400000 296.382751 216 | 76.800000 322.167877 217 | 77.200000 289.560486 218 | 77.600000 292.906189 219 | 78.000000 297.887115 220 | 78.400000 291.045380 221 | 78.800000 292.932159 222 | 79.200000 312.359253 223 | 79.600000 304.900055 224 | 80.000000 299.920197 225 | 80.400000 284.781464 226 | 80.800000 281.919769 227 | 81.200000 310.053375 228 | 81.600000 309.325653 229 | 82.000000 301.610474 230 | 82.400000 290.257141 231 | 82.800000 296.232086 232 | 83.200000 293.934296 233 | 83.600000 320.135681 234 | 84.000000 293.731262 235 | 84.400000 286.172760 236 | 84.800000 295.753784 237 | 85.200000 297.827850 238 | 85.600000 309.918549 239 | 86.000000 316.120361 240 | 86.400000 302.195007 241 | 86.800000 282.860687 242 | 87.200000 300.465363 243 | 87.600000 292.358887 244 | 88.000000 314.295227 245 | 88.400000 314.411194 246 | 88.800000 305.044983 247 | 89.200000 287.282471 248 | 89.600000 287.700348 249 | 90.000000 294.389374 250 | 90.400000 305.686066 251 | 90.800000 320.609955 252 | 91.200000 304.411072 253 | 91.600000 282.329529 254 | 92.000000 287.392090 255 | 92.400000 291.202454 256 | 92.800000 305.856567 257 | 93.200000 296.202728 258 | 93.600000 305.109131 259 | 94.000000 299.618866 260 | 94.400000 286.232666 261 | 94.800000 295.136414 262 | 95.200000 294.132751 263 | 95.600000 302.299408 264 | 96.000000 311.154938 265 | 96.400000 302.154297 266 | 96.800000 288.976898 267 | 97.200000 292.282074 268 | 97.600000 297.865692 269 | 98.000000 297.979401 270 | 98.400000 293.760956 271 | 98.800000 289.141266 272 | 99.200000 307.474365 273 | 99.600000 297.755737 274 | 100.000000 298.791077 275 | -------------------------------------------------------------------------------- /1_tip4pew_water/eql2-press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/1_tip4pew_water/eql2-press.png -------------------------------------------------------------------------------- /1_tip4pew_water/mdp/eql.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 50000 ; 100 ps 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | gen-vel = yes 11 | gen-temp = 298.15 12 | 13 | constraint-algorithm = lincs 14 | constraints = h-bonds 15 | 16 | cutoff-scheme = Verlet 17 | 18 | coulombtype = PME 19 | rcoulomb = 1.0 20 | 21 | vdwtype = Cut-off 22 | rvdw = 1.0 23 | DispCorr = EnerPres 24 | 25 | tcoupl = Nose-Hoover 26 | tc-grps = System 27 | tau-t = 2.0 28 | ref-t = 298.15 29 | nhchainlength = 1 30 | -------------------------------------------------------------------------------- /1_tip4pew_water/mdp/eql2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 500000 ; 1.0 ns 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | 16 | coulombtype = PME 17 | rcoulomb = 1.0 18 | 19 | vdwtype = Cut-off 20 | rvdw = 1.0 21 | DispCorr = EnerPres 22 | 23 | tcoupl = Nose-Hoover 24 | tc-grps = System 25 | tau-t = 2.0 26 | ref-t = 298.15 27 | nhchainlength = 1 28 | 29 | pcoupl = Parrinello-Rahman 30 | tau_p = 2.0 31 | compressibility = 4.46e-5 32 | ref_p = 1.0 33 | -------------------------------------------------------------------------------- /1_tip4pew_water/mdp/min.mdp: -------------------------------------------------------------------------------- 1 | 2 | define = -DFLEXIBLE 3 | integrator = steep 4 | nsteps = 1000 5 | 6 | nstenergy = 500 7 | nstlog = 500 8 | nstxout-compressed = 1000 9 | 10 | constraint-algorithm = lincs 11 | constraints = h-bonds 12 | 13 | cutoff-scheme = Verlet 14 | 15 | coulombtype = PME 16 | rcoulomb = 1.0 17 | 18 | vdwtype = Cut-off 19 | rvdw = 1.0 20 | DispCorr = EnerPres 21 | -------------------------------------------------------------------------------- /1_tip4pew_water/mdp/min2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = steep 3 | nsteps = 50000 4 | 5 | nstenergy = 500 6 | nstlog = 500 7 | nstxout-compressed = 1000 8 | 9 | cutoff-scheme = Verlet 10 | 11 | coulombtype = PME 12 | rcoulomb = 1.0 13 | 14 | vdwtype = Cut-off 15 | rvdw = 1.0 16 | DispCorr = EnerPres 17 | -------------------------------------------------------------------------------- /1_tip4pew_water/mdp/prd.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 5000000 ; 10.0 ns 5 | 6 | nstenergy = 5000 7 | nstlog = 5000 8 | nstxout-compressed = 2000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | 16 | coulombtype = PME 17 | rcoulomb = 1.0 18 | 19 | vdwtype = Cut-off 20 | rvdw = 1.0 21 | DispCorr = EnerPres 22 | 23 | tcoupl = Nose-Hoover 24 | tc-grps = System 25 | tau-t = 2.0 26 | ref-t = 298.15 27 | nhchainlength = 1 28 | 29 | pcoupl = Parrinello-Rahman 30 | tau_p = 2.0 31 | compressibility = 4.46e-5 32 | ref_p = 1.0 33 | -------------------------------------------------------------------------------- /1_tip4pew_water/min-pot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/1_tip4pew_water/min-pot.png -------------------------------------------------------------------------------- /1_tip4pew_water/min-pot.xvg: -------------------------------------------------------------------------------- 1 | # This file was created Sun Aug 16 13:08:09 2015 2 | # Created by: 3 | # :-) GROMACS - gmx energy, VERSION 5.1 (-: 4 | # 5 | # Executable: /usr/bin/gmx 6 | # Data prefix: /usr 7 | # Command line: 8 | # gmx energy -f min.edr -o min-pot.xvg 9 | # gmx energy is part of G R O M A C S: 10 | # 11 | # Good ROcking Metal Altar for Chronical Sinners 12 | # 13 | # title "GROMACS Energies" 14 | # xaxis label "Time (ps)" 15 | # yaxis label "(kJ/mol)" 16 | #TYPE xy 17 | # view 0.15, 0.15, 0.75, 0.85 18 | # legend on 19 | # legend box on 20 | # legend loctype view 21 | # legend 0.78, 0.8 22 | # legend length 2 23 | # s0 legend "Potential" 24 | 0.000000 -480.234741 25 | 1.000000 -4677.069824 26 | 2.000000 -8259.133789 27 | 3.000000 -10967.286133 28 | 4.000000 -12947.333984 29 | 5.000000 -14499.484375 30 | 6.000000 -15848.642578 31 | 7.000000 -16700.148438 32 | 8.000000 -17046.246094 33 | 9.000000 -17343.705078 34 | 10.000000 -17643.214844 35 | 11.000000 -17846.705078 36 | 12.000000 -18078.466797 37 | 13.000000 -18088.111328 38 | 15.000000 -18234.722656 39 | 16.000000 -18343.763672 40 | 18.000000 -18437.906250 41 | 20.000000 -18549.773438 42 | 21.000000 -18607.337891 43 | 22.000000 -18681.429688 44 | 24.000000 -18779.896484 45 | 25.000000 -18860.632812 46 | 26.000000 -19027.177734 47 | 28.000000 -19080.914062 48 | 29.000000 -19124.884766 49 | 30.000000 -19179.751953 50 | 32.000000 -19235.617188 51 | 33.000000 -19271.236328 52 | 34.000000 -19338.800781 53 | 36.000000 -19387.169922 54 | 37.000000 -19424.798828 55 | 38.000000 -19481.923828 56 | 39.000000 -19491.316406 57 | 40.000000 -19563.939453 58 | 42.000000 -19599.091797 59 | 43.000000 -19621.779297 60 | 44.000000 -19642.824219 61 | 45.000000 -19664.318359 62 | 47.000000 -19728.697266 63 | 48.000000 -19767.390625 64 | 49.000000 -19845.669922 65 | 51.000000 -19869.312500 66 | 52.000000 -19885.654297 67 | 53.000000 -19905.378906 68 | 55.000000 -19943.375000 69 | 56.000000 -19968.919922 70 | 57.000000 -20016.095703 71 | 59.000000 -20035.453125 72 | 60.000000 -20049.203125 73 | 61.000000 -20070.371094 74 | 63.000000 -20094.636719 75 | 64.000000 -20115.572266 76 | 65.000000 -20144.974609 77 | 67.000000 -20160.798828 78 | 68.000000 -20174.394531 79 | 69.000000 -20191.781250 80 | 70.000000 -20195.248047 81 | 71.000000 -20220.771484 82 | 73.000000 -20238.921875 83 | 74.000000 -20245.097656 84 | 75.000000 -20267.398438 85 | 77.000000 -20284.095703 86 | 78.000000 -20293.658203 87 | 79.000000 -20313.673828 88 | 81.000000 -20326.222656 89 | 82.000000 -20336.193359 90 | 83.000000 -20347.832031 91 | 84.000000 -20353.748047 92 | 85.000000 -20358.693359 93 | 86.000000 -20366.400391 94 | 88.000000 -20395.863281 95 | 90.000000 -20406.265625 96 | 91.000000 -20416.507812 97 | 92.000000 -20421.312500 98 | 93.000000 -20430.060547 99 | 94.000000 -20430.111328 100 | 96.000000 -20458.412109 101 | 97.000000 -20479.421875 102 | 98.000000 -20491.208984 103 | 99.000000 -20496.232422 104 | 100.000000 -20506.355469 105 | 102.000000 -20517.441406 106 | 103.000000 -20523.056641 107 | 104.000000 -20545.382812 108 | 106.000000 -20550.970703 109 | 107.000000 -20558.611328 110 | 108.000000 -20560.332031 111 | 109.000000 -20567.900391 112 | 111.000000 -20581.251953 113 | 112.000000 -20587.730469 114 | 113.000000 -20598.427734 115 | 115.000000 -20605.414062 116 | 116.000000 -20610.937500 117 | 117.000000 -20620.890625 118 | 119.000000 -20626.888672 119 | 120.000000 -20632.310547 120 | 121.000000 -20637.500000 121 | 122.000000 -20641.941406 122 | 123.000000 -20645.212891 123 | 124.000000 -20647.441406 124 | 125.000000 -20648.281250 125 | 127.000000 -20668.787109 126 | 129.000000 -20674.541016 127 | 130.000000 -20685.810547 128 | 132.000000 -20691.826172 129 | 133.000000 -20695.330078 130 | 134.000000 -20700.876953 131 | 135.000000 -20702.248047 132 | 136.000000 -20703.445312 133 | 137.000000 -20706.380859 134 | 139.000000 -20724.964844 135 | 140.000000 -20727.710938 136 | 141.000000 -20737.500000 137 | 143.000000 -20743.035156 138 | 144.000000 -20746.865234 139 | 145.000000 -20754.701172 140 | 147.000000 -20759.390625 141 | 148.000000 -20763.476562 142 | 149.000000 -20767.544922 143 | 150.000000 -20770.880859 144 | 151.000000 -20773.455078 145 | 152.000000 -20775.476562 146 | 153.000000 -20775.628906 147 | 155.000000 -20791.585938 148 | 157.000000 -20798.068359 149 | 158.000000 -20807.412109 150 | 160.000000 -20811.804688 151 | 161.000000 -20814.855469 152 | 162.000000 -20819.240234 153 | 163.000000 -20820.345703 154 | 164.000000 -20822.509766 155 | 165.000000 -20823.656250 156 | 167.000000 -20837.513672 157 | 168.000000 -20839.931641 158 | 169.000000 -20848.408203 159 | 171.000000 -20852.605469 160 | 172.000000 -20855.712891 161 | 173.000000 -20861.126953 162 | 175.000000 -20865.044922 163 | 176.000000 -20868.689453 164 | 177.000000 -20872.519531 165 | 178.000000 -20875.031250 166 | 179.000000 -20878.232422 167 | 180.000000 -20879.509766 168 | 181.000000 -20881.460938 169 | 183.000000 -20891.769531 170 | 185.000000 -20898.099609 171 | 186.000000 -20905.927734 172 | 188.000000 -20909.845703 173 | 189.000000 -20912.923828 174 | 190.000000 -20916.359375 175 | 191.000000 -20918.777344 176 | 192.000000 -20921.453125 177 | 193.000000 -20923.156250 178 | 194.000000 -20924.541016 179 | 196.000000 -20933.898438 180 | 197.000000 -20938.632812 181 | 198.000000 -20954.044922 182 | 200.000000 -20955.939453 183 | 201.000000 -20958.675781 184 | 203.000000 -20963.537109 185 | 204.000000 -20966.302734 186 | 205.000000 -20973.957031 187 | 207.000000 -20977.078125 188 | 208.000000 -20979.052734 189 | 209.000000 -20982.832031 190 | 211.000000 -20985.908203 191 | 212.000000 -20988.716797 192 | 213.000000 -20991.761719 193 | 214.000000 -20993.601562 194 | 215.000000 -20996.447266 195 | 216.000000 -20997.457031 196 | 217.000000 -20999.839844 197 | 219.000000 -21005.583984 198 | 220.000000 -21006.638672 199 | 221.000000 -21020.882812 200 | 223.000000 -21022.613281 201 | 224.000000 -21024.908203 202 | 226.000000 -21029.046875 203 | 227.000000 -21033.027344 204 | 228.000000 -21037.335938 205 | 229.000000 -21038.466797 206 | 230.000000 -21042.550781 207 | 232.000000 -21045.548828 208 | 233.000000 -21047.986328 209 | 234.000000 -21051.900391 210 | 236.000000 -21054.398438 211 | 237.000000 -21056.667969 212 | 238.000000 -21059.224609 213 | 239.000000 -21060.833984 214 | 240.000000 -21063.156250 215 | 241.000000 -21063.910156 216 | 242.000000 -21065.664062 217 | 244.000000 -21072.054688 218 | 245.000000 -21074.855469 219 | 246.000000 -21079.773438 220 | 248.000000 -21086.304688 221 | 249.000000 -21086.587891 222 | 250.000000 -21091.828125 223 | 252.000000 -21094.390625 224 | 253.000000 -21095.750000 225 | 254.000000 -21098.705078 226 | 256.000000 -21101.234375 227 | 257.000000 -21103.177734 228 | 258.000000 -21105.867188 229 | 259.000000 -21106.394531 230 | 260.000000 -21109.058594 231 | 262.000000 -21112.166016 232 | 263.000000 -21113.607422 233 | 264.000000 -21117.964844 234 | 266.000000 -21119.695312 235 | 267.000000 -21121.064453 236 | 268.000000 -21122.539062 237 | 269.000000 -21123.433594 238 | 270.000000 -21124.332031 239 | 271.000000 -21124.384766 240 | 273.000000 -21130.449219 241 | 274.000000 -21132.636719 242 | 275.000000 -21139.585938 243 | 277.000000 -21140.917969 244 | 278.000000 -21142.005859 245 | 279.000000 -21143.072266 246 | 280.000000 -21143.425781 247 | 281.000000 -21143.947266 248 | 283.000000 -21149.044922 249 | 285.000000 -21151.160156 250 | 286.000000 -21153.107422 251 | 287.000000 -21153.832031 252 | 288.000000 -21155.839844 253 | 290.000000 -21157.789062 254 | 291.000000 -21159.138672 255 | 292.000000 -21161.677734 256 | 294.000000 -21163.037109 257 | 295.000000 -21164.197266 258 | 296.000000 -21165.494141 259 | 297.000000 -21166.244141 260 | 298.000000 -21167.208984 261 | 299.000000 -21167.410156 262 | 300.000000 -21167.615234 263 | 302.000000 -21172.619141 264 | 304.000000 -21175.482422 265 | 305.000000 -21178.267578 266 | 307.000000 -21179.441406 267 | 308.000000 -21180.583984 268 | 309.000000 -21181.556641 269 | 310.000000 -21182.697266 270 | 311.000000 -21183.216797 271 | 312.000000 -21184.302734 272 | 314.000000 -21186.544922 273 | 315.000000 -21187.830078 274 | 316.000000 -21190.460938 275 | 318.000000 -21191.570312 276 | 319.000000 -21192.378906 277 | 320.000000 -21193.546875 278 | 321.000000 -21193.761719 279 | 322.000000 -21194.958984 280 | 324.000000 -21197.160156 281 | 325.000000 -21197.671875 282 | 326.000000 -21200.345703 283 | 328.000000 -21201.472656 284 | 329.000000 -21202.095703 285 | 330.000000 -21203.339844 286 | 332.000000 -21204.703125 287 | 333.000000 -21205.875000 288 | 334.000000 -21207.455078 289 | 335.000000 -21207.460938 290 | 336.000000 -21209.144531 291 | 338.000000 -21210.830078 292 | 339.000000 -21211.279297 293 | 340.000000 -21213.546875 294 | 342.000000 -21214.562500 295 | 343.000000 -21215.308594 296 | 344.000000 -21216.277344 297 | 345.000000 -21216.658203 298 | 346.000000 -21217.322266 299 | 348.000000 -21219.830078 300 | 349.000000 -21222.048828 301 | 350.000000 -21226.179688 302 | 352.000000 -21226.882812 303 | 353.000000 -21228.099609 304 | 354.000000 -21228.224609 305 | 355.000000 -21229.589844 306 | 357.000000 -21231.369141 307 | 358.000000 -21231.894531 308 | 359.000000 -21233.945312 309 | 361.000000 -21235.056641 310 | 362.000000 -21235.712891 311 | 363.000000 -21237.042969 312 | 365.000000 -21238.173828 313 | 366.000000 -21239.181641 314 | 367.000000 -21240.427734 315 | 368.000000 -21240.763672 316 | 369.000000 -21241.998047 317 | 371.000000 -21243.593750 318 | 372.000000 -21244.623047 319 | 373.000000 -21246.875000 320 | 375.000000 -21247.779297 321 | 376.000000 -21248.632812 322 | 377.000000 -21249.359375 323 | 378.000000 -21250.121094 324 | 379.000000 -21250.443359 325 | 380.000000 -21251.003906 326 | 382.000000 -21253.802734 327 | 383.000000 -21254.392578 328 | 384.000000 -21257.855469 329 | 386.000000 -21258.816406 330 | 387.000000 -21259.421875 331 | 388.000000 -21260.390625 332 | 389.000000 -21260.402344 333 | 390.000000 -21261.294922 334 | 392.000000 -21264.144531 335 | 394.000000 -21265.322266 336 | 395.000000 -21266.460938 337 | 396.000000 -21267.193359 338 | 397.000000 -21268.289062 339 | 398.000000 -21268.617188 340 | 399.000000 -21269.468750 341 | 401.000000 -21272.042969 342 | 402.000000 -21273.843750 343 | 403.000000 -21278.031250 344 | 405.000000 -21278.912109 345 | 406.000000 -21280.179688 346 | 407.000000 -21280.519531 347 | 408.000000 -21281.912109 348 | 410.000000 -21283.976562 349 | 411.000000 -21284.908203 350 | 412.000000 -21287.333984 351 | 414.000000 -21288.587891 352 | 415.000000 -21289.472656 353 | 416.000000 -21290.904297 354 | 417.000000 -21291.029297 355 | 418.000000 -21292.654297 356 | 420.000000 -21294.765625 357 | 421.000000 -21295.259766 358 | 422.000000 -21297.779297 359 | 424.000000 -21299.115234 360 | 425.000000 -21299.855469 361 | 426.000000 -21301.431641 362 | 428.000000 -21302.816406 363 | 429.000000 -21303.990234 364 | 430.000000 -21305.531250 365 | 431.000000 -21305.837891 366 | 432.000000 -21307.404297 367 | 434.000000 -21309.376953 368 | 435.000000 -21310.453125 369 | 436.000000 -21313.203125 370 | 438.000000 -21314.367188 371 | 439.000000 -21315.400391 372 | 440.000000 -21316.435547 373 | 441.000000 -21317.271484 374 | 442.000000 -21317.898438 375 | 443.000000 -21318.382812 376 | 445.000000 -21322.199219 377 | 446.000000 -21323.853516 378 | 447.000000 -21328.792969 379 | 449.000000 -21330.019531 380 | 450.000000 -21331.027344 381 | 451.000000 -21332.125000 382 | 452.000000 -21332.494141 383 | 453.000000 -21333.283203 384 | 455.000000 -21337.125000 385 | 456.000000 -21337.173828 386 | 457.000000 -21342.308594 387 | 459.000000 -21343.378906 388 | 460.000000 -21343.972656 389 | 461.000000 -21344.908203 390 | 463.000000 -21347.115234 391 | 464.000000 -21348.287109 392 | 465.000000 -21351.039062 393 | 467.000000 -21352.037109 394 | 468.000000 -21352.697266 395 | 469.000000 -21353.681641 396 | 470.000000 -21353.773438 397 | 471.000000 -21354.718750 398 | 473.000000 -21357.042969 399 | 474.000000 -21357.091797 400 | 475.000000 -21360.013672 401 | 477.000000 -21360.970703 402 | 478.000000 -21361.408203 403 | 479.000000 -21362.406250 404 | 481.000000 -21363.847656 405 | 482.000000 -21364.751953 406 | 483.000000 -21366.486328 407 | 485.000000 -21367.394531 408 | 486.000000 -21368.109375 409 | 487.000000 -21369.115234 410 | 488.000000 -21369.320312 411 | 489.000000 -21370.449219 412 | 491.000000 -21371.976562 413 | 492.000000 -21372.511719 414 | 493.000000 -21374.380859 415 | 495.000000 -21375.337891 416 | 496.000000 -21375.951172 417 | 497.000000 -21377.062500 418 | 498.000000 -21377.072266 419 | 499.000000 -21378.330078 420 | 501.000000 -21380.033203 421 | 502.000000 -21380.291016 422 | 503.000000 -21382.378906 423 | 505.000000 -21383.417969 424 | 506.000000 -21383.935547 425 | 507.000000 -21385.158203 426 | 509.000000 -21386.302734 427 | 510.000000 -21387.218750 428 | 511.000000 -21388.552734 429 | 512.000000 -21388.654297 430 | 513.000000 -21390.035156 431 | 515.000000 -21391.583984 432 | 516.000000 -21392.074219 433 | 517.000000 -21394.166016 434 | 519.000000 -21395.080078 435 | 520.000000 -21395.742188 436 | 521.000000 -21396.593750 437 | 522.000000 -21396.937500 438 | 523.000000 -21397.509766 439 | 525.000000 -21399.804688 440 | 526.000000 -21401.853516 441 | 527.000000 -21403.294922 442 | 529.000000 -21404.841797 443 | 530.000000 -21405.146484 444 | 531.000000 -21406.855469 445 | 533.000000 -21407.886719 446 | 534.000000 -21408.398438 447 | 535.000000 -21409.625000 448 | 537.000000 -21410.601562 449 | 538.000000 -21411.337891 450 | 539.000000 -21412.410156 451 | 540.000000 -21412.591797 452 | 541.000000 -21413.638672 453 | 543.000000 -21415.095703 454 | 544.000000 -21415.693359 455 | 545.000000 -21417.777344 456 | 547.000000 -21418.509766 457 | 548.000000 -21419.154297 458 | 549.000000 -21419.753906 459 | 550.000000 -21420.228516 460 | 551.000000 -21420.437500 461 | 552.000000 -21420.630859 462 | 554.000000 -21423.455078 463 | 556.000000 -21424.597656 464 | 557.000000 -21425.623047 465 | 558.000000 -21425.966797 466 | 559.000000 -21427.068359 467 | 561.000000 -21428.107422 468 | 562.000000 -21428.728516 469 | 563.000000 -21430.095703 470 | 565.000000 -21430.832031 471 | 566.000000 -21431.458984 472 | 567.000000 -21432.154297 473 | 568.000000 -21432.537109 474 | 569.000000 -21433.066406 475 | 570.000000 -21433.185547 476 | 571.000000 -21433.207031 477 | 573.000000 -21436.064453 478 | 574.000000 -21436.832031 479 | 575.000000 -21440.929688 480 | 577.000000 -21441.416016 481 | 578.000000 -21441.892578 482 | 579.000000 -21441.976562 483 | 580.000000 -21442.308594 484 | 582.000000 -21444.535156 485 | 584.000000 -21445.353516 486 | 585.000000 -21446.142578 487 | 586.000000 -21446.470703 488 | 587.000000 -21447.275391 489 | 589.000000 -21448.166016 490 | 590.000000 -21448.828125 491 | 591.000000 -21450.042969 492 | 593.000000 -21450.615234 493 | 594.000000 -21451.152344 494 | 595.000000 -21451.652344 495 | 596.000000 -21452.089844 496 | 597.000000 -21452.369141 497 | 598.000000 -21452.673828 498 | 600.000000 -21454.281250 499 | 601.000000 -21455.001953 500 | 602.000000 -21456.968750 501 | 604.000000 -21457.478516 502 | 605.000000 -21457.847656 503 | 606.000000 -21458.355469 504 | 607.000000 -21458.369141 505 | 608.000000 -21458.824219 506 | 610.000000 -21460.458984 507 | 612.000000 -21461.095703 508 | 613.000000 -21461.708984 509 | 614.000000 -21462.058594 510 | 615.000000 -21462.656250 511 | 616.000000 -21462.712891 512 | 617.000000 -21463.148438 513 | 619.000000 -21464.611328 514 | 620.000000 -21465.019531 515 | 621.000000 -21467.218750 516 | 623.000000 -21467.599609 517 | 624.000000 -21468.171875 518 | 625.000000 -21468.244141 519 | 626.000000 -21468.875000 520 | 628.000000 -21469.964844 521 | 629.000000 -21470.185547 522 | 630.000000 -21471.486328 523 | 632.000000 -21472.052734 524 | 633.000000 -21472.332031 525 | 634.000000 -21472.992188 526 | 636.000000 -21473.681641 527 | 637.000000 -21474.208984 528 | 638.000000 -21474.970703 529 | 640.000000 -21475.509766 530 | 641.000000 -21476.001953 531 | 642.000000 -21476.640625 532 | 643.000000 -21476.769531 533 | 644.000000 -21477.566406 534 | 646.000000 -21478.257812 535 | 647.000000 -21478.562500 536 | 648.000000 -21479.332031 537 | 650.000000 -21479.902344 538 | 651.000000 -21480.345703 539 | 652.000000 -21481.089844 540 | 654.000000 -21481.572266 541 | 655.000000 -21482.015625 542 | 656.000000 -21482.507812 543 | 657.000000 -21482.787109 544 | 658.000000 -21483.189453 545 | 659.000000 -21483.320312 546 | 660.000000 -21483.470703 547 | 662.000000 -21485.003906 548 | 663.000000 -21486.117188 549 | 664.000000 -21487.302734 550 | 666.000000 -21488.000000 551 | 667.000000 -21488.060547 552 | 668.000000 -21488.757812 553 | 670.000000 -21489.501953 554 | 671.000000 -21489.742188 555 | 672.000000 -21490.730469 556 | 674.000000 -21491.166016 557 | 675.000000 -21491.523438 558 | 676.000000 -21491.898438 559 | 677.000000 -21492.146484 560 | 678.000000 -21492.353516 561 | 679.000000 -21492.433594 562 | 681.000000 -21493.919922 563 | 682.000000 -21494.416016 564 | 683.000000 -21495.867188 565 | 685.000000 -21496.359375 566 | 686.000000 -21496.423828 567 | 687.000000 -21497.013672 568 | 689.000000 -21497.712891 569 | 690.000000 -21497.890625 570 | 691.000000 -21498.689453 571 | 693.000000 -21499.167969 572 | 694.000000 -21499.394531 573 | 695.000000 -21499.978516 574 | 697.000000 -21500.431641 575 | 698.000000 -21500.759766 576 | 699.000000 -21501.210938 577 | 700.000000 -21501.298828 578 | 701.000000 -21501.705078 579 | 703.000000 -21502.453125 580 | 704.000000 -21502.724609 581 | 705.000000 -21503.812500 582 | 707.000000 -21504.101562 583 | 708.000000 -21504.419922 584 | 709.000000 -21504.556641 585 | 710.000000 -21504.859375 586 | 712.000000 -21505.539062 587 | 713.000000 -21505.802734 588 | 714.000000 -21506.582031 589 | 716.000000 -21506.896484 590 | 717.000000 -21507.076172 591 | 718.000000 -21507.455078 592 | 720.000000 -21507.845703 593 | 721.000000 -21508.136719 594 | 722.000000 -21508.576172 595 | 724.000000 -21508.892578 596 | 725.000000 -21509.160156 597 | 726.000000 -21509.564453 598 | 728.000000 -21509.841797 599 | 729.000000 -21510.113281 600 | 730.000000 -21510.382812 601 | 731.000000 -21510.564453 602 | 732.000000 -21510.763672 603 | 733.000000 -21510.863281 604 | 734.000000 -21510.880859 605 | 736.000000 -21511.808594 606 | 737.000000 -21512.640625 607 | 738.000000 -21512.929688 608 | 740.000000 -21513.617188 609 | 742.000000 -21513.876953 610 | 743.000000 -21514.150391 611 | 744.000000 -21514.306641 612 | 745.000000 -21514.556641 613 | 746.000000 -21514.607422 614 | 747.000000 -21514.794922 615 | 749.000000 -21515.431641 616 | 750.000000 -21515.771484 617 | 751.000000 -21516.490234 618 | 753.000000 -21516.708984 619 | 754.000000 -21516.921875 620 | 755.000000 -21517.062500 621 | 756.000000 -21517.279297 622 | 758.000000 -21517.673828 623 | 759.000000 -21518.087891 624 | 760.000000 -21518.568359 625 | 762.000000 -21518.798828 626 | 763.000000 -21518.992188 627 | 764.000000 -21519.234375 628 | 765.000000 -21519.322266 629 | 766.000000 -21519.568359 630 | 768.000000 -21519.976562 631 | 769.000000 -21520.232422 632 | 770.000000 -21520.759766 633 | 772.000000 -21520.986328 634 | 773.000000 -21521.167969 635 | 774.000000 -21521.402344 636 | 775.000000 -21521.466797 637 | 776.000000 -21521.716797 638 | 778.000000 -21522.171875 639 | 779.000000 -21522.373047 640 | 780.000000 -21522.960938 641 | 782.000000 -21523.183594 642 | 783.000000 -21523.332031 643 | 784.000000 -21523.580078 644 | 785.000000 -21523.636719 645 | 786.000000 -21523.875000 646 | 788.000000 -21524.361328 647 | 789.000000 -21524.511719 648 | 790.000000 -21525.152344 649 | 792.000000 -21525.386719 650 | 793.000000 -21525.525391 651 | 794.000000 -21525.763672 652 | 795.000000 -21525.800781 653 | 796.000000 -21526.015625 654 | 798.000000 -21526.560547 655 | 799.000000 -21526.630859 656 | 800.000000 -21527.349609 657 | 802.000000 -21527.562500 658 | 803.000000 -21527.699219 659 | 804.000000 -21527.912109 660 | 806.000000 -21528.275391 661 | 807.000000 -21528.623047 662 | 808.000000 -21529.072266 663 | 810.000000 -21529.285156 664 | 811.000000 -21529.468750 665 | 812.000000 -21529.675781 666 | 813.000000 -21529.783203 667 | 814.000000 -21529.994141 668 | 816.000000 -21530.382812 669 | 817.000000 -21530.628906 670 | 818.000000 -21531.117188 671 | 820.000000 -21531.320312 672 | 821.000000 -21531.474609 673 | 822.000000 -21531.687500 674 | 823.000000 -21531.744141 675 | 824.000000 -21531.949219 676 | 826.000000 -21532.373047 677 | 827.000000 -21532.527344 678 | 828.000000 -21533.060547 679 | 830.000000 -21533.265625 680 | 831.000000 -21533.382812 681 | 832.000000 -21533.595703 682 | 833.000000 -21533.619141 683 | 834.000000 -21533.822266 684 | 836.000000 -21534.273438 685 | 837.000000 -21534.324219 686 | 838.000000 -21534.898438 687 | 840.000000 -21535.099609 688 | 841.000000 -21535.201172 689 | 842.000000 -21535.400391 690 | 844.000000 -21535.699219 691 | 845.000000 -21535.943359 692 | 846.000000 -21536.296875 693 | 848.000000 -21536.478516 694 | 849.000000 -21536.630859 695 | 850.000000 -21536.818359 696 | 851.000000 -21536.876953 697 | 852.000000 -21537.089844 698 | 854.000000 -21537.390625 699 | 855.000000 -21537.542969 700 | 856.000000 -21537.927734 701 | 858.000000 -21538.101562 702 | 859.000000 -21538.236328 703 | 860.000000 -21538.417969 704 | 861.000000 -21538.437500 705 | 862.000000 -21538.660156 706 | 864.000000 -21538.992188 707 | 865.000000 -21539.076172 708 | 866.000000 -21539.458984 709 | 868.000000 -21539.644531 710 | 869.000000 -21539.742188 711 | 870.000000 -21539.943359 712 | 872.000000 -21540.156250 713 | 873.000000 -21540.339844 714 | 874.000000 -21540.593750 715 | 875.000000 -21540.595703 716 | 876.000000 -21540.861328 717 | 878.000000 -21541.123047 718 | 879.000000 -21541.201172 719 | 880.000000 -21541.564453 720 | 882.000000 -21541.724609 721 | 883.000000 -21541.847656 722 | 884.000000 -21542.000000 723 | 885.000000 -21542.044922 724 | 886.000000 -21542.167969 725 | 887.000000 -21542.201172 726 | 889.000000 -21542.742188 727 | 890.000000 -21543.072266 728 | 891.000000 -21543.542969 729 | 893.000000 -21543.804688 730 | 895.000000 -21543.966797 731 | 896.000000 -21544.119141 732 | 897.000000 -21544.275391 733 | 898.000000 -21544.378906 734 | 899.000000 -21544.513672 735 | 900.000000 -21544.583984 736 | 901.000000 -21544.623047 737 | 902.000000 -21544.650391 738 | 904.000000 -21545.296875 739 | 906.000000 -21545.550781 740 | 907.000000 -21545.810547 741 | 908.000000 -21545.845703 742 | 909.000000 -21546.121094 743 | 911.000000 -21546.341797 744 | 912.000000 -21546.460938 745 | 913.000000 -21546.759766 746 | 915.000000 -21546.931641 747 | 916.000000 -21547.074219 748 | 917.000000 -21547.246094 749 | 918.000000 -21547.320312 750 | 919.000000 -21547.439453 751 | 920.000000 -21547.474609 752 | 921.000000 -21547.490234 753 | 923.000000 -21548.138672 754 | 924.000000 -21548.621094 755 | 925.000000 -21549.052734 756 | 927.000000 -21549.289062 757 | 928.000000 -21549.314453 758 | 929.000000 -21549.542969 759 | 931.000000 -21549.841797 760 | 932.000000 -21549.966797 761 | 933.000000 -21550.361328 762 | 935.000000 -21550.533203 763 | 936.000000 -21550.669922 764 | 937.000000 -21550.798828 765 | 938.000000 -21550.921875 766 | 939.000000 -21550.972656 767 | 940.000000 -21551.044922 768 | 942.000000 -21551.609375 769 | 943.000000 -21551.617188 770 | 944.000000 -21552.386719 771 | 946.000000 -21552.548828 772 | 947.000000 -21552.630859 773 | 948.000000 -21552.796875 774 | 950.000000 -21553.148438 775 | 951.000000 -21553.412109 776 | 952.000000 -21553.863281 777 | 954.000000 -21554.046875 778 | 955.000000 -21554.177734 779 | 956.000000 -21554.380859 780 | 957.000000 -21554.429688 781 | 958.000000 -21554.650391 782 | 960.000000 -21555.011719 783 | 961.000000 -21555.150391 784 | 962.000000 -21555.619141 785 | 964.000000 -21555.832031 786 | 965.000000 -21555.960938 787 | 966.000000 -21556.205078 788 | 967.000000 -21556.228516 789 | 968.000000 -21556.515625 790 | 970.000000 -21556.914062 791 | 971.000000 -21557.011719 792 | 972.000000 -21557.501953 793 | 974.000000 -21557.767578 794 | 975.000000 -21557.925781 795 | 976.000000 -21558.244141 796 | 977.000000 -21558.263672 797 | 978.000000 -21558.638672 798 | 980.000000 -21559.083984 799 | 981.000000 -21559.318359 800 | 982.000000 -21559.583984 801 | 983.000000 -21559.671875 802 | 984.000000 -21559.830078 803 | 986.000000 -21560.691406 804 | 987.000000 -21561.238281 805 | 989.000000 -21561.556641 806 | 990.000000 -21561.880859 807 | 991.000000 -21562.214844 808 | 992.000000 -21562.449219 809 | 993.000000 -21562.773438 810 | 994.000000 -21562.804688 811 | 995.000000 -21563.144531 812 | 997.000000 -21564.318359 813 | 998.000000 -21564.833984 814 | 1000.000000 -21565.421875 815 | 1001.000000 -21565.771484 816 | 1002.000000 -21566.117188 817 | 1003.000000 -21566.408203 818 | 1004.000000 -21566.509766 819 | 1005.000000 -21566.726562 820 | 1007.000000 -21568.250000 821 | 1008.000000 -21568.845703 822 | 1010.000000 -21569.457031 823 | 1011.000000 -21569.554688 824 | 1012.000000 -21570.125000 825 | 1014.000000 -21570.738281 826 | 1015.000000 -21571.103516 827 | 1016.000000 -21571.441406 828 | 1017.000000 -21571.466797 829 | 1018.000000 -21571.806641 830 | 1020.000000 -21572.609375 831 | 1022.000000 -21572.923828 832 | 1023.000000 -21573.246094 833 | 1024.000000 -21573.398438 834 | 1025.000000 -21573.693359 835 | 1026.000000 -21573.710938 836 | 1027.000000 -21573.884766 837 | 1029.000000 -21574.642578 838 | 1030.000000 -21574.908203 839 | 1031.000000 -21575.835938 840 | 1033.000000 -21576.007812 841 | 1034.000000 -21576.253906 842 | 1035.000000 -21576.273438 843 | 1036.000000 -21576.546875 844 | 1038.000000 -21577.035156 845 | 1039.000000 -21577.089844 846 | 1040.000000 -21577.716797 847 | 1042.000000 -21577.970703 848 | 1043.000000 -21578.091797 849 | 1044.000000 -21578.380859 850 | 1046.000000 -21578.728516 851 | 1047.000000 -21578.960938 852 | 1048.000000 -21579.349609 853 | 1050.000000 -21579.599609 854 | 1051.000000 -21579.814453 855 | 1052.000000 -21580.107422 856 | 1053.000000 -21580.187500 857 | 1054.000000 -21580.548828 858 | 1056.000000 -21580.892578 859 | 1057.000000 -21581.087891 860 | 1058.000000 -21581.490234 861 | 1060.000000 -21581.767578 862 | 1061.000000 -21582.017578 863 | 1062.000000 -21582.369141 864 | 1063.000000 -21582.443359 865 | 1064.000000 -21582.876953 866 | 1066.000000 -21583.246094 867 | 1067.000000 -21583.443359 868 | 1068.000000 -21583.875000 869 | 1070.000000 -21584.177734 870 | 1071.000000 -21584.498047 871 | 1072.000000 -21584.785156 872 | 1073.000000 -21584.949219 873 | 1074.000000 -21585.269531 874 | 1076.000000 -21585.791016 875 | 1077.000000 -21586.207031 876 | 1078.000000 -21586.308594 877 | 1079.000000 -21586.769531 878 | 1081.000000 -21587.273438 879 | 1082.000000 -21587.642578 880 | 1083.000000 -21587.843750 881 | 1084.000000 -21588.173828 882 | 1086.000000 -21588.830078 883 | 1087.000000 -21589.330078 884 | 1088.000000 -21589.560547 885 | 1089.000000 -21590.001953 886 | 1091.000000 -21590.656250 887 | 1092.000000 -21591.171875 888 | 1093.000000 -21591.386719 889 | 1094.000000 -21591.894531 890 | 1096.000000 -21592.603516 891 | 1097.000000 -21593.123047 892 | 1098.000000 -21593.384766 893 | 1099.000000 -21593.884766 894 | 1101.000000 -21594.648438 895 | 1102.000000 -21595.212891 896 | 1103.000000 -21595.613281 897 | 1104.000000 -21595.863281 898 | 1105.000000 -21596.097656 899 | 1106.000000 -21596.238281 900 | 1108.000000 -21597.888672 901 | 1109.000000 -21598.656250 902 | 1111.000000 -21599.058594 903 | 1112.000000 -21599.474609 904 | 1113.000000 -21599.712891 905 | 1114.000000 -21600.087891 906 | 1116.000000 -21601.093750 907 | 1117.000000 -21601.732422 908 | 1119.000000 -21602.152344 909 | 1120.000000 -21602.505859 910 | 1121.000000 -21602.878906 911 | 1122.000000 -21603.123047 912 | 1123.000000 -21603.312500 913 | 1124.000000 -21603.492188 914 | 1126.000000 -21604.607422 915 | 1127.000000 -21605.208984 916 | 1129.000000 -21605.755859 917 | 1130.000000 -21605.906250 918 | 1131.000000 -21606.476562 919 | 1133.000000 -21606.861328 920 | 1134.000000 -21607.074219 921 | 1135.000000 -21607.548828 922 | 1137.000000 -21607.867188 923 | 1138.000000 -21608.111328 924 | 1139.000000 -21608.433594 925 | 1140.000000 -21608.525391 926 | 1141.000000 -21608.791016 927 | 1143.000000 -21609.326172 928 | 1144.000000 -21609.726562 929 | 1145.000000 -21610.019531 930 | 1147.000000 -21610.390625 931 | 1148.000000 -21610.597656 932 | 1149.000000 -21611.050781 933 | 1151.000000 -21611.294922 934 | 1152.000000 -21611.453125 935 | 1153.000000 -21611.740234 936 | 1155.000000 -21612.007812 937 | 1156.000000 -21612.210938 938 | 1157.000000 -21612.480469 939 | 1158.000000 -21612.511719 940 | 1159.000000 -21612.755859 941 | 1161.000000 -21613.144531 942 | 1162.000000 -21613.332031 943 | 1163.000000 -21613.742188 944 | 1165.000000 -21613.953125 945 | 1166.000000 -21614.076172 946 | 1167.000000 -21614.347656 947 | 1169.000000 -21614.531250 948 | 1170.000000 -21614.716797 949 | 1171.000000 -21614.914062 950 | 1172.000000 -21615.027344 951 | 1173.000000 -21615.169922 952 | 1174.000000 -21615.259766 953 | 1175.000000 -21615.302734 954 | 1176.000000 -21615.353516 955 | 1178.000000 -21615.992188 956 | 1179.000000 -21616.035156 957 | 1180.000000 -21616.708984 958 | 1182.000000 -21616.896484 959 | 1183.000000 -21616.933594 960 | 1184.000000 -21617.113281 961 | 1186.000000 -21617.416016 962 | 1187.000000 -21617.572266 963 | 1188.000000 -21617.894531 964 | 1190.000000 -21618.062500 965 | 1191.000000 -21618.173828 966 | 1192.000000 -21618.375000 967 | 1193.000000 -21618.384766 968 | 1194.000000 -21618.615234 969 | 1196.000000 -21618.867188 970 | 1197.000000 -21618.966797 971 | 1198.000000 -21619.261719 972 | 1200.000000 -21619.433594 973 | 1201.000000 -21619.539062 974 | 1202.000000 -21619.738281 975 | 1203.000000 -21619.750000 976 | 1204.000000 -21619.976562 977 | 1206.000000 -21620.234375 978 | 1207.000000 -21620.308594 979 | 1208.000000 -21620.599609 980 | 1210.000000 -21620.761719 981 | 1211.000000 -21620.865234 982 | 1212.000000 -21621.087891 983 | 1214.000000 -21621.250000 984 | 1215.000000 -21621.394531 985 | 1216.000000 -21621.585938 986 | 1217.000000 -21621.650391 987 | 1218.000000 -21621.847656 988 | 1220.000000 -21622.080078 989 | 1221.000000 -21622.232422 990 | 1222.000000 -21622.542969 991 | 1224.000000 -21622.685547 992 | 1225.000000 -21622.820312 993 | 1226.000000 -21622.968750 994 | 1227.000000 -21623.068359 995 | 1228.000000 -21623.175781 996 | 1229.000000 -21623.230469 997 | 1230.000000 -21623.248047 998 | 1232.000000 -21623.822266 999 | 1233.000000 -21624.224609 1000 | 1234.000000 -21624.353516 1001 | 1236.000000 -21624.757812 1002 | 1237.000000 -21624.937500 1003 | 1238.000000 -21625.367188 1004 | 1240.000000 -21625.535156 1005 | 1241.000000 -21625.644531 1006 | 1242.000000 -21625.830078 1007 | 1244.000000 -21626.074219 1008 | 1245.000000 -21626.302734 1009 | 1246.000000 -21626.558594 1010 | 1247.000000 -21626.566406 1011 | 1248.000000 -21626.849609 1012 | 1250.000000 -21627.148438 1013 | 1251.000000 -21627.234375 1014 | 1252.000000 -21627.611328 1015 | 1254.000000 -21627.802734 1016 | 1255.000000 -21627.941406 1017 | 1256.000000 -21628.126953 1018 | 1257.000000 -21628.187500 1019 | 1258.000000 -21628.363281 1020 | 1260.000000 -21628.775391 1021 | 1261.000000 -21629.119141 1022 | 1262.000000 -21629.283203 1023 | 1263.000000 -21629.291016 1024 | 1264.000000 -21629.441406 1025 | 1266.000000 -21630.033203 1026 | 1267.000000 -21630.167969 1027 | 1268.000000 -21630.740234 1028 | 1270.000000 -21630.998047 1029 | 1271.000000 -21631.056641 1030 | 1272.000000 -21631.361328 1031 | 1274.000000 -21631.679688 1032 | 1275.000000 -21631.843750 1033 | 1276.000000 -21632.212891 1034 | 1278.000000 -21632.445312 1035 | 1279.000000 -21632.648438 1036 | 1280.000000 -21632.945312 1037 | 1281.000000 -21633.001953 1038 | 1282.000000 -21633.328125 1039 | 1284.000000 -21633.669922 1040 | 1285.000000 -21633.830078 1041 | 1286.000000 -21634.236328 1042 | 1288.000000 -21634.488281 1043 | 1289.000000 -21634.689453 1044 | 1290.000000 -21634.986328 1045 | 1291.000000 -21634.996094 1046 | 1292.000000 -21635.375000 1047 | 1294.000000 -21635.738281 1048 | 1295.000000 -21635.822266 1049 | 1296.000000 -21636.244141 1050 | 1298.000000 -21636.523438 1051 | 1299.000000 -21636.650391 1052 | 1300.000000 -21636.982422 1053 | 1302.000000 -21637.214844 1054 | 1303.000000 -21637.382812 1055 | 1304.000000 -21637.625000 1056 | 1305.000000 -21637.679688 1057 | 1306.000000 -21637.900391 1058 | 1308.000000 -21638.269531 1059 | 1309.000000 -21638.435547 1060 | 1310.000000 -21638.951172 1061 | 1312.000000 -21639.109375 1062 | 1313.000000 -21639.259766 1063 | 1314.000000 -21639.357422 1064 | 1315.000000 -21639.500000 1065 | 1317.000000 -21639.833984 1066 | 1318.000000 -21640.070312 1067 | 1319.000000 -21640.433594 1068 | 1321.000000 -21640.585938 1069 | 1322.000000 -21640.703125 1070 | 1323.000000 -21640.867188 1071 | 1324.000000 -21640.888672 1072 | 1325.000000 -21641.052734 1073 | 1327.000000 -21641.371094 1074 | 1328.000000 -21641.433594 1075 | 1329.000000 -21641.822266 1076 | 1331.000000 -21641.970703 1077 | 1332.000000 -21642.048828 1078 | 1333.000000 -21642.220703 1079 | 1335.000000 -21642.433594 1080 | 1336.000000 -21642.580078 1081 | 1337.000000 -21642.804688 1082 | 1339.000000 -21642.949219 1083 | 1340.000000 -21643.072266 1084 | 1341.000000 -21643.238281 1085 | 1342.000000 -21643.281250 1086 | 1343.000000 -21643.460938 1087 | 1345.000000 -21643.658203 1088 | 1346.000000 -21643.765625 1089 | 1347.000000 -21644.017578 1090 | 1349.000000 -21644.164062 1091 | 1350.000000 -21644.263672 1092 | 1351.000000 -21644.431641 1093 | 1353.000000 -21644.574219 1094 | 1354.000000 -21644.724609 1095 | 1355.000000 -21644.886719 1096 | 1356.000000 -21644.958984 1097 | 1357.000000 -21645.113281 1098 | 1359.000000 -21645.304688 1099 | 1360.000000 -21645.437500 1100 | 1361.000000 -21645.681641 1101 | 1363.000000 -21645.812500 1102 | 1364.000000 -21645.919922 1103 | 1365.000000 -21646.031250 1104 | 1366.000000 -21646.113281 1105 | 1367.000000 -21646.201172 1106 | 1368.000000 -21646.224609 1107 | 1369.000000 -21646.242188 1108 | 1371.000000 -21646.726562 1109 | 1372.000000 -21646.888672 1110 | 1373.000000 -21647.371094 1111 | 1375.000000 -21647.496094 1112 | 1376.000000 -21647.531250 1113 | 1377.000000 -21647.642578 1114 | 1379.000000 -21647.910156 1115 | 1380.000000 -21648.060547 1116 | 1381.000000 -21648.417969 1117 | 1383.000000 -21648.523438 1118 | 1384.000000 -21648.636719 1119 | 1385.000000 -21648.707031 1120 | 1386.000000 -21648.798828 1121 | 1388.000000 -21649.021484 1122 | 1389.000000 -21649.232422 1123 | 1390.000000 -21649.521484 1124 | 1392.000000 -21649.644531 1125 | 1393.000000 -21649.720703 1126 | 1394.000000 -21649.826172 1127 | 1395.000000 -21649.880859 1128 | 1396.000000 -21649.953125 1129 | 1397.000000 -21649.960938 1130 | 1398.000000 -21649.970703 1131 | 1400.000000 -21650.445312 1132 | 1402.000000 -21650.609375 1133 | 1403.000000 -21650.783203 1134 | 1404.000000 -21650.796875 1135 | 1405.000000 -21651.003906 1136 | 1407.000000 -21651.166016 1137 | 1408.000000 -21651.230469 1138 | 1409.000000 -21651.402344 1139 | 1411.000000 -21651.541016 1140 | 1412.000000 -21651.648438 1141 | 1413.000000 -21651.806641 1142 | 1414.000000 -21651.830078 1143 | 1415.000000 -21651.992188 1144 | 1417.000000 -21652.199219 1145 | 1418.000000 -21652.310547 1146 | 1419.000000 -21652.572266 1147 | 1421.000000 -21652.708984 1148 | 1422.000000 -21652.828125 1149 | 1423.000000 -21652.966797 1150 | 1424.000000 -21653.035156 1151 | 1425.000000 -21653.179688 1152 | 1426.000000 -21653.185547 1153 | 1427.000000 -21653.261719 1154 | 1429.000000 -21653.781250 1155 | 1430.000000 -21654.052734 1156 | 1432.000000 -21654.345703 1157 | 1433.000000 -21654.619141 1158 | 1434.000000 -21654.675781 1159 | 1435.000000 -21654.947266 1160 | 1437.000000 -21655.242188 1161 | 1438.000000 -21655.468750 1162 | 1439.000000 -21655.623047 1163 | 1440.000000 -21655.769531 1164 | 1441.000000 -21655.876953 1165 | 1442.000000 -21655.912109 1166 | 1444.000000 -21656.617188 1167 | 1445.000000 -21657.085938 1168 | 1447.000000 -21657.294922 1169 | 1448.000000 -21657.468750 1170 | 1449.000000 -21657.628906 1171 | 1450.000000 -21657.738281 1172 | 1451.000000 -21657.833984 1173 | 1453.000000 -21658.406250 1174 | 1454.000000 -21658.820312 1175 | 1456.000000 -21659.046875 1176 | 1457.000000 -21659.169922 1177 | 1458.000000 -21659.421875 1178 | 1460.000000 -21659.621094 1179 | 1461.000000 -21659.796875 1180 | 1462.000000 -21660.042969 1181 | 1463.000000 -21660.054688 1182 | 1464.000000 -21660.322266 1183 | 1466.000000 -21660.560547 1184 | 1467.000000 -21660.593750 1185 | 1468.000000 -21660.894531 1186 | 1470.000000 -21661.068359 1187 | 1471.000000 -21661.148438 1188 | 1472.000000 -21661.343750 1189 | 1474.000000 -21661.513672 1190 | 1475.000000 -21661.654297 1191 | 1476.000000 -21661.851562 1192 | 1478.000000 -21661.990234 1193 | 1479.000000 -21662.113281 1194 | 1480.000000 -21662.250000 1195 | 1481.000000 -21662.304688 1196 | 1482.000000 -21662.462891 1197 | 1484.000000 -21662.654297 1198 | 1485.000000 -21662.804688 1199 | 1486.000000 -21663.074219 1200 | 1488.000000 -21663.175781 1201 | 1489.000000 -21663.289062 1202 | 1490.000000 -21663.402344 1203 | 1491.000000 -21663.462891 1204 | 1492.000000 -21663.558594 1205 | 1493.000000 -21663.568359 1206 | 1494.000000 -21663.615234 1207 | 1496.000000 -21664.083984 1208 | 1498.000000 -21664.271484 1209 | 1499.000000 -21664.455078 1210 | 1500.000000 -21664.505859 1211 | 1501.000000 -21664.730469 1212 | 1503.000000 -21664.886719 1213 | 1504.000000 -21664.966797 1214 | 1505.000000 -21665.164062 1215 | 1507.000000 -21665.322266 1216 | 1508.000000 -21665.460938 1217 | 1509.000000 -21665.632812 1218 | 1510.000000 -21665.679688 1219 | 1511.000000 -21665.898438 1220 | 1513.000000 -21666.093750 1221 | 1514.000000 -21666.208984 1222 | 1515.000000 -21666.466797 1223 | 1517.000000 -21666.611328 1224 | 1518.000000 -21666.753906 1225 | 1519.000000 -21666.925781 1226 | 1520.000000 -21666.990234 1227 | 1521.000000 -21667.177734 1228 | 1523.000000 -21667.433594 1229 | 1524.000000 -21667.623047 1230 | 1525.000000 -21667.890625 1231 | 1527.000000 -21668.078125 1232 | 1528.000000 -21668.220703 1233 | 1529.000000 -21668.435547 1234 | 1530.000000 -21668.501953 1235 | 1531.000000 -21668.740234 1236 | 1533.000000 -21669.003906 1237 | 1534.000000 -21669.152344 1238 | 1535.000000 -21669.488281 1239 | 1537.000000 -21669.673828 1240 | 1538.000000 -21669.826172 1241 | 1539.000000 -21670.027344 1242 | 1540.000000 -21670.091797 1243 | 1541.000000 -21670.285156 1244 | 1543.000000 -21670.619141 1245 | 1544.000000 -21670.857422 1246 | 1545.000000 -21671.173828 1247 | 1547.000000 -21671.396484 1248 | 1548.000000 -21671.531250 1249 | 1549.000000 -21671.775391 1250 | 1551.000000 -21671.970703 1251 | 1552.000000 -21672.166016 1252 | 1553.000000 -21672.396484 1253 | 1554.000000 -21672.457031 1254 | 1555.000000 -21672.712891 1255 | 1557.000000 -21672.955078 1256 | 1558.000000 -21673.070312 1257 | 1559.000000 -21673.371094 1258 | 1561.000000 -21673.544922 1259 | 1562.000000 -21673.675781 1260 | 1563.000000 -21673.867188 1261 | 1564.000000 -21673.900391 1262 | 1565.000000 -21674.074219 1263 | 1567.000000 -21674.394531 1264 | 1568.000000 -21674.474609 1265 | 1569.000000 -21674.859375 1266 | 1571.000000 -21675.011719 1267 | 1572.000000 -21675.107422 1268 | 1573.000000 -21675.242188 1269 | 1574.000000 -21675.283203 1270 | 1575.000000 -21675.384766 1271 | 1577.000000 -21675.755859 1272 | 1578.000000 -21675.875000 1273 | 1579.000000 -21676.386719 1274 | 1581.000000 -21676.490234 1275 | 1582.000000 -21676.609375 1276 | 1583.000000 -21676.671875 1277 | 1584.000000 -21676.753906 1278 | 1586.000000 -21677.091797 1279 | 1587.000000 -21677.412109 1280 | 1588.000000 -21677.509766 1281 | 1589.000000 -21677.535156 1282 | 1590.000000 -21677.583984 1283 | 1592.000000 -21678.052734 1284 | 1593.000000 -21678.175781 1285 | 1594.000000 -21678.593750 1286 | 1596.000000 -21678.755859 1287 | 1597.000000 -21678.789062 1288 | 1598.000000 -21678.980469 1289 | 1600.000000 -21679.212891 1290 | 1601.000000 -21679.285156 1291 | 1602.000000 -21679.582031 1292 | 1604.000000 -21679.732422 1293 | 1605.000000 -21679.826172 1294 | 1606.000000 -21679.986328 1295 | 1607.000000 -21680.013672 1296 | 1608.000000 -21680.175781 1297 | 1610.000000 -21680.466797 1298 | 1611.000000 -21680.619141 1299 | 1612.000000 -21680.919922 1300 | 1614.000000 -21681.103516 1301 | 1615.000000 -21681.189453 1302 | 1616.000000 -21681.390625 1303 | 1618.000000 -21681.578125 1304 | 1619.000000 -21681.755859 1305 | 1620.000000 -21681.988281 1306 | 1621.000000 -21682.025391 1307 | 1622.000000 -21682.265625 1308 | 1624.000000 -21682.500000 1309 | 1625.000000 -21682.619141 1310 | 1626.000000 -21682.914062 1311 | 1628.000000 -21683.111328 1312 | 1629.000000 -21683.238281 1313 | 1630.000000 -21683.457031 1314 | 1631.000000 -21683.511719 1315 | 1632.000000 -21683.707031 1316 | 1634.000000 -21684.021484 1317 | 1635.000000 -21684.259766 1318 | 1636.000000 -21684.605469 1319 | 1638.000000 -21684.806641 1320 | 1639.000000 -21684.966797 1321 | 1640.000000 -21685.189453 1322 | 1641.000000 -21685.277344 1323 | 1642.000000 -21685.517578 1324 | 1644.000000 -21685.880859 1325 | 1645.000000 -21686.173828 1326 | 1646.000000 -21686.566406 1327 | 1648.000000 -21686.826172 1328 | 1649.000000 -21687.056641 1329 | 1650.000000 -21687.357422 1330 | 1651.000000 -21687.476562 1331 | 1652.000000 -21687.785156 1332 | 1654.000000 -21688.232422 1333 | 1655.000000 -21688.626953 1334 | 1656.000000 -21688.910156 1335 | 1657.000000 -21689.087891 1336 | 1658.000000 -21689.341797 1337 | 1659.000000 -21689.373047 1338 | 1660.000000 -21689.496094 1339 | 1662.000000 -21690.785156 1340 | 1663.000000 -21691.326172 1341 | 1664.000000 -21691.363281 1342 | 1665.000000 -21691.521484 1343 | 1667.000000 -21692.849609 1344 | 1668.000000 -21693.126953 1345 | 1669.000000 -21693.595703 1346 | 1671.000000 -21694.431641 1347 | 1673.000000 -21694.689453 1348 | 1674.000000 -21694.970703 1349 | 1675.000000 -21695.064453 1350 | 1676.000000 -21695.314453 1351 | 1678.000000 -21695.707031 1352 | 1679.000000 -21695.804688 1353 | 1680.000000 -21696.287109 1354 | 1682.000000 -21696.437500 1355 | 1683.000000 -21696.511719 1356 | 1684.000000 -21696.634766 1357 | 1686.000000 -21696.888672 1358 | 1687.000000 -21697.062500 1359 | 1688.000000 -21697.371094 1360 | 1690.000000 -21697.474609 1361 | 1691.000000 -21697.558594 1362 | 1692.000000 -21697.640625 1363 | 1693.000000 -21697.695312 1364 | 1694.000000 -21697.714844 1365 | 1695.000000 -21697.716797 1366 | 1697.000000 -21698.101562 1367 | 1698.000000 -21698.160156 1368 | 1699.000000 -21698.667969 1369 | 1701.000000 -21698.703125 1370 | 1702.000000 -21698.789062 1371 | 1704.000000 -21698.923828 1372 | 1705.000000 -21699.015625 1373 | 1706.000000 -21699.187500 1374 | 1708.000000 -21699.263672 1375 | 1709.000000 -21699.324219 1376 | 1710.000000 -21699.378906 1377 | 1711.000000 -21699.408203 1378 | 1712.000000 -21699.453125 1379 | 1714.000000 -21699.617188 1380 | 1715.000000 -21699.753906 1381 | 1716.000000 -21699.994141 1382 | 1718.000000 -21700.046875 1383 | 1719.000000 -21700.099609 1384 | 1720.000000 -21700.121094 1385 | 1721.000000 -21700.175781 1386 | 1723.000000 -21700.308594 1387 | 1724.000000 -21700.375000 1388 | 1725.000000 -21700.546875 1389 | 1727.000000 -21700.611328 1390 | 1728.000000 -21700.642578 1391 | 1729.000000 -21700.679688 1392 | 1730.000000 -21700.730469 1393 | 1731.000000 -21700.738281 1394 | 1733.000000 -21700.904297 1395 | 1734.000000 -21700.998047 1396 | 1735.000000 -21701.224609 1397 | 1737.000000 -21701.265625 1398 | 1738.000000 -21701.318359 1399 | 1739.000000 -21701.324219 1400 | 1740.000000 -21701.357422 1401 | 1742.000000 -21701.492188 1402 | 1743.000000 -21701.560547 1403 | 1744.000000 -21701.728516 1404 | 1746.000000 -21701.777344 1405 | 1747.000000 -21701.808594 1406 | 1748.000000 -21701.849609 1407 | 1749.000000 -21701.875000 1408 | 1750.000000 -21701.878906 1409 | 1752.000000 -21702.046875 1410 | -------------------------------------------------------------------------------- /1_tip4pew_water/plot.plt: -------------------------------------------------------------------------------- 1 | 2 | set term tikz standalone color 3 | 4 | set style line 11 lc rgb '#808080' lt 1 5 | set border 3 back ls 11 6 | 7 | set style line 12 lc rgb '#808080' lt 0 lw 1 8 | set grid back ls 12 9 | set pointsize 1.0 10 | 11 | unset key 12 | 13 | set ylabel "Potential Energy (kJ/mol)" 14 | set xlabel "Step" 15 | set output "min-pot.tex" 16 | plot 'min-pot.xvg' u 1:2 w l 17 | 18 | set ylabel "Potential Energy (kJ/mol)" 19 | set xlabel "Step" 20 | set output "min2-pot.tex" 21 | plot 'min2-pot.xvg' u 1:2 w l 22 | 23 | set ylabel "Temperature (K)" 24 | set xlabel "Time (ps)" 25 | set output "eql-tmp.tex" 26 | plot 'eql-tmp.xvg' u 1:2 w l 27 | 28 | set ylabel "Pressure (bar)" 29 | set xlabel "Time (ps)" 30 | set output "eql2-press.tex" 31 | plot 'eql2-press.xvg' u 1:2 w l 32 | -------------------------------------------------------------------------------- /1_tip4pew_water/water1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/1_tip4pew_water/water1.png -------------------------------------------------------------------------------- /1_tip4pew_water/water2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/1_tip4pew_water/water2.png -------------------------------------------------------------------------------- /2_methane_in_water/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 2: One Methane in Water 4 | ================================ 5 | 6 | In this tutorial I'll show you how to create a system containing one OPLS 7 | methane in a box of TIP4PEW water. 8 | 9 | Setup 10 | ----- 11 | 12 | As before, we need a structure file, a topology file, and parameter files. We're 13 | going to use the GROMACS tool *gmx pdb2gmx* to generate the topology from a pdb 14 | file. 15 | 16 | ### Setup residues for pdb2gmx 17 | 18 | For this molecule we'll be using the OPLS force field. The force field is 19 | located in the top-level force field directory (probably `/usr/share/gromacs/top` 20 | or something similar). 21 | 22 | If you're unsure where your GROMACS installation is do: 23 | 24 | ```bash 25 | $ echo $GMXPREFIX 26 | ``` 27 | 28 | If you are properly sourcing the GROMACS configuration file, this will give you 29 | the installation location. Look for the directory `share/gromacs/top` in that directory and go 30 | into it (*e.g.,* if GMXPREFIX is `/usr` then go to `/usr/share/gromacs/top`). Or 31 | you can simply go to `$GMXDATA/top`. 32 | 33 | Let's take a look at the force field directory's its contents: 34 | 35 | ```bash 36 | $ cd oplsaa.ff 37 | $ ls 38 | ``` 39 | 40 | You'll see several files, but we're only interested in a few of them for now. 41 | Notice `forcefield.itp`. This is the main file used in simulations. Inside 42 | you'll see a `[ defaults ]` section as well as the inclusion of two other files - 43 | one for bonded interactions and one for non-bonded interactions. We're also 44 | interested in `atomtypes.atp` which gives the descriptions for the cryptic 45 | `opls_####` terms as well as the `aminoacids.rtp` which give a list of 46 | recognized residues used for the *gmx pdb2gmx* command. 47 | 48 | Open `atomtypes.atp` with your text editor. The following opens it with `vim`: 49 | 50 | ```bash 51 | $ vim atomtypes.atp 52 | ``` 53 | 54 | Go to the line with `opls_138`. Notice the comment says `alkane CH4`, so we are 55 | on the right track here for our methane. However, notice the mass in the second 56 | column - this is only the carbon for a CH4 group, so we also need the 57 | hydrogens. This is an "all atom" model - every atom is represented. The 58 | corresponding hydrogen is `opls_140`. You'll probably also want to look at the 59 | [supporting info of the OPLS force field 60 | paper](http://pubs.acs.org/doi/suppl/10.1021/ja9621760/suppl_file/ja11225.pdf). 61 | The parameters in the paper should match up with the parameters that we'll look 62 | at in a minute. Now make a note of these two atom types and close the file. 63 | 64 | Let's take a look at `ffnonbonded.itp` for these two atom types: 65 | 66 | ```bash 67 | $ grep opls_138 ffnonbonded.itp 68 | $ grep opls_140 ffnonbonded.itp 69 | ``` 70 | 71 | Here we see the name of the atom type, the bond type, the mass, the charge, 72 | ptype, sigma, and epsilon. Make a note of the charge for each one - we'll need 73 | it for our new residue. As a side note, `ffbonded.itp` will use the bond type 74 | for the bond types, angle types, and dihedral types. 75 | 76 | Before continuing, you may want to copy your top-level force field directory 77 | directory somewhere, like your home directory, since we'll be modifying it and 78 | adding some files. To copy it to your home directory do:: 79 | 80 | ```bash 81 | $ cp -r $GMXDATA/top $HOME/GMXLIB 82 | ``` 83 | 84 | You might have to be root to do it. Now change the `$GMXLIB` environmental variable to: 85 | 86 | ```bash 87 | $ export GMXLIB=$HOME/GMXLIB 88 | ``` 89 | 90 | Add the above to your `.bash_profile` to make it permanent. Now do: 91 | 92 | ```bash 93 | $ cd $GMXLIB 94 | ``` 95 | 96 | You are now in the copy of the director you made, and all simulations will use 97 | that directory instead of the one provided in the GROMACS default directory. 98 | 99 | Now go into `oplsaa.ff` and open `aminoacids.rtp`. You'll notice several 100 | residues already in the file. We're going to add a new file called 101 | `methane.rtp` for our methane with a residue that we'll call `CH4`. Close 102 | `aminoacids.rtp`. We'll need to tell *gmx pdb2gmx* the atoms and bonds in the atom in 103 | our residue file. We could also tell it the angles, but we'll leave them out, 104 | since *gmx pdb2gmx* will figure it out for us. You should create with the 105 | following contents and save as `methane.rtp` in the `oplsaa.ff` directory: 106 | 107 | [ bondedtypes ] 108 | ; bonds angles dihedrals impropers all_dihedrals nrexcl HH14 RemoveDih 109 | 1 1 3 1 1 3 1 0 110 | 111 | ; Methane 112 | [ CH4 ] 113 | [ atoms ] 114 | C opls_138 -0.240 1 115 | H1 opls_140 0.060 1 116 | H2 opls_140 0.060 1 117 | H3 opls_140 0.060 1 118 | H4 opls_140 0.060 1 119 | [ bonds ] 120 | C H1 121 | C H2 122 | C H3 123 | C H4 124 | 125 | A few notes on the above file: the `[ bondedtypes ]` comes from 126 | `aminoacids.rtp` and is required. Under `[ atoms ]` you can name them anything 127 | you want, as long as they match the pdb file we are going to create later. 128 | Notice in the first column we gave the atom names, then we gave the atom types, 129 | the charges, and then the charge group. Under `[ bonds ]` we just tell it how 130 | each atom is connected to the others. In this case, `C` has a connection to each 131 | hydrogen. We could optionally add `[ angles ]`, but as stated earlier, GROMACS 132 | will sort this out for us. Now close the file. See section 5.6 for more 133 | information about this. 134 | 135 | ### Create pdb file and run *gmx pdb2gmx* 136 | 137 | Now we are ready to create the pdb file. There are several programs out there 138 | to create molecule structure files. 139 | [Avogadro](http://avogadro.cc/wiki/Main_Page) is one of those. An alternative to 140 | this is to use "xleap" from the [AmberTools](http://ambermd.org/#AmberTools) 141 | package. In Avogadro simply click any spot in the window and you'll get a 142 | methane. Save this file as `methane.pdb`. Your file should look something like 143 | this. Save this somewhere in your home directory but not anywhere in `$GMXLIB`. 144 | 145 | Change `LIG` to `CH4` everywhere in `methane.pdb`. Also change the first `H` to 146 | `H1`, the second to `H2` and so on. PDB files are fixed format, so keep the 147 | beginning of each column in the same place. The CONNECT and MASTER records also 148 | will not be needed, so they can be removed. Also go ahead and change `UNNAMED` 149 | to `METHANE`. Your modified file should look something like 150 | this: 151 | 152 | COMPND METHANE 153 | AUTHOR GENERATED BY OPEN BABEL 2.3.2 154 | HETATM 1 C CH4 1 -0.370 0.900 0.000 1.00 0.00 C 155 | HETATM 2 H1 CH4 1 0.700 0.900 0.000 1.00 0.00 H 156 | HETATM 3 H2 CH4 1 -0.727 0.122 0.643 1.00 0.00 H 157 | HETATM 4 H3 CH4 1 -0.727 0.731 -0.995 1.00 0.00 H 158 | HETATM 5 H4 CH4 1 -0.727 1.845 0.351 1.00 0.00 H 159 | END 160 | 161 | Save the file as `methane.pdb`. 162 | 163 | Now we can use *gmx pdb2gmx* to create GROMACS .conf and .top files: 164 | 165 | ```bash 166 | $ gmx pdb2gmx -f methane.pdb 167 | ``` 168 | 169 | You'll be prompted to choose a force field. Choose OPLS. If you have an option 170 | between two different force field directories, choose the OPLS that is in the 171 | copied directory you made. For the water model choose TIP4PEW. If you get an 172 | error that GROMACS cannot find residue `CH4` you may beusing the wrong force 173 | field. 174 | 175 | Three files will be created: `conf.gro`, `posre.itp`, 176 | and `topol.top`. `conf.gro` is our file containing just one methane, topol.top 177 | is the system's topology file, and posre.itp is the optional position restraint 178 | file for our solute (methane). We won't be using that one. In the `topol.top` 179 | file notice that there is an `[ angles ]` section as promised. You'll also want 180 | to rename the compound in `topol.top`. Take a look and explore each file. 181 | Chapter 5 of the GROMACS manual will help you understand the topology file more. 182 | 183 | _**Note:** `topol.top` and `methane.pdb` will be used again in other tutorials._ 184 | 185 | For those who use *gmx pdb2gmx* to generate topologies for large proteins, 186 | things can get more complicated. This is merely a simple example, and really we 187 | probably could have found this topology somewhere else. 188 | 189 | ### Solvate system 190 | 191 | Our structure file and topology file only have our methane thus far. We need to 192 | add waters by using *gmx solvate*: 193 | 194 | ```bash 195 | $ gmx solvate -cp conf.gro -o conf.gro -cs tip4p -p topol.top -box 2.3 2.3 2.3 196 | ``` 197 | 198 | ### Parameter files 199 | 200 | We'll be using the same files as in the previous tutorial: 201 | 202 | * [Minimization](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/min.mdp) 203 | * [Minimization 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/min2.mdp) 204 | * [Equilibration](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/eql.mdp) 205 | * [Equilibration 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/eql2.mdp) 206 | * [Production](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/1_tip4pew_water/mdp/prd.mdp) 207 | 208 | Simulation 209 | ---------- 210 | 211 | We'll be using the same sequence as last time. This assumes your mdp files are 212 | in a directory named `mdp`: 213 | 214 | ```bash 215 | $ gmx grompp -f mdp/min.mdp -o min -pp min -po min 216 | $ gmx mdrun -deffnm min 217 | $ gmx grompp -f mdp/min2.mdp -o min2 -pp min2 -po min2 -c min -t min 218 | $ gmx mdrun -deffnm min2 219 | $ gmx grompp -f mdp/eql.mdp -o eql -pp eql -po eql -c min2 -t min2 220 | $ gmx mdrun -deffnm eql 221 | $ gmx grompp -f mdp/eql2.mdp -o eql2 -pp eql2 -po eql2 -c eql -t eql 222 | $ gmx mdrun -deffnm eql2 223 | $ gmx grompp -f mdp/prd.mdp -o prd -pp prd -po prd -c eql2 -t eql2 224 | $ gmx mdrun -deffnm prd 225 | ``` 226 | 227 | _Tip:_ You may want to put the above commands in a bash script called `run`. Add 228 | the following lines to the top of the script: 229 | 230 | ```bash 231 | #!/bin/bash 232 | 233 | set -e 234 | ``` 235 | 236 | Then do: 237 | 238 | ```bash 239 | $ chmod +x run 240 | ``` 241 | 242 | To run the script do: 243 | 244 | ```bash 245 | $ ./run 246 | ``` 247 | 248 | Your script should look [like this](run). `set -e` tells bash to stop the script 249 | if there is an error. 250 | 251 | Analysis 252 | -------- 253 | 254 | Let's calculate something called the [radial distribution 255 | function](https://en.wikipedia.org/wiki/Radial_distribution_function). First, we 256 | need to create an index file: 257 | 258 | ```bash 259 | $ gmx make_ndx -f conf.gro 260 | ``` 261 | ``` 262 | > a C 263 | > a OW 264 | > q 265 | ``` 266 | 267 | Now run *gmx rdf*: 268 | 269 | ```bash 270 | $ gmx rdf -f prd.xtc -n index.ndx 271 | ``` 272 | 273 | At the prompt select `C` for the reference group. Then select `OW`. Then type 274 | `CTRL-D` to end. A plot of the result, found in columns 1 and 3 of the data would be plotted by doing the following in gnuplot: 275 | 276 | ``` 277 | > plot 'rdf.xvg' u 1:3 w l 278 | ``` 279 | 280 | It should look something like this: 281 | 282 | ![C-OW RDF](rdf.png) 283 | 284 | Summary 285 | ------- 286 | 287 | In this tutorial we learned how to create a residue template file (.rtp) for 288 | use with *gmx pdb2gmx*. We created a structure for OPLS methane and the 289 | generated a topology for it. From there we put water around it using *gmx 290 | solvated*. After this we ran a simulation, just like last time. Lastly, we found 291 | the C-OW radial distribution function using *gmx rdf*. 292 | 293 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 294 | -------------------------------------------------------------------------------- /2_methane_in_water/plot.plt: -------------------------------------------------------------------------------- 1 | 2 | set term tikz standalone color 3 | 4 | set style line 11 lc rgb '#808080' lt 1 5 | set border 3 back ls 11 6 | 7 | set style line 12 lc rgb '#808080' lt 0 lw 1 8 | set grid back ls 12 9 | set pointsize 1.0 10 | 11 | set xlabel "r (nm)" 12 | set ylabel "g(r)" 13 | unset key 14 | 15 | set output "rdf.tex" 16 | plot 'rdf.xvg' u 1:3 w l 17 | -------------------------------------------------------------------------------- /2_methane_in_water/rdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/2_methane_in_water/rdf.png -------------------------------------------------------------------------------- /2_methane_in_water/rdf.xvg: -------------------------------------------------------------------------------- 1 | # This file was created Sun Aug 16 14:25:01 2015 2 | # Created by: 3 | # :-) GROMACS - gmx rdf, VERSION 5.1 (-: 4 | # 5 | # Executable: /usr/bin/gmx 6 | # Data prefix: /usr 7 | # Command line: 8 | # gmx rdf -f prd.xtc -n index.ndx 9 | # gmx rdf is part of G R O M A C S: 10 | # 11 | # Glycine aRginine prOline Methionine Alanine Cystine Serine 12 | # 13 | # title "Radial distribution" 14 | # xaxis label "r (nm)" 15 | # yaxis label "g(r)" 16 | #TYPE xy 17 | # subtitle "reference C" 18 | # view 0.15, 0.15, 0.75, 0.85 19 | # legend on 20 | # legend box on 21 | # legend loctype view 22 | # legend 0.78, 0.8 23 | # legend length 2 24 | # s0 legend "C" 25 | # s1 legend "OW" 26 | 0.000 0.000 0.000 27 | 0.002 0.000 0.000 28 | 0.004 0.000 0.000 29 | 0.006 0.000 0.000 30 | 0.008 0.000 0.000 31 | 0.010 0.000 0.000 32 | 0.012 0.000 0.000 33 | 0.014 0.000 0.000 34 | 0.016 0.000 0.000 35 | 0.018 0.000 0.000 36 | 0.020 0.000 0.000 37 | 0.022 0.000 0.000 38 | 0.024 0.000 0.000 39 | 0.026 0.000 0.000 40 | 0.028 0.000 0.000 41 | 0.030 0.000 0.000 42 | 0.032 0.000 0.000 43 | 0.034 0.000 0.000 44 | 0.036 0.000 0.000 45 | 0.038 0.000 0.000 46 | 0.040 0.000 0.000 47 | 0.042 0.000 0.000 48 | 0.044 0.000 0.000 49 | 0.046 0.000 0.000 50 | 0.048 0.000 0.000 51 | 0.050 0.000 0.000 52 | 0.052 0.000 0.000 53 | 0.054 0.000 0.000 54 | 0.056 0.000 0.000 55 | 0.058 0.000 0.000 56 | 0.060 0.000 0.000 57 | 0.062 0.000 0.000 58 | 0.064 0.000 0.000 59 | 0.066 0.000 0.000 60 | 0.068 0.000 0.000 61 | 0.070 0.000 0.000 62 | 0.072 0.000 0.000 63 | 0.074 0.000 0.000 64 | 0.076 0.000 0.000 65 | 0.078 0.000 0.000 66 | 0.080 0.000 0.000 67 | 0.082 0.000 0.000 68 | 0.084 0.000 0.000 69 | 0.086 0.000 0.000 70 | 0.088 0.000 0.000 71 | 0.090 0.000 0.000 72 | 0.092 0.000 0.000 73 | 0.094 0.000 0.000 74 | 0.096 0.000 0.000 75 | 0.098 0.000 0.000 76 | 0.100 0.000 0.000 77 | 0.102 0.000 0.000 78 | 0.104 0.000 0.000 79 | 0.106 0.000 0.000 80 | 0.108 0.000 0.000 81 | 0.110 0.000 0.000 82 | 0.112 0.000 0.000 83 | 0.114 0.000 0.000 84 | 0.116 0.000 0.000 85 | 0.118 0.000 0.000 86 | 0.120 0.000 0.000 87 | 0.122 0.000 0.000 88 | 0.124 0.000 0.000 89 | 0.126 0.000 0.000 90 | 0.128 0.000 0.000 91 | 0.130 0.000 0.000 92 | 0.132 0.000 0.000 93 | 0.134 0.000 0.000 94 | 0.136 0.000 0.000 95 | 0.138 0.000 0.000 96 | 0.140 0.000 0.000 97 | 0.142 0.000 0.000 98 | 0.144 0.000 0.000 99 | 0.146 0.000 0.000 100 | 0.148 0.000 0.000 101 | 0.150 0.000 0.000 102 | 0.152 0.000 0.000 103 | 0.154 0.000 0.000 104 | 0.156 0.000 0.000 105 | 0.158 0.000 0.000 106 | 0.160 0.000 0.000 107 | 0.162 0.000 0.000 108 | 0.164 0.000 0.000 109 | 0.166 0.000 0.000 110 | 0.168 0.000 0.000 111 | 0.170 0.000 0.000 112 | 0.172 0.000 0.000 113 | 0.174 0.000 0.000 114 | 0.176 0.000 0.000 115 | 0.178 0.000 0.000 116 | 0.180 0.000 0.000 117 | 0.182 0.000 0.000 118 | 0.184 0.000 0.000 119 | 0.186 0.000 0.000 120 | 0.188 0.000 0.000 121 | 0.190 0.000 0.000 122 | 0.192 0.000 0.000 123 | 0.194 0.000 0.000 124 | 0.196 0.000 0.000 125 | 0.198 0.000 0.000 126 | 0.200 0.000 0.000 127 | 0.202 0.000 0.000 128 | 0.204 0.000 0.000 129 | 0.206 0.000 0.000 130 | 0.208 0.000 0.000 131 | 0.210 0.000 0.000 132 | 0.212 0.000 0.000 133 | 0.214 0.000 0.000 134 | 0.216 0.000 0.000 135 | 0.218 0.000 0.000 136 | 0.220 0.000 0.000 137 | 0.222 0.000 0.000 138 | 0.224 0.000 0.000 139 | 0.226 0.000 0.000 140 | 0.228 0.000 0.000 141 | 0.230 0.000 0.000 142 | 0.232 0.000 0.000 143 | 0.234 0.000 0.000 144 | 0.236 0.000 0.000 145 | 0.238 0.000 0.000 146 | 0.240 0.000 0.000 147 | 0.242 0.000 0.000 148 | 0.244 0.000 0.000 149 | 0.246 0.000 0.000 150 | 0.248 0.000 0.000 151 | 0.250 0.000 0.000 152 | 0.252 0.000 0.000 153 | 0.254 0.000 0.000 154 | 0.256 0.000 0.000 155 | 0.258 0.000 0.000 156 | 0.260 0.000 0.000 157 | 0.262 0.000 0.000 158 | 0.264 0.000 0.000 159 | 0.266 0.000 0.000 160 | 0.268 0.000 0.000 161 | 0.270 0.000 0.000 162 | 0.272 0.000 0.000 163 | 0.274 0.000 0.000 164 | 0.276 0.000 0.000 165 | 0.278 0.000 0.000 166 | 0.280 0.000 0.000 167 | 0.282 0.000 0.006 168 | 0.284 0.000 0.012 169 | 0.286 0.000 0.012 170 | 0.288 0.000 0.017 171 | 0.290 0.000 0.023 172 | 0.292 0.000 0.034 173 | 0.294 0.000 0.028 174 | 0.296 0.000 0.066 175 | 0.298 0.000 0.087 176 | 0.300 0.000 0.059 177 | 0.302 0.000 0.147 178 | 0.304 0.000 0.130 179 | 0.306 0.000 0.138 180 | 0.308 0.000 0.197 181 | 0.310 0.000 0.310 182 | 0.312 0.000 0.336 183 | 0.314 0.000 0.468 184 | 0.316 0.000 0.510 185 | 0.318 0.000 0.594 186 | 0.320 0.000 0.694 187 | 0.322 0.000 0.787 188 | 0.324 0.000 0.901 189 | 0.326 0.000 0.945 190 | 0.328 0.000 0.929 191 | 0.330 0.000 1.054 192 | 0.332 0.000 1.124 193 | 0.334 0.000 1.167 194 | 0.336 0.000 1.264 195 | 0.338 0.000 1.312 196 | 0.340 0.000 1.433 197 | 0.342 0.000 1.643 198 | 0.344 0.000 1.652 199 | 0.346 0.000 1.665 200 | 0.348 0.000 1.693 201 | 0.350 0.000 1.729 202 | 0.352 0.000 1.764 203 | 0.354 0.000 1.939 204 | 0.356 0.000 1.944 205 | 0.358 0.000 1.934 206 | 0.360 0.000 1.838 207 | 0.362 0.000 2.030 208 | 0.364 0.000 1.979 209 | 0.366 0.000 1.943 210 | 0.368 0.000 2.036 211 | 0.370 0.000 2.066 212 | 0.372 0.000 1.881 213 | 0.374 0.000 1.861 214 | 0.376 0.000 2.015 215 | 0.378 0.000 1.970 216 | 0.380 0.000 1.949 217 | 0.382 0.000 1.873 218 | 0.384 0.000 1.866 219 | 0.386 0.000 1.850 220 | 0.388 0.000 1.860 221 | 0.390 0.000 1.819 222 | 0.392 0.000 1.844 223 | 0.394 0.000 1.918 224 | 0.396 0.000 1.884 225 | 0.398 0.000 1.668 226 | 0.400 0.000 1.765 227 | 0.402 0.000 1.608 228 | 0.404 0.000 1.663 229 | 0.406 0.000 1.600 230 | 0.408 0.000 1.521 231 | 0.410 0.000 1.563 232 | 0.412 0.000 1.551 233 | 0.414 0.000 1.379 234 | 0.416 0.000 1.510 235 | 0.418 0.000 1.449 236 | 0.420 0.000 1.402 237 | 0.422 0.000 1.357 238 | 0.424 0.000 1.355 239 | 0.426 0.000 1.329 240 | 0.428 0.000 1.345 241 | 0.430 0.000 1.426 242 | 0.432 0.000 1.395 243 | 0.434 0.000 1.206 244 | 0.436 0.000 1.198 245 | 0.438 0.000 1.227 246 | 0.440 0.000 1.072 247 | 0.442 0.000 1.180 248 | 0.444 0.000 1.225 249 | 0.446 0.000 1.048 250 | 0.448 0.000 1.077 251 | 0.450 0.000 1.053 252 | 0.452 0.000 1.098 253 | 0.454 0.000 0.995 254 | 0.456 0.000 1.039 255 | 0.458 0.000 1.033 256 | 0.460 0.000 0.985 257 | 0.462 0.000 0.970 258 | 0.464 0.000 0.899 259 | 0.466 0.000 0.955 260 | 0.468 0.000 0.882 261 | 0.470 0.000 0.968 262 | 0.472 0.000 0.903 263 | 0.474 0.000 0.898 264 | 0.476 0.000 0.941 265 | 0.478 0.000 0.927 266 | 0.480 0.000 0.800 267 | 0.482 0.000 0.804 268 | 0.484 0.000 0.882 269 | 0.486 0.000 0.878 270 | 0.488 0.000 0.823 271 | 0.490 0.000 0.812 272 | 0.492 0.000 0.829 273 | 0.494 0.000 0.764 274 | 0.496 0.000 0.771 275 | 0.498 0.000 0.813 276 | 0.500 0.000 0.811 277 | 0.502 0.000 0.793 278 | 0.504 0.000 0.807 279 | 0.506 0.000 0.762 280 | 0.508 0.000 0.784 281 | 0.510 0.000 0.731 282 | 0.512 0.000 0.768 283 | 0.514 0.000 0.809 284 | 0.516 0.000 0.785 285 | 0.518 0.000 0.671 286 | 0.520 0.000 0.730 287 | 0.522 0.000 0.739 288 | 0.524 0.000 0.736 289 | 0.526 0.000 0.701 290 | 0.528 0.000 0.687 291 | 0.530 0.000 0.696 292 | 0.532 0.000 0.801 293 | 0.534 0.000 0.709 294 | 0.536 0.000 0.716 295 | 0.538 0.000 0.733 296 | 0.540 0.000 0.690 297 | 0.542 0.000 0.721 298 | 0.544 0.000 0.730 299 | 0.546 0.000 0.691 300 | 0.548 0.000 0.659 301 | 0.550 0.000 0.740 302 | 0.552 0.000 0.706 303 | 0.554 0.000 0.778 304 | 0.556 0.000 0.768 305 | 0.558 0.000 0.796 306 | 0.560 0.000 0.705 307 | 0.562 0.000 0.730 308 | 0.564 0.000 0.785 309 | 0.566 0.000 0.784 310 | 0.568 0.000 0.831 311 | 0.570 0.000 0.809 312 | 0.572 0.000 0.728 313 | 0.574 0.000 0.812 314 | 0.576 0.000 0.814 315 | 0.578 0.000 0.864 316 | 0.580 0.000 0.810 317 | 0.582 0.000 0.856 318 | 0.584 0.000 0.860 319 | 0.586 0.000 0.918 320 | 0.588 0.000 0.922 321 | 0.590 0.000 0.945 322 | 0.592 0.000 0.859 323 | 0.594 0.000 0.953 324 | 0.596 0.000 0.963 325 | 0.598 0.000 0.956 326 | 0.600 0.000 0.949 327 | 0.602 0.000 0.960 328 | 0.604 0.000 1.024 329 | 0.606 0.000 0.993 330 | 0.608 0.000 1.045 331 | 0.610 0.000 1.051 332 | 0.612 0.000 1.078 333 | 0.614 0.000 1.084 334 | 0.616 0.000 1.108 335 | 0.618 0.000 1.080 336 | 0.620 0.000 1.075 337 | 0.622 0.000 1.111 338 | 0.624 0.000 1.029 339 | 0.626 0.000 1.036 340 | 0.628 0.000 1.130 341 | 0.630 0.000 1.100 342 | 0.632 0.000 1.144 343 | 0.634 0.000 1.057 344 | 0.636 0.000 1.165 345 | 0.638 0.000 1.077 346 | 0.640 0.000 1.023 347 | 0.642 0.000 1.136 348 | 0.644 0.000 1.080 349 | 0.646 0.000 1.098 350 | 0.648 0.000 1.139 351 | 0.650 0.000 1.055 352 | 0.652 0.000 1.047 353 | 0.654 0.000 1.116 354 | 0.656 0.000 1.045 355 | 0.658 0.000 1.099 356 | 0.660 0.000 1.165 357 | 0.662 0.000 1.077 358 | 0.664 0.000 1.153 359 | 0.666 0.000 1.123 360 | 0.668 0.000 1.138 361 | 0.670 0.000 1.111 362 | 0.672 0.000 1.135 363 | 0.674 0.000 1.119 364 | 0.676 0.000 1.080 365 | 0.678 0.000 1.087 366 | 0.680 0.000 1.079 367 | 0.682 0.000 1.045 368 | 0.684 0.000 1.074 369 | 0.686 0.000 1.025 370 | 0.688 0.000 1.091 371 | 0.690 0.000 1.088 372 | 0.692 0.000 1.068 373 | 0.694 0.000 1.089 374 | 0.696 0.000 1.085 375 | 0.698 0.000 1.063 376 | 0.700 0.000 1.007 377 | 0.702 0.000 1.047 378 | 0.704 0.000 1.069 379 | 0.706 0.000 1.080 380 | 0.708 0.000 1.089 381 | 0.710 0.000 1.062 382 | 0.712 0.000 1.009 383 | 0.714 0.000 1.044 384 | 0.716 0.000 1.029 385 | 0.718 0.000 1.028 386 | 0.720 0.000 1.067 387 | 0.722 0.000 1.027 388 | 0.724 0.000 0.944 389 | 0.726 0.000 1.105 390 | 0.728 0.000 1.013 391 | 0.730 0.000 1.032 392 | 0.732 0.000 1.032 393 | 0.734 0.000 1.023 394 | 0.736 0.000 1.029 395 | 0.738 0.000 0.998 396 | 0.740 0.000 1.024 397 | 0.742 0.000 1.035 398 | 0.744 0.000 1.082 399 | 0.746 0.000 0.995 400 | 0.748 0.000 0.977 401 | 0.750 0.000 1.041 402 | 0.752 0.000 1.043 403 | 0.754 0.000 0.996 404 | 0.756 0.000 0.995 405 | 0.758 0.000 1.047 406 | 0.760 0.000 1.035 407 | 0.762 0.000 0.984 408 | 0.764 0.000 1.009 409 | 0.766 0.000 1.049 410 | 0.768 0.000 1.009 411 | 0.770 0.000 0.990 412 | 0.772 0.000 1.013 413 | 0.774 0.000 1.023 414 | 0.776 0.000 1.031 415 | 0.778 0.000 0.990 416 | 0.780 0.000 0.991 417 | 0.782 0.000 1.004 418 | 0.784 0.000 0.970 419 | 0.786 0.000 1.006 420 | 0.788 0.000 0.989 421 | 0.790 0.000 1.013 422 | 0.792 0.000 1.017 423 | 0.794 0.000 1.023 424 | 0.796 0.000 0.992 425 | 0.798 0.000 1.035 426 | 0.800 0.000 1.015 427 | 0.802 0.000 1.018 428 | 0.804 0.000 0.997 429 | 0.806 0.000 1.006 430 | 0.808 0.000 0.973 431 | 0.810 0.000 0.968 432 | 0.812 0.000 0.978 433 | 0.814 0.000 0.993 434 | 0.816 0.000 1.011 435 | 0.818 0.000 1.061 436 | 0.820 0.000 1.015 437 | 0.822 0.000 1.043 438 | 0.824 0.000 0.969 439 | 0.826 0.000 0.999 440 | 0.828 0.000 0.995 441 | 0.830 0.000 0.938 442 | 0.832 0.000 0.990 443 | 0.834 0.000 1.036 444 | 0.836 0.000 1.011 445 | 0.838 0.000 1.012 446 | 0.840 0.000 0.951 447 | 0.842 0.000 1.012 448 | 0.844 0.000 1.018 449 | 0.846 0.000 1.001 450 | 0.848 0.000 0.983 451 | 0.850 0.000 1.039 452 | 0.852 0.000 1.011 453 | 0.854 0.000 0.970 454 | 0.856 0.000 0.979 455 | 0.858 0.000 0.986 456 | 0.860 0.000 0.923 457 | 0.862 0.000 0.951 458 | 0.864 0.000 0.986 459 | 0.866 0.000 1.000 460 | 0.868 0.000 0.986 461 | 0.870 0.000 0.977 462 | 0.872 0.000 1.014 463 | 0.874 0.000 0.998 464 | 0.876 0.000 0.989 465 | 0.878 0.000 0.968 466 | 0.880 0.000 1.012 467 | 0.882 0.000 1.042 468 | 0.884 0.000 1.008 469 | 0.886 0.000 0.970 470 | 0.888 0.000 0.961 471 | 0.890 0.000 0.931 472 | 0.892 0.000 0.970 473 | 0.894 0.000 1.007 474 | 0.896 0.000 0.952 475 | 0.898 0.000 0.986 476 | 0.900 0.000 0.969 477 | 0.902 0.000 0.981 478 | 0.904 0.000 0.995 479 | 0.906 0.000 0.985 480 | 0.908 0.000 1.003 481 | 0.910 0.000 0.984 482 | 0.912 0.000 0.982 483 | 0.914 0.000 1.007 484 | 0.916 0.000 0.970 485 | 0.918 0.000 0.991 486 | 0.920 0.000 1.002 487 | 0.922 0.000 1.007 488 | 0.924 0.000 0.950 489 | 0.926 0.000 0.972 490 | 0.928 0.000 0.989 491 | 0.930 0.000 1.002 492 | 0.932 0.000 0.965 493 | 0.934 0.000 1.011 494 | 0.936 0.000 0.960 495 | 0.938 0.000 0.933 496 | 0.940 0.000 1.015 497 | 0.942 0.000 0.979 498 | 0.944 0.000 0.992 499 | 0.946 0.000 1.025 500 | 0.948 0.000 0.995 501 | 0.950 0.000 0.992 502 | 0.952 0.000 1.007 503 | 0.954 0.000 1.000 504 | 0.956 0.000 1.032 505 | 0.958 0.000 0.979 506 | 0.960 0.000 1.009 507 | 0.962 0.000 1.001 508 | 0.964 0.000 1.002 509 | 0.966 0.000 0.996 510 | 0.968 0.000 1.013 511 | 0.970 0.000 1.022 512 | 0.972 0.000 1.031 513 | 0.974 0.000 1.023 514 | 0.976 0.000 1.025 515 | 0.978 0.000 0.979 516 | 0.980 0.000 1.027 517 | 0.982 0.000 1.019 518 | 0.984 0.000 1.018 519 | 0.986 0.000 1.011 520 | 0.988 0.000 1.022 521 | 0.990 0.000 1.009 522 | 0.992 0.000 1.011 523 | 0.994 0.000 0.976 524 | 0.996 0.000 0.989 525 | 0.998 0.000 0.996 526 | 1.000 0.000 0.971 527 | 1.002 0.000 1.002 528 | 1.004 0.000 1.003 529 | 1.006 0.000 1.026 530 | 1.008 0.000 1.004 531 | 1.010 0.000 1.018 532 | 1.012 0.000 1.025 533 | 1.014 0.000 0.967 534 | 1.016 0.000 0.997 535 | 1.018 0.000 1.008 536 | 1.020 0.000 0.986 537 | 1.022 0.000 1.023 538 | 1.024 0.000 1.014 539 | 1.026 0.000 1.029 540 | 1.028 0.000 1.000 541 | 1.030 0.000 1.014 542 | 1.032 0.000 1.019 543 | 1.034 0.000 1.020 544 | 1.036 0.000 1.043 545 | 1.038 0.000 1.023 546 | 1.040 0.000 1.045 547 | 1.042 0.000 0.998 548 | 1.044 0.000 1.037 549 | 1.046 0.000 0.976 550 | 1.048 0.000 1.060 551 | 1.050 0.000 1.016 552 | 1.052 0.000 1.036 553 | 1.054 0.000 1.028 554 | 1.056 0.000 1.009 555 | 1.058 0.000 0.997 556 | 1.060 0.000 1.045 557 | 1.062 0.000 1.017 558 | 1.064 0.000 1.003 559 | 1.066 0.000 1.006 560 | 1.068 0.000 1.009 561 | 1.070 0.000 1.020 562 | 1.072 0.000 1.060 563 | 1.074 0.000 1.018 564 | 1.076 0.000 0.998 565 | 1.078 0.000 1.035 566 | 1.080 0.000 1.033 567 | 1.082 0.000 1.026 568 | 1.084 0.000 1.034 569 | 1.086 0.000 1.027 570 | 1.088 0.000 1.018 571 | 1.090 0.000 1.024 572 | 1.092 0.000 1.009 573 | 1.094 0.000 1.041 574 | 1.096 0.000 1.013 575 | 1.098 0.000 1.007 576 | 1.100 0.000 0.979 577 | 1.102 0.000 1.002 578 | 1.104 0.000 1.013 579 | 1.106 0.000 1.022 580 | 1.108 0.000 0.964 581 | 1.110 0.000 1.034 582 | 1.112 0.000 1.030 583 | 1.114 0.000 1.002 584 | 1.116 0.000 1.025 585 | 1.118 0.000 1.016 586 | 1.120 0.000 0.982 587 | 1.122 0.000 1.007 588 | 1.124 0.000 0.969 589 | 1.126 0.000 1.007 590 | -------------------------------------------------------------------------------- /2_methane_in_water/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | gmx grompp -f mdp/min.mdp -o min -pp min -po min 6 | gmx mdrun -deffnm min 7 | 8 | gmx grompp -f mdp/min2.mdp -o min2 -pp min2 -po min2 -c min -t min 9 | gmx mdrun -deffnm min2 10 | 11 | gmx grompp -f mdp/eql.mdp -o eql -pp eql -po eql -c min2 -t min2 12 | gmx mdrun -deffnm eql 13 | 14 | gmx grompp -f mdp/eql2.mdp -o eql2 -pp eql2 -po eql2 -c eql -t eql 15 | gmx mdrun -deffnm eql2 16 | 17 | gmx grompp -f mdp/prd.mdp -o prd -pp prd -po prd -c eql2 -t eql2 18 | gmx mdrun -deffnm prd 19 | -------------------------------------------------------------------------------- /3_methanes_in_water/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 3: Several Methanes in Water 4 | ===================================== 5 | 6 | In this tutorial I'll show you how to create a system containing several OPLS 7 | methane in a box of TIP4PEW water and get the methane-methane potential of mean 8 | force from this information. 9 | 10 | Setup 11 | ----- 12 | 13 | Reuse `methane.pdb` and `topol.top` from the last tutorial (make copies). Remove 14 | all of the waters in `topol.top` by deleting the line containing `SOL` under `[ 15 | molecules ]`. We're going to perform our simulation on 10 methanes in 1000 16 | waters. As a starting point we'll set the box to be 3.2 nm in each direction. 17 | Obviously when we add pressure coupling this will go to the correct size, but we 18 | want to start somewhere close. The density of water is close to 33.5 molecules / 19 | nm^3, so the cube root of 1010/33.5 is around 3.11, so rounding up gives me 3.2 20 | nm. 21 | 22 | First, insert ten methanes into a 3.2 nm x 3.2 nm x 3.2 nm box: 23 | 24 | ```bash 25 | $ gmx insert-molecules -ci methane.pdb -o box.gro -nmol 10 -box 3.2 3.2 3.2 26 | ``` 27 | 28 | Update the line in `topol.top` containing the number of methanes from 1 to 10. 29 | 30 | Then add water to the box: 31 | 32 | ```bash 33 | $ gmx solvate -cs tip4p -cp box.gro -o conf.gro -p topol.top -maxsol 1000 34 | ``` 35 | 36 | *gmx solvate* automatically updates `topol.top` for us. 37 | 38 | Reuse the .mdp files from last time, except change `nsteps` in `prd.mdp` to be 39 | longer. I myself ran this for 100 ns, so I simply added a 0 to the end of the 40 | number from last time. You may also wan to output more frequently for our 41 | analysis below. 42 | 43 | Simulation 44 | ---------- 45 | 46 | Run the simulation just like last time. 47 | 48 | Analysis 49 | -------- 50 | 51 | Create an index file containing a group of the 10 methanes: 52 | 53 | ```bash 54 | $ gmx make_ndx -f conf.gro 55 | ``` 56 | ``` 57 | > a C 58 | > q 59 | ``` 60 | 61 | Now use *gmx rdf* just like last time, but instead choose the group containing 62 | `C` twice. 63 | 64 | Depending on how many frames you saved and how long you ran the simulation (I 65 | ran mine for 100 ns and saved 25,000 frames), you should get an RDF that looks 66 | something like this if you just plot it normally: 67 | 68 | ![RDF](rdf1.png) 69 | 70 | Note that it does not converge to one. We are overcounting by one, so we should 71 | factor that out. Here's the gnuplot command: 72 | 73 | ```gnuplot 74 | > plot 'rdf.xvg' u 1:($2*10/9) w l 75 | ``` 76 | 77 | We have ten methanes, but we should only be counting nine with the RDF, so we 78 | multiply the value of g by N/(N-1), which is 10/9. It should look like this: 79 | 80 | ![RDF](rdf2.png) 81 | 82 | Now to get the methane-methane [potential of mean 83 | force](https://en.wikipedia.org/wiki/Potential_of_mean_force) (PMF) from the 84 | methane-methane RDF we do w = -kTln(g). 85 | 86 | So to plot this with gnuplot do: 87 | 88 | ```gnuplot 89 | > plot 'rdf.xvg' u 1:(-8.314e-3*298.15*log($2*10/9)) w l 90 | ``` 91 | 92 | Your plot should look something like this: 93 | 94 | ![PMF](pmf.png) 95 | 96 | You notice there is a small gap in our sampling. The methanes never interacted 97 | at that distance. We'll use umbrella sampling in a later tutorial to solve this. 98 | 99 | Summary 100 | ------- 101 | 102 | In this tutorial we created a box of 10 methanes and 1000 waters using *gmx 103 | insert-molecules* and *gmx solvate*. We simulated this just like last time, 104 | except we did it a little longer. We again used *gmx rdf* to get the radial 105 | distribution function, but this time for methane-methane. We had a to add a 106 | correction due to this, and from there we were able to get the potential of mean 107 | force. 108 | 109 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 110 | -------------------------------------------------------------------------------- /3_methanes_in_water/plot.plt: -------------------------------------------------------------------------------- 1 | 2 | set term tikz standalone color 3 | 4 | set style line 11 lc rgb '#808080' lt 1 5 | set border 3 back ls 11 6 | 7 | set style line 12 lc rgb '#808080' lt 0 lw 1 8 | set grid back ls 12 9 | set pointsize 1.0 10 | 11 | set xlabel "r (nm)" 12 | set ylabel "g(r)" 13 | unset key 14 | 15 | set output "rdf1.tex" 16 | plot 'rdf.xvg' u 1:2 w l 17 | 18 | set output "rdf2.tex" 19 | plot 'rdf.xvg' u 1:($2*10/9) w l 20 | 21 | set ylabel "w(r) (kJ / mol)" 22 | set output "pmf.tex" 23 | plot 'rdf.xvg' u 1:(-8.314e-3*298.15*log($2*10/9)) w l 24 | -------------------------------------------------------------------------------- /3_methanes_in_water/pmf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/3_methanes_in_water/pmf.png -------------------------------------------------------------------------------- /3_methanes_in_water/rdf.xvg: -------------------------------------------------------------------------------- 1 | # This file was created Mon Aug 17 07:44:56 2015 2 | # Created by: 3 | # :-) GROMACS - gmx rdf, VERSION 5.1 (-: 4 | # 5 | # Executable: /usr/bin/gmx 6 | # Data prefix: /usr 7 | # Command line: 8 | # gmx rdf -f prd.xtc -n index.ndx 9 | # gmx rdf is part of G R O M A C S: 10 | # 11 | # Guyana Rwanda Oman Macau Angola Cameroon Senegal 12 | # 13 | # title "Radial distribution" 14 | # xaxis label "r (nm)" 15 | # yaxis label "g(r)" 16 | #TYPE xy 17 | # subtitle "reference C" 18 | # view 0.15, 0.15, 0.75, 0.85 19 | # legend on 20 | # legend box on 21 | # legend loctype view 22 | # legend 0.78, 0.8 23 | # legend length 2 24 | # s0 legend "C" 25 | 0.000 0.000 26 | 0.002 0.000 27 | 0.004 0.000 28 | 0.006 0.000 29 | 0.008 0.000 30 | 0.010 0.000 31 | 0.012 0.000 32 | 0.014 0.000 33 | 0.016 0.000 34 | 0.018 0.000 35 | 0.020 0.000 36 | 0.022 0.000 37 | 0.024 0.000 38 | 0.026 0.000 39 | 0.028 0.000 40 | 0.030 0.000 41 | 0.032 0.000 42 | 0.034 0.000 43 | 0.036 0.000 44 | 0.038 0.000 45 | 0.040 0.000 46 | 0.042 0.000 47 | 0.044 0.000 48 | 0.046 0.000 49 | 0.048 0.000 50 | 0.050 0.000 51 | 0.052 0.000 52 | 0.054 0.000 53 | 0.056 0.000 54 | 0.058 0.000 55 | 0.060 0.000 56 | 0.062 0.000 57 | 0.064 0.000 58 | 0.066 0.000 59 | 0.068 0.000 60 | 0.070 0.000 61 | 0.072 0.000 62 | 0.074 0.000 63 | 0.076 0.000 64 | 0.078 0.000 65 | 0.080 0.000 66 | 0.082 0.000 67 | 0.084 0.000 68 | 0.086 0.000 69 | 0.088 0.000 70 | 0.090 0.000 71 | 0.092 0.000 72 | 0.094 0.000 73 | 0.096 0.000 74 | 0.098 0.000 75 | 0.100 0.000 76 | 0.102 0.000 77 | 0.104 0.000 78 | 0.106 0.000 79 | 0.108 0.000 80 | 0.110 0.000 81 | 0.112 0.000 82 | 0.114 0.000 83 | 0.116 0.000 84 | 0.118 0.000 85 | 0.120 0.000 86 | 0.122 0.000 87 | 0.124 0.000 88 | 0.126 0.000 89 | 0.128 0.000 90 | 0.130 0.000 91 | 0.132 0.000 92 | 0.134 0.000 93 | 0.136 0.000 94 | 0.138 0.000 95 | 0.140 0.000 96 | 0.142 0.000 97 | 0.144 0.000 98 | 0.146 0.000 99 | 0.148 0.000 100 | 0.150 0.000 101 | 0.152 0.000 102 | 0.154 0.000 103 | 0.156 0.000 104 | 0.158 0.000 105 | 0.160 0.000 106 | 0.162 0.000 107 | 0.164 0.000 108 | 0.166 0.000 109 | 0.168 0.000 110 | 0.170 0.000 111 | 0.172 0.000 112 | 0.174 0.000 113 | 0.176 0.000 114 | 0.178 0.000 115 | 0.180 0.000 116 | 0.182 0.000 117 | 0.184 0.000 118 | 0.186 0.000 119 | 0.188 0.000 120 | 0.190 0.000 121 | 0.192 0.000 122 | 0.194 0.000 123 | 0.196 0.000 124 | 0.198 0.000 125 | 0.200 0.000 126 | 0.202 0.000 127 | 0.204 0.000 128 | 0.206 0.000 129 | 0.208 0.000 130 | 0.210 0.000 131 | 0.212 0.000 132 | 0.214 0.000 133 | 0.216 0.000 134 | 0.218 0.000 135 | 0.220 0.000 136 | 0.222 0.000 137 | 0.224 0.000 138 | 0.226 0.000 139 | 0.228 0.000 140 | 0.230 0.000 141 | 0.232 0.000 142 | 0.234 0.000 143 | 0.236 0.000 144 | 0.238 0.000 145 | 0.240 0.000 146 | 0.242 0.000 147 | 0.244 0.000 148 | 0.246 0.000 149 | 0.248 0.000 150 | 0.250 0.000 151 | 0.252 0.000 152 | 0.254 0.000 153 | 0.256 0.000 154 | 0.258 0.000 155 | 0.260 0.000 156 | 0.262 0.000 157 | 0.264 0.000 158 | 0.266 0.000 159 | 0.268 0.000 160 | 0.270 0.000 161 | 0.272 0.000 162 | 0.274 0.000 163 | 0.276 0.000 164 | 0.278 0.000 165 | 0.280 0.000 166 | 0.282 0.000 167 | 0.284 0.000 168 | 0.286 0.000 169 | 0.288 0.000 170 | 0.290 0.000 171 | 0.292 0.000 172 | 0.294 0.006 173 | 0.296 0.000 174 | 0.298 0.000 175 | 0.300 0.005 176 | 0.302 0.011 177 | 0.304 0.000 178 | 0.306 0.047 179 | 0.308 0.036 180 | 0.310 0.025 181 | 0.312 0.055 182 | 0.314 0.104 183 | 0.316 0.107 184 | 0.318 0.154 185 | 0.320 0.157 186 | 0.322 0.179 187 | 0.324 0.283 188 | 0.326 0.367 189 | 0.328 0.331 190 | 0.330 0.470 191 | 0.332 0.478 192 | 0.334 0.612 193 | 0.336 0.730 194 | 0.338 0.777 195 | 0.340 0.953 196 | 0.342 1.038 197 | 0.344 1.104 198 | 0.346 1.153 199 | 0.348 1.345 200 | 0.350 1.321 201 | 0.352 1.574 202 | 0.354 1.630 203 | 0.356 1.866 204 | 0.358 1.838 205 | 0.360 1.968 206 | 0.362 1.909 207 | 0.364 2.098 208 | 0.366 2.184 209 | 0.368 2.157 210 | 0.370 2.201 211 | 0.372 2.378 212 | 0.374 2.259 213 | 0.376 2.318 214 | 0.378 2.378 215 | 0.380 2.519 216 | 0.382 2.513 217 | 0.384 2.510 218 | 0.386 2.474 219 | 0.388 2.591 220 | 0.390 2.375 221 | 0.392 2.269 222 | 0.394 2.287 223 | 0.396 2.410 224 | 0.398 2.241 225 | 0.400 2.316 226 | 0.402 2.368 227 | 0.404 2.309 228 | 0.406 2.284 229 | 0.408 2.273 230 | 0.410 2.248 231 | 0.412 2.123 232 | 0.414 2.060 233 | 0.416 1.964 234 | 0.418 1.895 235 | 0.420 1.783 236 | 0.422 1.840 237 | 0.424 1.852 238 | 0.426 1.910 239 | 0.428 1.751 240 | 0.430 1.635 241 | 0.432 1.690 242 | 0.434 1.543 243 | 0.436 1.459 244 | 0.438 1.472 245 | 0.440 1.448 246 | 0.442 1.497 247 | 0.444 1.491 248 | 0.446 1.343 249 | 0.448 1.390 250 | 0.450 1.315 251 | 0.452 1.296 252 | 0.454 1.204 253 | 0.456 1.191 254 | 0.458 1.153 255 | 0.460 1.129 256 | 0.462 1.106 257 | 0.464 1.055 258 | 0.466 1.058 259 | 0.468 0.946 260 | 0.470 0.969 261 | 0.472 0.941 262 | 0.474 0.966 263 | 0.476 1.007 264 | 0.478 1.018 265 | 0.480 0.916 266 | 0.482 0.944 267 | 0.484 0.918 268 | 0.486 0.851 269 | 0.488 0.825 270 | 0.490 0.804 271 | 0.492 0.888 272 | 0.494 0.787 273 | 0.496 0.783 274 | 0.498 0.777 275 | 0.500 0.761 276 | 0.502 0.737 277 | 0.504 0.726 278 | 0.506 0.773 279 | 0.508 0.760 280 | 0.510 0.772 281 | 0.512 0.707 282 | 0.514 0.699 283 | 0.516 0.705 284 | 0.518 0.696 285 | 0.520 0.651 286 | 0.522 0.675 287 | 0.524 0.657 288 | 0.526 0.650 289 | 0.528 0.638 290 | 0.530 0.660 291 | 0.532 0.620 292 | 0.534 0.658 293 | 0.536 0.662 294 | 0.538 0.689 295 | 0.540 0.620 296 | 0.542 0.629 297 | 0.544 0.647 298 | 0.546 0.574 299 | 0.548 0.606 300 | 0.550 0.596 301 | 0.552 0.634 302 | 0.554 0.589 303 | 0.556 0.580 304 | 0.558 0.636 305 | 0.560 0.695 306 | 0.562 0.641 307 | 0.564 0.624 308 | 0.566 0.670 309 | 0.568 0.638 310 | 0.570 0.642 311 | 0.572 0.639 312 | 0.574 0.672 313 | 0.576 0.617 314 | 0.578 0.607 315 | 0.580 0.626 316 | 0.582 0.659 317 | 0.584 0.613 318 | 0.586 0.649 319 | 0.588 0.676 320 | 0.590 0.626 321 | 0.592 0.661 322 | 0.594 0.643 323 | 0.596 0.706 324 | 0.598 0.641 325 | 0.600 0.605 326 | 0.602 0.628 327 | 0.604 0.692 328 | 0.606 0.635 329 | 0.608 0.694 330 | 0.610 0.739 331 | 0.612 0.728 332 | 0.614 0.698 333 | 0.616 0.781 334 | 0.618 0.733 335 | 0.620 0.736 336 | 0.622 0.754 337 | 0.624 0.791 338 | 0.626 0.804 339 | 0.628 0.792 340 | 0.630 0.791 341 | 0.632 0.811 342 | 0.634 0.825 343 | 0.636 0.821 344 | 0.638 0.817 345 | 0.640 0.825 346 | 0.642 0.845 347 | 0.644 0.864 348 | 0.646 0.855 349 | 0.648 0.894 350 | 0.650 0.916 351 | 0.652 0.945 352 | 0.654 0.943 353 | 0.656 0.928 354 | 0.658 0.935 355 | 0.660 0.914 356 | 0.662 0.935 357 | 0.664 1.003 358 | 0.666 0.996 359 | 0.668 1.046 360 | 0.670 1.015 361 | 0.672 1.010 362 | 0.674 1.023 363 | 0.676 1.017 364 | 0.678 1.028 365 | 0.680 1.024 366 | 0.682 1.061 367 | 0.684 0.997 368 | 0.686 1.035 369 | 0.688 1.034 370 | 0.690 1.088 371 | 0.692 1.053 372 | 0.694 1.031 373 | 0.696 1.062 374 | 0.698 1.101 375 | 0.700 0.960 376 | 0.702 1.105 377 | 0.704 1.043 378 | 0.706 1.041 379 | 0.708 1.188 380 | 0.710 1.011 381 | 0.712 1.113 382 | 0.714 1.088 383 | 0.716 1.090 384 | 0.718 1.082 385 | 0.720 1.094 386 | 0.722 1.028 387 | 0.724 1.129 388 | 0.726 1.068 389 | 0.728 1.033 390 | 0.730 1.055 391 | 0.732 1.049 392 | 0.734 1.043 393 | 0.736 1.056 394 | 0.738 1.038 395 | 0.740 1.040 396 | 0.742 1.012 397 | 0.744 1.019 398 | 0.746 0.967 399 | 0.748 0.985 400 | 0.750 0.992 401 | 0.752 1.001 402 | 0.754 0.984 403 | 0.756 0.959 404 | 0.758 0.961 405 | 0.760 0.982 406 | 0.762 0.956 407 | 0.764 0.941 408 | 0.766 0.972 409 | 0.768 0.976 410 | 0.770 0.974 411 | 0.772 0.973 412 | 0.774 0.948 413 | 0.776 0.914 414 | 0.778 0.909 415 | 0.780 0.958 416 | 0.782 0.985 417 | 0.784 0.894 418 | 0.786 0.893 419 | 0.788 0.906 420 | 0.790 0.885 421 | 0.792 0.889 422 | 0.794 0.895 423 | 0.796 0.852 424 | 0.798 0.879 425 | 0.800 0.884 426 | 0.802 0.846 427 | 0.804 0.857 428 | 0.806 0.859 429 | 0.808 0.828 430 | 0.810 0.884 431 | 0.812 0.893 432 | 0.814 0.797 433 | 0.816 0.828 434 | 0.818 0.796 435 | 0.820 0.840 436 | 0.822 0.807 437 | 0.824 0.815 438 | 0.826 0.803 439 | 0.828 0.786 440 | 0.830 0.863 441 | 0.832 0.823 442 | 0.834 0.808 443 | 0.836 0.828 444 | 0.838 0.817 445 | 0.840 0.804 446 | 0.842 0.773 447 | 0.844 0.815 448 | 0.846 0.802 449 | 0.848 0.797 450 | 0.850 0.819 451 | 0.852 0.781 452 | 0.854 0.797 453 | 0.856 0.785 454 | 0.858 0.771 455 | 0.860 0.773 456 | 0.862 0.759 457 | 0.864 0.735 458 | 0.866 0.783 459 | 0.868 0.771 460 | 0.870 0.766 461 | 0.872 0.812 462 | 0.874 0.799 463 | 0.876 0.809 464 | 0.878 0.792 465 | 0.880 0.832 466 | 0.882 0.820 467 | 0.884 0.806 468 | 0.886 0.834 469 | 0.888 0.787 470 | 0.890 0.775 471 | 0.892 0.804 472 | 0.894 0.793 473 | 0.896 0.805 474 | 0.898 0.804 475 | 0.900 0.772 476 | 0.902 0.795 477 | 0.904 0.821 478 | 0.906 0.808 479 | 0.908 0.812 480 | 0.910 0.804 481 | 0.912 0.839 482 | 0.914 0.827 483 | 0.916 0.836 484 | 0.918 0.824 485 | 0.920 0.855 486 | 0.922 0.844 487 | 0.924 0.871 488 | 0.926 0.864 489 | 0.928 0.827 490 | 0.930 0.854 491 | 0.932 0.872 492 | 0.934 0.859 493 | 0.936 0.811 494 | 0.938 0.836 495 | 0.940 0.912 496 | 0.942 0.880 497 | 0.944 0.874 498 | 0.946 0.914 499 | 0.948 0.895 500 | 0.950 0.874 501 | 0.952 0.920 502 | 0.954 0.866 503 | 0.956 0.911 504 | 0.958 0.878 505 | 0.960 0.887 506 | 0.962 0.913 507 | 0.964 0.936 508 | 0.966 0.902 509 | 0.968 0.923 510 | 0.970 0.922 511 | 0.972 0.890 512 | 0.974 0.906 513 | 0.976 0.913 514 | 0.978 0.941 515 | 0.980 0.914 516 | 0.982 0.962 517 | 0.984 0.949 518 | 0.986 0.961 519 | 0.988 0.966 520 | 0.990 0.910 521 | 0.992 0.927 522 | 0.994 0.913 523 | 0.996 0.944 524 | 0.998 0.952 525 | 1.000 0.946 526 | 1.002 0.967 527 | 1.004 0.967 528 | 1.006 0.954 529 | 1.008 0.974 530 | 1.010 0.959 531 | 1.012 0.991 532 | 1.014 0.993 533 | 1.016 0.967 534 | 1.018 0.941 535 | 1.020 0.949 536 | 1.022 0.971 537 | 1.024 0.957 538 | 1.026 0.948 539 | 1.028 0.961 540 | 1.030 0.933 541 | 1.032 0.962 542 | 1.034 0.926 543 | 1.036 0.954 544 | 1.038 0.918 545 | 1.040 0.970 546 | 1.042 0.936 547 | 1.044 0.960 548 | 1.046 0.921 549 | 1.048 0.933 550 | 1.050 0.942 551 | 1.052 0.911 552 | 1.054 0.927 553 | 1.056 0.963 554 | 1.058 0.947 555 | 1.060 0.940 556 | 1.062 0.921 557 | 1.064 0.944 558 | 1.066 0.954 559 | 1.068 0.963 560 | 1.070 0.911 561 | 1.072 0.961 562 | 1.074 0.936 563 | 1.076 0.969 564 | 1.078 0.931 565 | 1.080 0.910 566 | 1.082 0.916 567 | 1.084 0.922 568 | 1.086 0.934 569 | 1.088 0.943 570 | 1.090 0.938 571 | 1.092 0.906 572 | 1.094 0.968 573 | 1.096 0.900 574 | 1.098 0.925 575 | 1.100 0.936 576 | 1.102 0.913 577 | 1.104 0.899 578 | 1.106 0.933 579 | 1.108 0.948 580 | 1.110 0.911 581 | 1.112 0.905 582 | 1.114 0.915 583 | 1.116 0.896 584 | 1.118 0.910 585 | 1.120 0.901 586 | 1.122 0.920 587 | 1.124 0.934 588 | 1.126 0.878 589 | 1.128 0.915 590 | 1.130 0.896 591 | 1.132 0.889 592 | 1.134 0.905 593 | 1.136 0.913 594 | 1.138 0.899 595 | 1.140 0.914 596 | 1.142 0.894 597 | 1.144 0.911 598 | 1.146 0.882 599 | 1.148 0.881 600 | 1.150 0.902 601 | 1.152 0.888 602 | 1.154 0.905 603 | 1.156 0.914 604 | 1.158 0.893 605 | 1.160 0.911 606 | 1.162 0.922 607 | 1.164 0.865 608 | 1.166 0.889 609 | 1.168 0.896 610 | 1.170 0.901 611 | 1.172 0.918 612 | 1.174 0.898 613 | 1.176 0.841 614 | 1.178 0.890 615 | 1.180 0.865 616 | 1.182 0.879 617 | 1.184 0.905 618 | 1.186 0.910 619 | 1.188 0.870 620 | 1.190 0.903 621 | 1.192 0.885 622 | 1.194 0.911 623 | 1.196 0.871 624 | 1.198 0.901 625 | 1.200 0.905 626 | 1.202 0.895 627 | 1.204 0.885 628 | 1.206 0.902 629 | 1.208 0.898 630 | 1.210 0.888 631 | 1.212 0.881 632 | 1.214 0.879 633 | 1.216 0.876 634 | 1.218 0.902 635 | 1.220 0.938 636 | 1.222 0.882 637 | 1.224 0.915 638 | 1.226 0.890 639 | 1.228 0.905 640 | 1.230 0.896 641 | 1.232 0.885 642 | 1.234 0.897 643 | 1.236 0.877 644 | 1.238 0.889 645 | 1.240 0.900 646 | 1.242 0.900 647 | 1.244 0.885 648 | 1.246 0.870 649 | 1.248 0.887 650 | 1.250 0.875 651 | 1.252 0.920 652 | 1.254 0.909 653 | 1.256 0.909 654 | 1.258 0.891 655 | 1.260 0.894 656 | 1.262 0.896 657 | 1.264 0.898 658 | 1.266 0.907 659 | 1.268 0.872 660 | 1.270 0.905 661 | 1.272 0.913 662 | 1.274 0.918 663 | 1.276 0.889 664 | 1.278 0.912 665 | 1.280 0.891 666 | 1.282 0.875 667 | 1.284 0.885 668 | 1.286 0.864 669 | 1.288 0.882 670 | 1.290 0.901 671 | 1.292 0.877 672 | 1.294 0.903 673 | 1.296 0.909 674 | 1.298 0.920 675 | 1.300 0.893 676 | 1.302 0.896 677 | 1.304 0.905 678 | 1.306 0.906 679 | 1.308 0.909 680 | 1.310 0.897 681 | 1.312 0.907 682 | 1.314 0.901 683 | 1.316 0.900 684 | 1.318 0.918 685 | 1.320 0.953 686 | 1.322 0.932 687 | 1.324 0.919 688 | 1.326 0.898 689 | 1.328 0.900 690 | 1.330 0.904 691 | 1.332 0.922 692 | 1.334 0.890 693 | 1.336 0.879 694 | 1.338 0.923 695 | 1.340 0.879 696 | 1.342 0.918 697 | 1.344 0.900 698 | 1.346 0.917 699 | 1.348 0.916 700 | 1.350 0.913 701 | 1.352 0.893 702 | 1.354 0.890 703 | 1.356 0.915 704 | 1.358 0.893 705 | 1.360 0.889 706 | 1.362 0.887 707 | 1.364 0.929 708 | 1.366 0.893 709 | 1.368 0.892 710 | 1.370 0.891 711 | 1.372 0.901 712 | 1.374 0.866 713 | 1.376 0.901 714 | 1.378 0.917 715 | 1.380 0.918 716 | 1.382 0.911 717 | 1.384 0.917 718 | 1.386 0.911 719 | 1.388 0.912 720 | 1.390 0.893 721 | 1.392 0.906 722 | 1.394 0.911 723 | 1.396 0.920 724 | 1.398 0.907 725 | 1.400 0.890 726 | 1.402 0.886 727 | 1.404 0.914 728 | 1.406 0.891 729 | 1.408 0.900 730 | 1.410 0.905 731 | 1.412 0.882 732 | 1.414 0.940 733 | 1.416 0.907 734 | 1.418 0.906 735 | 1.420 0.893 736 | 1.422 0.906 737 | 1.424 0.899 738 | 1.426 0.885 739 | 1.428 0.920 740 | 1.430 0.909 741 | 1.432 0.911 742 | 1.434 0.910 743 | 1.436 0.915 744 | 1.438 0.918 745 | 1.440 0.912 746 | 1.442 0.921 747 | 1.444 0.907 748 | 1.446 0.903 749 | 1.448 0.923 750 | 1.450 0.901 751 | 1.452 0.896 752 | 1.454 0.894 753 | 1.456 0.915 754 | 1.458 0.903 755 | 1.460 0.896 756 | 1.462 0.876 757 | 1.464 0.915 758 | 1.466 0.877 759 | 1.468 0.902 760 | 1.470 0.892 761 | 1.472 0.890 762 | 1.474 0.888 763 | 1.476 0.891 764 | 1.478 0.900 765 | 1.480 0.875 766 | 1.482 0.882 767 | 1.484 0.888 768 | 1.486 0.906 769 | 1.488 0.919 770 | 1.490 0.884 771 | 1.492 0.884 772 | 1.494 0.892 773 | 1.496 0.882 774 | 1.498 0.897 775 | 1.500 0.904 776 | 1.502 0.904 777 | 1.504 0.914 778 | 1.506 0.877 779 | 1.508 0.876 780 | 1.510 0.911 781 | 1.512 0.912 782 | 1.514 0.885 783 | 1.516 0.902 784 | 1.518 0.879 785 | 1.520 0.892 786 | 1.522 0.901 787 | 1.524 0.900 788 | 1.526 0.892 789 | 1.528 0.911 790 | 1.530 0.895 791 | 1.532 0.931 792 | 1.534 0.898 793 | 1.536 0.884 794 | 1.538 0.910 795 | 1.540 0.900 796 | 1.542 0.887 797 | 1.544 0.882 798 | 1.546 0.877 799 | 1.548 0.899 800 | 1.550 0.898 801 | 1.552 0.904 802 | 1.554 0.914 803 | 1.556 0.904 804 | -------------------------------------------------------------------------------- /3_methanes_in_water/rdf1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/3_methanes_in_water/rdf1.png -------------------------------------------------------------------------------- /3_methanes_in_water/rdf2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/3_methanes_in_water/rdf2.png -------------------------------------------------------------------------------- /4_methane_fe/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 4: Methane Free Energy of Solvation 4 | ============================================ 5 | 6 | In this tutorial I'll show you how to perform a free energy of solvation 7 | simulation using GROMACS, as well as how to calculate the free energy change 8 | using [MBAR](http://dx.doi.org/10.1063/1.2978177). As always, this tutorial builds off of the previous ones, especially 9 | tutorials 1 and 2. 10 | 11 | I recommend visiting the [Alchemistry](http://alchemistry.org) website if you 12 | are unfamiliar with free energy calculations. [This 13 | page](http://www.alchemistry.org/wiki/Example:_Solvation_of_OPLS-AA_Ethanol_in_TIP3P_Water) 14 | in particular is relevant. This tutorial follows the direct calculation. State A 15 | for us is a methane fully interacting in water. State B will be a methane with all 16 | van der Waals and Coulomb interactions with the water turned off; the 17 | methane can interact with itself and the water can interact with itself but not 18 | with each other. It's as if we have taken the methane out of the water and put 19 | it into a vacuum, while somewhere else we still have the water the methane was 20 | in. We have 15 total states where we will be linearly turning off the 21 | electrostatic interactions and then using a soft-core potential to turn off the 22 | van der Waals interactions. 23 | 24 | Setup 25 | ----- 26 | 27 | ### Box creation 28 | 29 | Reuse the `methane.pdb` and `topol.top` files that we've been using so far for 30 | the OPLS methane and TIP4PEW water. Remove any solvent from the `topol.top` file 31 | (delete the last line which starts with `SOL`). Make sure that the name for the 32 | methane under `[ moleculetype ]` is 'Methane' (no quotes), as well as under `[ 33 | molecules ]`. We'll be using one methane, so if you have more listed, change it 34 | to 1 now. 35 | 36 | This time we're using a different box type so that we won't have to use as much 37 | water. We'll use a dodecahedron box at 1.2 nm out in each direction from the 38 | methane. First create the box: 39 | 40 | ```bash 41 | $ gmx editconf -f methane.pdb -bt dodec -d 1.2 -o box.gro 42 | ``` 43 | 44 | Now fill with solvent: 45 | 46 | ```bash 47 | $ gmx solvate -cs tip4p -cp box.gro -o conf.gro -p topol.top 48 | ``` 49 | 50 | ### Parameter files 51 | 52 | The parameter files we'll be using are almost exactly the same as previous 53 | tutorials, except we're adding a free energy section in order to slowly turn off 54 | our methane. Additionally we need a parameter file for each state. We have 55 | 15 minimizations, 15 equilbirations, etc. But we'll use a script to simply 56 | update the appropriate values in a template, so we actually only will have to 57 | have one for each part of the simulation. At each state we'll do our two 58 | minimizations, equilibrate at NVT for 100 ps, equilibrate at NPT for 1 ns, and 59 | then do a production run for 5 ns. 60 | 61 | The files can be downloaded here: 62 | 63 | * [Minimization](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/4_methane_fe/mdp/min.mdp) 64 | * [Minimization 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/4_methane_fe/mdp/min2.mdp) 65 | * [Equilibration](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/4_methane_fe/mdp/eql.mdp) 66 | * [Equilibration 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/4_methane_fe/mdp/eql2.mdp) 67 | * [Production](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/4_methane_fe/mdp/prd.mdp) 68 | 69 | Here's an explanation of some of these new values: 70 | 71 | | parameter | value | explanation | 72 | | ---------------|-----------|-------------| 73 | | free-energy | yes | Do a free energy simulation. | 74 | | init-lambda-state | MYLAMBDA | The value I have in the files is not actually what will be present when we run the simulation. This is a placeholder for an integer number. We are simulating 15 different states, so this number will range from 0 through 14. Our script will replace it for each state. | 75 | | calc-lambda-neighbors | -1 | The delta H values will be written for each state. Necessary for MBAR. | 76 | | vdw-lambdas | see file | We're turning off VDW at 0.1-lambda increments after electrostatics are off. init-lambda-state=0 corresponds to the first value in this array, init-lambda-state=1 the second, and so on. | 77 | | coul-lambdas | see file | We're turning off electrostatics at 0.25-lambda increments first. Just like vdw-lambdas, the init-lambda-state indicates which column is being used.| 78 | | couple-moltype | Methane | Matches the name of the `[ moleculetype ]` in the topology file that we are coupling/decoupling | 79 | | couple-lambda0 | vdw-q | When lambda is 0 (state A) both VDW and electrostatics are completely on. | 80 | | couple-lambda1 | none | When lambda is 1 (state B) no nonbonded interations are on. | 81 | | couple-intramol | no | Intramolecular terms are not turned off. Usually what you want so you don't have to run it again in vacuum. | 82 | | nstdhdl | 100 | How often in steps we're outputting dHdlambda | 83 | | sc-alpha | 0.5 | We're using a soft-core potential for VDW. This parameter is a term in the soft-core function. See the manual. | 84 | | sc-power | 1 | See above. | 85 | | sc-sigma | 0.3 | See above. | 86 | | sc-coul | no | Don't use soft core for electrostatics | 87 | 88 | One last note on the parameter files: we're using the `sd` integrator, which 89 | stands for stochastic dynamics. `sd` itself controls the temperature, so we're 90 | no longer using Nose-Hoover. If you were to use `md` you would get a warning 91 | that you may not be properly sampling the decoupled state. 92 | 93 | Simulation 94 | ---------- 95 | 96 | As stated earlier we're actually running 15 simulations. To make this easier and 97 | in order to avoid having 15 different mdp files as inputs, use the following 98 | bash script to loop through and run each state: 99 | 100 | ```bash 101 | #!/bin/bash 102 | 103 | set -e 104 | 105 | for ((i=0;i<15;i++)); do 106 | 107 | sed 's/MYLAMBDA/'$i'/g' mdp/min.mdp > grompp.mdp 108 | if [[ $i -eq 0 ]]; then 109 | gmx grompp -o min.$i -pp min.$i -po min.$i 110 | else 111 | gmx grompp -c prd.$(($i-1)).gro -o min.$i -pp min.$i -po min.$i 112 | fi 113 | gmx mdrun -deffnm min.$i 114 | 115 | sed 's/MYLAMBDA/'$i'/g' mdp/min2.mdp > grompp.mdp 116 | gmx grompp -o min2.$i -c min.$i -t min.$i -pp min2.$i -po min2.$i -maxwarn 1 117 | gmx mdrun -deffnm min2.$i 118 | 119 | sed 's/MYLAMBDA/'$i'/g' mdp/eql.mdp > grompp.mdp 120 | gmx grompp -o eql.$i -c min2.$i -t min2.$i -pp eql.$i -po eql.$i 121 | gmx mdrun -deffnm eql.$i 122 | 123 | sed 's/MYLAMBDA/'$i'/g' mdp/eql2.mdp > grompp.mdp 124 | gmx grompp -o eql2.$i -c eql.$i -t eql.$i -pp eql2.$i -po eql2.$i 125 | gmx mdrun -deffnm eql2.$i 126 | 127 | sed 's/MYLAMBDA/'$i'/g' mdp/prd.mdp > grompp.mdp 128 | gmx grompp -o prd.$i -c eql2.$i -t eql2.$i -pp prd.$i -po prd.$i 129 | gmx mdrun -deffnm prd.$i 130 | 131 | done 132 | ``` 133 | 134 | The script uses a for loop going from i=0 through i=14. In each iteration it 135 | uses `sed` to find and replace the keyword `MYLAMBDA` I placed in our mdp file 136 | template with the correct lambda state. It saves this file as `grompp.mdp` which 137 | is the default file name that *gmx grompp* looks for. All of our output is 138 | suffixed with the lambda state. Additionally all lambda states greater than 0 139 | use the previous state's final structure file. This isn't entirely necessary 140 | for methane decoupling, but it could possibly be beneficial in other systems. 141 | 142 | Put the above in a script named `run`. The script assumes you have downloaded 143 | and placed the mdp files in a subdirectory named `mdp`. Then do: 144 | 145 | ```bash 146 | $ chmod +x run 147 | $ ./run 148 | ``` 149 | 150 | Analysis 151 | -------- 152 | 153 | We'll be using MBAR, specifically the python implementation known as pymbar. The 154 | [alchemical analysis](https://github.com/MobleyLab/alchemical-analysis) script 155 | provides an easy way to perform the calculation and actually provides several 156 | different methods with error analysis. 157 | 158 | After downloading and installing the script, run it in the directory with the 159 | results: 160 | 161 | ```bash 162 | $ alchemical_analysis -p prd. -u kcal 163 | ``` 164 | 165 | Your output should look something like this: 166 | 167 | ------------ --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- 168 | States TI (kcal/mol) TI-CUBIC (kcal/mol) DEXP (kcal/mol) IEXP (kcal/mol) BAR (kcal/mol) MBAR (kcal/mol) 169 | ------------ --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- 170 | 0 -- 1 0.002 +- 0.000 0.002 +- 0.000 0.002 +- 0.000 0.001 +- 0.000 0.002 +- 0.000 0.002 +- 0.000 171 | 1 -- 2 -0.000 +- 0.000 -0.000 +- 0.000 -0.001 +- 0.000 -0.000 +- 0.000 -0.000 +- 0.000 -0.001 +- 0.000 172 | 2 -- 3 -0.003 +- 0.000 -0.003 +- 0.000 -0.002 +- 0.000 -0.003 +- 0.000 -0.003 +- 0.000 -0.003 +- 0.000 173 | 3 -- 4 -0.005 +- 0.000 -0.005 +- 0.000 -0.005 +- 0.000 -0.006 +- 0.000 -0.005 +- 0.000 -0.005 +- 0.000 174 | 4 -- 5 0.093 +- 0.002 0.094 +- 0.002 0.090 +- 0.005 0.096 +- 0.003 0.095 +- 0.002 0.094 +- 0.001 175 | 5 -- 6 0.063 +- 0.002 0.065 +- 0.003 0.055 +- 0.010 0.063 +- 0.003 0.064 +- 0.002 0.060 +- 0.001 176 | 6 -- 7 0.013 +- 0.003 0.014 +- 0.003 0.025 +- 0.006 0.009 +- 0.003 0.014 +- 0.003 0.014 +- 0.002 177 | 7 -- 8 -0.055 +- 0.003 -0.052 +- 0.004 -0.051 +- 0.008 -0.050 +- 0.004 -0.052 +- 0.003 -0.052 +- 0.002 178 | 8 -- 9 -0.157 +- 0.004 -0.151 +- 0.005 -0.149 +- 0.014 -0.155 +- 0.006 -0.153 +- 0.004 -0.156 +- 0.003 179 | 9 -- 10 -0.338 +- 0.006 -0.324 +- 0.006 -0.306 +- 0.020 -0.332 +- 0.007 -0.330 +- 0.005 -0.336 +- 0.004 180 | 10 -- 11 -0.602 +- 0.005 -0.621 +- 0.006 -0.595 +- 0.016 -0.631 +- 0.006 -0.626 +- 0.005 -0.627 +- 0.004 181 | 11 -- 12 -0.674 +- 0.003 -0.708 +- 0.003 -0.708 +- 0.005 -0.709 +- 0.004 -0.708 +- 0.003 -0.711 +- 0.002 182 | 12 -- 13 -0.437 +- 0.001 -0.437 +- 0.002 -0.435 +- 0.002 -0.441 +- 0.002 -0.437 +- 0.001 -0.438 +- 0.001 183 | 13 -- 14 -0.138 +- 0.001 -0.134 +- 0.001 -0.131 +- 0.001 -0.132 +- 0.001 -0.131 +- 0.001 -0.130 +- 0.000 184 | ------------ --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- 185 | Coulomb: -0.007 +- 0.001 -0.007 +- 0.001 -0.006 +- 0.001 -0.007 +- 0.001 -0.007 +- 0.000 -0.007 +- 0.000 186 | vdWaals: -2.232 +- 0.015 -2.255 +- 0.015 -2.205 +- 0.033 -2.281 +- 0.013 -2.265 +- 0.010 -2.282 +- 0.013 187 | TOTAL: -2.238 +- 0.015 -2.262 +- 0.015 -2.211 +- 0.033 -2.288 +- 0.013 -2.272 +- 0.010 -2.289 +- 0.013 188 | 189 | This is the free energy of removing a methane, so the free energy of solvation 190 | is actually negative one times this, since it is the reverse process. Our result 191 | of 2.289 kcal / mol is comparable to published figures. [In a paper that 192 | simulated OPLS methane with TIP3P](http://dx.doi.org/10.1063/1.1587119), 193 | they achieved a result of 2.44 kcal/mol. The difference can probably be 194 | attributed to using a different water model. 195 | 196 | Note that the script provides six different results from six different methods. 197 | Some of these methods are better than others, but the fact that all six are 198 | close to each other tells us we probably sampled enough states to get an 199 | accurate number. MBAR is one of the better methods, although BAR and TI are good 200 | as well. I reran the script to gather some more analysis: 201 | 202 | ```bash 203 | $ alchemical_analysis -p prd. -u kcal -g -f 20 204 | ``` 205 | 206 | Here is a visual comparison of the calculated value for each segment: 207 | 208 | ![Methods](dF_state.png) 209 | 210 | I can see that one of the methods (DEXP) gets a different results for 211 | calculations between states 5 and 6 as well as between 6 and 7. I'm not too 212 | concerned about this, since the other methods line up well and DEXP is not one 213 | of the "better" methods. 214 | 215 | And here is the curve: 216 | 217 | ![dHdl](dhdl_TI.png) 218 | 219 | Here we are looking for places where the curvature is high.The curvature is 220 | higher around states 10, 11, and 12. Depending on our application, we might want 221 | to possibly sample more states in that area. 222 | 223 | Lastly, here is a plot of the result calculated as a function of time, both 224 | running the simulation forward and running it in reverse: 225 | 226 | ![dF_time](dF_t.png) 227 | 228 | The point here is that we're looking to make sure that the simulation is 229 | well-equilibrated; otherwise, the result will not be correct. If the curves were 230 | flat for any significant portion of the first part of the plot, this would 231 | indicate our system may not be well equilibrated before we started the 232 | simulation. We could discard that non-equilibrated data and redo the 233 | calculation. 234 | 235 | There are a couple of other command line flags you can use with the 236 | `alchemical_analysis` script. Be sure to checkout the homepage of the script and 237 | the [paper on best practices in free energy analysis](10.1007/s10822-015-9840-9) 238 | which goes much more into detail on these and other plots. I won't go into 239 | detail of all the options here. 240 | 241 | Summary 242 | ------- 243 | 244 | In this tutorial we performed a free energy simulation on methane in water. We 245 | turned off electrostatics linearly first, and then we used a soft-core potential 246 | to turn off the van der Waals interactions. The intramolecular interactions for 247 | methane remained on, so its as if we were removing the methane from the water 248 | and placing it in a vacuum. Our result of 2.289 kcal /mol is comparable to 249 | published results. 250 | 251 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 252 | -------------------------------------------------------------------------------- /4_methane_fe/dF_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/4_methane_fe/dF_state.png -------------------------------------------------------------------------------- /4_methane_fe/dF_t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/4_methane_fe/dF_t.png -------------------------------------------------------------------------------- /4_methane_fe/dhdl_TI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/4_methane_fe/dhdl_TI.png -------------------------------------------------------------------------------- /4_methane_fe/mdp/eql.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = sd 3 | dt = 0.002 ; 2 fs 4 | nsteps = 50000 ; 100 ps 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | gen-vel = yes 11 | gen-temp = 298.15 12 | 13 | constraint-algorithm = lincs 14 | constraints = h-bonds 15 | 16 | cutoff-scheme = Verlet 17 | 18 | coulombtype = PME 19 | rcoulomb = 1.0 20 | 21 | vdwtype = Cut-off 22 | rvdw = 1.0 23 | DispCorr = EnerPres 24 | 25 | tcoupl = Nose-Hoover 26 | tc-grps = System 27 | tau-t = 2.0 28 | ref-t = 298.15 29 | nhchainlength = 1 30 | 31 | free-energy = yes 32 | init-lambda-state = MYLAMBDA 33 | calc-lambda-neighbors = -1 34 | vdw-lambdas = 0.00 0.00 0.00 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 35 | coul-lambdas = 0.00 0.25 0.50 0.75 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 36 | couple-moltype = Methane 37 | couple-lambda0 = vdw-q 38 | couple-lambda1 = none 39 | couple-intramol = no 40 | nstdhdl = 100 41 | sc-alpha = 0.5 42 | sc-coul = no 43 | sc-power = 1 44 | sc-sigma = 0.3 45 | -------------------------------------------------------------------------------- /4_methane_fe/mdp/eql2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = sd 3 | dt = 0.002 ; 2 fs 4 | nsteps = 500000 ; 1.0 ns 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | 16 | coulombtype = PME 17 | rcoulomb = 1.0 18 | 19 | vdwtype = Cut-off 20 | rvdw = 1.0 21 | DispCorr = EnerPres 22 | 23 | tcoupl = Nose-Hoover 24 | tc-grps = System 25 | tau-t = 2.0 26 | ref-t = 298.15 27 | nhchainlength = 1 28 | 29 | pcoupl = Parrinello-Rahman 30 | tau_p = 2.0 31 | compressibility = 4.46e-5 32 | ref_p = 1.0 33 | 34 | free-energy = yes 35 | init-lambda-state = MYLAMBDA 36 | calc-lambda-neighbors = -1 37 | vdw-lambdas = 0.00 0.00 0.00 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 38 | coul-lambdas = 0.00 0.25 0.50 0.75 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 39 | couple-moltype = Methane 40 | couple-lambda0 = vdw-q 41 | couple-lambda1 = none 42 | couple-intramol = no 43 | nstdhdl = 100 44 | sc-alpha = 0.5 45 | sc-coul = no 46 | sc-power = 1 47 | sc-sigma = 0.3 48 | -------------------------------------------------------------------------------- /4_methane_fe/mdp/min.mdp: -------------------------------------------------------------------------------- 1 | 2 | define = -DFLEXIBLE 3 | integrator = steep 4 | nsteps = 1000 5 | 6 | nstenergy = 500 7 | nstlog = 500 8 | nstxout-compressed = 1000 9 | 10 | constraint-algorithm = lincs 11 | constraints = h-bonds 12 | 13 | cutoff-scheme = Verlet 14 | 15 | coulombtype = PME 16 | rcoulomb = 1.0 17 | 18 | vdwtype = Cut-off 19 | rvdw = 1.0 20 | DispCorr = EnerPres 21 | 22 | free-energy = yes 23 | init-lambda-state = MYLAMBDA 24 | calc-lambda-neighbors = -1 25 | vdw-lambdas = 0.00 0.00 0.00 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 26 | coul-lambdas = 0.00 0.25 0.50 0.75 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 27 | couple-moltype = Methane 28 | couple-lambda0 = vdw-q 29 | couple-lambda1 = none 30 | couple-intramol = no 31 | nstdhdl = 100 32 | sc-alpha = 0.5 33 | sc-coul = no 34 | sc-power = 1 35 | sc-sigma = 0.3 36 | -------------------------------------------------------------------------------- /4_methane_fe/mdp/min2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = steep 3 | nsteps = 50000 4 | 5 | nstenergy = 500 6 | nstlog = 500 7 | nstxout-compressed = 1000 8 | 9 | cutoff-scheme = Verlet 10 | 11 | coulombtype = PME 12 | rcoulomb = 1.0 13 | 14 | vdwtype = Cut-off 15 | rvdw = 1.0 16 | DispCorr = EnerPres 17 | 18 | free-energy = yes 19 | init-lambda-state = MYLAMBDA 20 | calc-lambda-neighbors = -1 21 | vdw-lambdas = 0.00 0.00 0.00 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 22 | coul-lambdas = 0.00 0.25 0.50 0.75 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 23 | couple-moltype = Methane 24 | couple-lambda0 = vdw-q 25 | couple-lambda1 = none 26 | couple-intramol = no 27 | nstdhdl = 100 28 | sc-alpha = 0.5 29 | sc-coul = no 30 | sc-power = 1 31 | sc-sigma = 0.3 32 | -------------------------------------------------------------------------------- /4_methane_fe/mdp/prd.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = sd 3 | dt = 0.002 ; 2 fs 4 | nsteps = 2500000 ; 5.0 ns 5 | 6 | nstenergy = 5000 7 | nstlog = 5000 8 | nstxout-compressed = 2000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | 16 | coulombtype = PME 17 | rcoulomb = 1.0 18 | 19 | vdwtype = Cut-off 20 | rvdw = 1.0 21 | DispCorr = EnerPres 22 | 23 | tcoupl = Nose-Hoover 24 | tc-grps = System 25 | tau-t = 2.0 26 | ref-t = 298.15 27 | nhchainlength = 1 28 | 29 | pcoupl = Parrinello-Rahman 30 | tau_p = 2.0 31 | compressibility = 4.46e-5 32 | ref_p = 1.0 33 | 34 | free-energy = yes 35 | init-lambda-state = MYLAMBDA 36 | calc-lambda-neighbors = -1 37 | vdw-lambdas = 0.00 0.00 0.00 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 38 | coul-lambdas = 0.00 0.25 0.50 0.75 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 39 | couple-moltype = Methane 40 | couple-lambda0 = vdw-q 41 | couple-lambda1 = none 42 | couple-intramol = no 43 | nstdhdl = 100 44 | sc-alpha = 0.5 45 | sc-coul = no 46 | sc-power = 1 47 | sc-sigma = 0.3 48 | -------------------------------------------------------------------------------- /5_umbrella/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 5: Methane-Methane PMF from Umbrella Sampling 4 | ====================================================== 5 | 6 | In this tutorial we'll be using [umbrella 7 | sampling](https://en.wikipedia.org/wiki/Umbrella_sampling) to extract the 8 | methane-methane potential of mean force. In tutorial 3 we got the PMF the direct 9 | way by simulating several methanes and getting the radial distribution function. 10 | It's not always possible to sample several solutes like this. 11 | 12 | We are going to take two methanes and restrain them at different distances using 13 | a harmonic potential. The different distances are "windows". In a regular 14 | simulation, like the one we did in tutorial 3, some of these windows are rarely 15 | sampled. Umbrella sampling solves this by forcing the molecules to stay within a 16 | certain range of a set distance. 17 | 18 | At the end we'll use the GROMACS implementation of weighted histogram analysis 19 | (WHAM) to reconstruct the PMF. [An article on the Alchemistry 20 | wiki](http://www.alchemistry.org/wiki/Weighted_Histogram_Analysis_Method) 21 | discusses WHAM in the context of alchemical changes. Here our reaction 22 | coordinate is the distance between the two methanes. 23 | 24 | Setup 25 | ----- 26 | 27 | ### Create box 28 | 29 | Once again we'll be reusing `methane.pdb` and `topol.top` from our previous 30 | tutorials. Insert two methanes into a box using *gmx insert-molecules* and then 31 | solvate the box using *gmx solvate*. The box needs to be cubic and at least 3.1 32 | nm in each direction for this tutorial. 33 | 34 | ### Create index file 35 | 36 | We also need to create an index file with the two groups we are interested in 37 | restraining with our umbrella potential. Create an index file using *gmx index* 38 | creating a group containing just one carbon from one of the methanes and name 39 | them `CA` and `CB` respectively. 40 | 41 | ```bash 42 | $ gmx make_ndx -f conf.gro 43 | ``` 44 | 45 | Then, assuming the residue `CH4` is in group 2: 46 | 47 | ``` 48 | > splitres 2 49 | ``` 50 | 51 | Now I assume the last two groups are 6 and 7 which are the two methane 52 | molecules: 53 | 54 | ``` 55 | > 6 & a C 56 | > 7 & a C 57 | ``` 58 | 59 | Now name the groups: 60 | 61 | ```bash 62 | > name 8 CA 63 | > name 9 CB 64 | > q 65 | ``` 66 | 67 | There are other ways to get to the same place with *gmx make_ndx*. The point is, 68 | you need to get each methane carbon in its own index group and name them `CA` 69 | and `CB`. 70 | 71 | ### Parameter files 72 | 73 | We're pretty much reusing the parameter files from the first few tutorials, 74 | except we'll be adding a section on center-of-mass (COM) pulling. The pull code 75 | is how we'll keep our methanes a specified distance apart. There are probably a 76 | few different ways to set this up, but for this system we'll manually specify 77 | each distance we want for the two methanes. 78 | 79 | The parameter files for each step are found here: 80 | 81 | * [Minimization](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/5_umbrella/mdp/min.mdp) 82 | * [Minimization 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/5_umbrella/mdp/min2.mdp) 83 | * [Equilibration](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/5_umbrella/mdp/eql.mdp) 84 | * [Equilibration 2](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/5_umbrella/mdp/eql2.mdp) 85 | * [Production](https://raw.githubusercontent.com/wesbarnett/gromacs-tutorials/master/5_umbrella/mdp/prd.mdp) 86 | 87 | Just like in the free energy tutorial, these files are templates with a keyword 88 | that will be replaced in a bash script. This is because we have to run a full 89 | set of simulations for each window and need to specify the distance in each 90 | one. 91 | 92 | Here's an explanation of the new parameters that are used in each file: 93 | 94 | | parameter | value | explanation | 95 | | ---------------|-----------|-------------| 96 | | pull | yes | Use the pull code. | 97 | | pull-ngroups | 2 | We have two groups that we're pulling. | 98 | | pull-group1-name | CA | We specified this in the index file. For us this will be the carbon of one of the methanes, although we probably could have chosen the entire methane. If we did that it would have been pulled along the COM of the entire molecule. | 99 | | pull-group2-name | CB | The carbon of the other methane. | 100 | | pull-ncoords | 1 | We are pulling along only one coordinate. | 101 | | pull-coord1-geometry | distance | We're going to pull along the vector connecting our two groups. | 102 | | pull-coord1-type | umbrella | Use an umbrella (harmonic) potential for this coordinate.| 103 | | pull-coord1-groups | 1 2 | For this pull coordinate these are the two groups (defined below) which will be pulled. You can actually have more thane one pull coordinate and so do pulling across different sets of molecules, but that's not applicable here. | 104 | | pull-coord1-k | 5000.0 | The force constant used in the umbrella potential in kJ/(mol nm). | 105 | | pull-coord1-init | WINDOW | This is the distance we want our two groups to be apart. I've put this keyword here that I'll replace in our bash script for each window | 106 | | pull-coord1-rate | 0.0 | We don't want the groups to move along the coordinate any, so this is 0. | 107 | | pull-coord1-start | no | We're manually specifying the distance for each window, so we do not want to add the center of mass distance to the calculation. | 108 | 109 | The parameter files are setup for a 100 ps NVT equilbiration, then a 1 ns NPT 110 | equilibration, and lastly a 5 ns production run. We are planning on the methanes 111 | getting to the correct distances when the umbrella potential is applied during 112 | the equilibrations. For some other systems you may have to be more methodical in 113 | how you generate your initial configurations for each window. 114 | 115 | Simulation 116 | ---------- 117 | 118 | For the simulations we're going to use a bash script to replace the `WINDOW` 119 | keyword in our mdp files, very similar to what we did in the free energy 120 | simulation. Here is the script: 121 | 122 | ```bash 123 | #!/bin/bash 124 | set -e 125 | 126 | for ((i=0;i<27;i++)); do 127 | 128 | x=$(echo "0.05*$(($i+1))" | bc); 129 | 130 | sed 's/WINDOW/'$x'/g' mdp/min.mdp > grompp.mdp 131 | gmx grompp -o min.$i -pp min.$i -po min.$i -n index.ndx 132 | gmx mdrun -deffnm min.$i -pf pullf-min.$i -px pullx-min.$i 133 | 134 | sed 's/WINDOW/'$x'/g' mdp/min2.mdp > grompp.mdp 135 | gmx grompp -o min2.$i -c min.$i -t min.$i -pp min2.$i -po min2.$i -maxwarn 1 -n index.ndx 136 | gmx mdrun -deffnm min2.$i -pf pullf-min2.$i -px pullx-min2.$i 137 | 138 | sed 's/WINDOW/'$x'/g' mdp/eql.mdp > grompp.mdp 139 | gmx grompp -o eql.$i -c min2.$i -t min2.$i -pp eql.$i -po eql.$i -n index.ndx 140 | gmx mdrun -deffnm eql.$i -pf pullf-eql.$i -px pullx-eql.$i 141 | 142 | sed 's/WINDOW/'$x'/g' mdp/eql2.mdp > grompp.mdp 143 | gmx grompp -o eql2.$i -c eql.$i -t eql.$i -pp eql2.$i -po eql2.$i -n index.ndx 144 | gmx mdrun -deffnm eql2.$i -pf pullf-eql2.$i -px pullx-eql2.$i 145 | 146 | sed 's/WINDOW/'$x'/g' mdp/prd.mdp > grompp.mdp 147 | gmx grompp -o prd.$i -c eql2.$i -t eql2.$i -pp prd.$i -po prd.$i -n index.ndx 148 | gmx mdrun -deffnm prd.$i -pf pullf-prd.$i -px pullx-prd.$i 149 | 150 | done 151 | ``` 152 | 153 | We are simulating 26 windows from 0.05 to around 1.3 nm in distance. Notice that 154 | I've added `-pf` and `-px` flags for the pull force and pull distance for each 155 | step. This is because with `-deffnm` GROMACS will try to write both to the same 156 | file. Also I've specified the index file with `-n` since *gmx grompp* needs to 157 | get the groups we specified with the pull parameters. Note that I am using a 158 | little trick with `bc` in order to do math with floating point numbers in bash. 159 | 160 | Analysis 161 | -------- 162 | 163 | We're going to use *gmx wham* to get the PMF. The program takes a file 164 | containing a list of the `.tpr` files and another file containing a list of the 165 | `.xvg` files containing the force as arguments. 166 | 167 | To create these two files do: 168 | 169 | ```bash 170 | $ ls prd.*.tpr > tpr.dat 171 | $ ls pullf-prd.*.xvg > pullf.dat 172 | ``` 173 | 174 | Then you can run *gmx wham*: 175 | 176 | ```bash 177 | $ gmx wham -it tpr.dat -f pullf.dat 178 | ``` 179 | 180 | After running *gmx wham* you'll get the potential of mean force in a file named 181 | `profile.xvg`. If you were to plot this right away, it should look like this: 182 | 183 | ![PMF](profile1.png) 184 | 185 | We would expect the interaction to go to zero at longer distances. Because we 186 | used a 3-dimensional biasing potential, however, we need to include a 187 | correction. Imagine one of the methanes as the reference point. The other 188 | methane is allowed to sample all around that point at distance *r*, covering the 189 | surface of some sphere with radius *r*. This adds extra configurational space to 190 | our sampling, decreasing the entropy. This extra entropic contribution to our 191 | PMF needs to be removed. Recall that the Gibbs free energy in the isothermal 192 | isobaric ensemble is -kTln(W) where W is the partition function. In the case of 193 | our methane dancing around the surface of a sphere, W is proportional to the 194 | surface area of that sphere. So, a correction of 2kTln(r) needs to be added. 195 | Additionally we need to shift the plot up such that its tail goes to zero. I 196 | found adding about 77 worked for my particular system, but yours may be 197 | different. To plot this in gnuplot do the following in a gnuplot terminal: 198 | 199 | ```gnuplot 200 | > plot 'profile.xvg' u 1:($2+2*8.314e-3*298.15*log($1)+77) w l 201 | ``` 202 | 203 | Your PMF should now look like this: 204 | 205 | ![PMF](profile2.png) 206 | 207 | Comparing this with the PMF from tutorial 3 we can see that they are nearly 208 | identical: 209 | 210 | ![PMF](profile3.png) 211 | 212 | One difference is that with the direct method we never get near as close as with 213 | umbrella sampling. Two methanes will not just naturally want to be near each 214 | other, which is why we have to add the umbrella potentials to keep them there. 215 | 216 | The other output is `histo.xvg` which is helpful in determining if there is 217 | enough overlap between windows. Here is a plot of each histogram for this 218 | simulation: 219 | 220 | ![Histogram](histo.png) 221 | 222 | Clearly we our windows are overlapping sufficiently. If they were not, we might 223 | have to choose a smaller window size or pick specific spots that were missing to 224 | simulate. 225 | 226 | Summary 227 | ------- 228 | 229 | In this tutorial we used GROMACS COM pull code to do umbrella sampling on two 230 | methanes in water. From there we used *gmx wham* to extract the potential of 231 | mean force. 232 | 233 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 234 | -------------------------------------------------------------------------------- /5_umbrella/histo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/5_umbrella/histo.png -------------------------------------------------------------------------------- /5_umbrella/mdp/eql.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 50000 ; 100 ps 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | gen-vel = yes 11 | gen-temp = 298.15 12 | 13 | constraint-algorithm = lincs 14 | constraints = h-bonds 15 | 16 | cutoff-scheme = Verlet 17 | 18 | coulombtype = PME 19 | rcoulomb = 1.0 20 | 21 | vdwtype = Cut-off 22 | rvdw = 1.0 23 | DispCorr = EnerPres 24 | 25 | tcoupl = Nose-Hoover 26 | tc-grps = System 27 | tau-t = 2.0 28 | ref-t = 298.15 29 | nhchainlength = 1 30 | 31 | pull = yes 32 | pull-ngroups = 2 33 | pull-group1-name = CA 34 | pull-group2-name = CB 35 | pull-ncoords = 1 36 | pull-coord1-type = umbrella 37 | pull-coord1-geometry = distance 38 | pull-coord1-groups = 1 2 39 | pull-coord1-k = 5000.0 40 | pull-coord1-rate = 0.0 41 | pull-coord1-init = WINDOW 42 | pull-coord1-start = no 43 | -------------------------------------------------------------------------------- /5_umbrella/mdp/eql2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 500000 ; 1.0 ns 5 | 6 | nstenergy = 200 7 | nstlog = 2000 8 | nstxout-compressed = 10000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | rlist = 1.0 16 | 17 | coulombtype = PME 18 | rcoulomb = 1.0 19 | 20 | vdwtype = Cut-off 21 | rvdw = 1.0 22 | DispCorr = EnerPres 23 | 24 | tcoupl = Nose-Hoover 25 | tc-grps = System 26 | tau-t = 2.0 27 | ref-t = 298.15 28 | nhchainlength = 1 29 | 30 | pcoupl = Parrinello-Rahman 31 | tau_p = 2.0 32 | compressibility = 4.46e-5 33 | ref_p = 1.0 34 | 35 | pull = yes 36 | pull-ngroups = 2 37 | pull-group1-name = CA 38 | pull-group2-name = CB 39 | pull-ncoords = 1 40 | pull-coord1-type = umbrella 41 | pull-coord1-geometry = distance 42 | pull-coord1-groups = 1 2 43 | pull-coord1-k = 5000.0 44 | pull-coord1-rate = 0.0 45 | pull-coord1-init = WINDOW 46 | pull-coord1-start = no 47 | -------------------------------------------------------------------------------- /5_umbrella/mdp/min.mdp: -------------------------------------------------------------------------------- 1 | 2 | define = -DFLEXIBLE 3 | integrator = steep 4 | nsteps = 1000 5 | 6 | nstenergy = 500 7 | nstlog = 500 8 | nstxout-compressed = 1000 9 | 10 | constraint-algorithm = lincs 11 | constraints = h-bonds 12 | 13 | cutoff-scheme = Verlet 14 | 15 | coulombtype = PME 16 | rcoulomb = 1.0 17 | 18 | vdwtype = Cut-off 19 | rvdw = 1.0 20 | DispCorr = EnerPres 21 | 22 | pull = yes 23 | pull-ngroups = 2 24 | pull-group1-name = CA 25 | pull-group2-name = CB 26 | pull-ncoords = 1 27 | pull-coord1-type = umbrella 28 | pull-coord1-geometry = distance 29 | pull-coord1-groups = 1 2 30 | pull-coord1-k = 5000.0 31 | pull-coord1-rate = 0.0 32 | pull-coord1-init = WINDOW 33 | pull-coord1-start = no 34 | -------------------------------------------------------------------------------- /5_umbrella/mdp/min2.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = steep 3 | nsteps = 50000 4 | 5 | nstenergy = 500 6 | nstlog = 500 7 | nstxout-compressed = 1000 8 | 9 | cutoff-scheme = Verlet 10 | 11 | coulombtype = PME 12 | rcoulomb = 1.0 13 | 14 | vdwtype = Cut-off 15 | rvdw = 1.0 16 | DispCorr = EnerPres 17 | 18 | pull = yes 19 | pull-ngroups = 2 20 | pull-group1-name = CA 21 | pull-group2-name = CB 22 | pull-ncoords = 1 23 | pull-coord1-type = umbrella 24 | pull-coord1-geometry = distance 25 | pull-coord1-groups = 1 2 26 | pull-coord1-k = 5000.0 27 | pull-coord1-rate = 0.0 28 | pull-coord1-init = WINDOW 29 | pull-coord1-start = no 30 | -------------------------------------------------------------------------------- /5_umbrella/mdp/prd.mdp: -------------------------------------------------------------------------------- 1 | 2 | integrator = md 3 | dt = 0.002 ; 2 fs 4 | nsteps = 2500000 ; 5.0 ns 5 | 6 | nstenergy = 5000 7 | nstlog = 5000 8 | nstxout-compressed = 2000 9 | 10 | continuation = yes 11 | constraint-algorithm = lincs 12 | constraints = h-bonds 13 | 14 | cutoff-scheme = Verlet 15 | 16 | coulombtype = PME 17 | rcoulomb = 1.0 18 | 19 | vdwtype = Cut-off 20 | rvdw = 1.0 21 | DispCorr = EnerPres 22 | 23 | tcoupl = Nose-Hoover 24 | tc-grps = System 25 | tau-t = 2.0 26 | ref-t = 298.15 27 | nhchainlength = 1 28 | 29 | pcoupl = Parrinello-Rahman 30 | tau_p = 2.0 31 | compressibility = 4.46e-5 32 | ref_p = 1.0 33 | 34 | pull = yes 35 | pull-ngroups = 2 36 | pull-group1-name = CA 37 | pull-group2-name = CB 38 | pull-ncoords = 1 39 | pull-coord1-type = umbrella 40 | pull-coord1-geometry = distance 41 | pull-coord1-groups = 1 2 42 | pull-coord1-k = 5000.0 43 | pull-coord1-rate = 0.0 44 | pull-coord1-init = WINDOW 45 | pull-coord1-start = no 46 | -------------------------------------------------------------------------------- /5_umbrella/plot.plt: -------------------------------------------------------------------------------- 1 | 2 | set term tikz standalone color 3 | 4 | set style line 11 lc rgb '#808080' lt 1 5 | set border 3 back ls 11 6 | 7 | set style line 12 lc rgb '#808080' lt 0 lw 1 8 | set grid back ls 12 9 | set pointsize 1.0 10 | 11 | set xrange[0:1.4] 12 | 13 | unset key 14 | 15 | set xlabel "r (nm)" 16 | set ylabel "w(r) (kJ / mol)" 17 | set output "profile1.tex" 18 | plot 'profile.xvg' w l 19 | 20 | set output "profile2.tex" 21 | plot 'profile.xvg' u 1:($2+2*8.314e-3*298.15*log($1)+77) w l 22 | 23 | set key top right 24 | set output "profile3.tex" 25 | plot 'profile.xvg' u 1:($2+2*8.314e-3*298.15*log($1)+77) w l t 'umbrella', \ 26 | '../3_methanes_in_water/rdf.xvg' u 1:(-8.314e-3*298.15*log($2*10/9)) w l t 'direct' 27 | 28 | unset key 29 | set output "histo.tex" 30 | set xlabel "x" 31 | set ylabel "count" 32 | plot "histo.xvg" w l, \ 33 | "histo.xvg" u 1:3 w l, \ 34 | "histo.xvg" u 1:4 w l, \ 35 | "histo.xvg" u 1:5 w l, \ 36 | "histo.xvg" u 1:6 w l, \ 37 | "histo.xvg" u 1:7 w l, \ 38 | "histo.xvg" u 1:8 w l, \ 39 | "histo.xvg" u 1:9 w l, \ 40 | "histo.xvg" u 1:10 w l, \ 41 | "histo.xvg" u 1:11 w l, \ 42 | "histo.xvg" u 1:12 w l, \ 43 | "histo.xvg" u 1:13 w l, \ 44 | "histo.xvg" u 1:14 w l, \ 45 | "histo.xvg" u 1:15 w l, \ 46 | "histo.xvg" u 1:16 w l, \ 47 | "histo.xvg" u 1:17 w l, \ 48 | "histo.xvg" u 1:18 w l, \ 49 | "histo.xvg" u 1:19 w l, \ 50 | "histo.xvg" u 1:20 w l, \ 51 | "histo.xvg" u 1:21 w l, \ 52 | "histo.xvg" u 1:22 w l, \ 53 | "histo.xvg" u 1:23 w l, \ 54 | "histo.xvg" u 1:24 w l, \ 55 | "histo.xvg" u 1:25 w l, \ 56 | "histo.xvg" u 1:26 w l, \ 57 | "histo.xvg" u 1:27 w l, \ 58 | "histo.xvg" u 1:28 w l 59 | -------------------------------------------------------------------------------- /5_umbrella/profile.xvg: -------------------------------------------------------------------------------- 1 | # This file was created Sun Aug 16 20:56:32 2015 2 | # Created by: 3 | # :-) GROMACS - gmx wham, VERSION 5.1 (-: 4 | # 5 | # Executable: /usr/bin/gmx 6 | # Data prefix: /usr 7 | # Command line: 8 | # gmx wham -it tpr.dat -if pullf.dat 9 | # gmx wham is part of G R O M A C S: 10 | # 11 | # Gallium Rubidium Oxygen Manganese Argon Carbon Silicon 12 | # 13 | # title "Umbrella potential" 14 | # xaxis label "\xx\f{} (nm)" 15 | # yaxis label "E (kJ mol\S-1\N)" 16 | #TYPE xy 17 | 2.616299e-01 0.000000e+00 18 | 2.675736e-01 -1.420148e+01 19 | 2.735173e-01 -2.616752e+01 20 | 2.794611e-01 -3.581776e+01 21 | 2.854048e-01 -4.361121e+01 22 | 2.913486e-01 -4.985089e+01 23 | 2.972923e-01 -5.484015e+01 24 | 3.032361e-01 -5.890606e+01 25 | 3.091798e-01 -6.219049e+01 26 | 3.151236e-01 -6.484670e+01 27 | 3.210673e-01 -6.698518e+01 28 | 3.270110e-01 -6.865545e+01 29 | 3.329548e-01 -7.003966e+01 30 | 3.388985e-01 -7.111973e+01 31 | 3.448423e-01 -7.201906e+01 32 | 3.507860e-01 -7.263347e+01 33 | 3.567298e-01 -7.325665e+01 34 | 3.626735e-01 -7.367150e+01 35 | 3.686172e-01 -7.390415e+01 36 | 3.745610e-01 -7.418542e+01 37 | 3.805047e-01 -7.434047e+01 38 | 3.864485e-01 -7.444556e+01 39 | 3.923922e-01 -7.446901e+01 40 | 3.983360e-01 -7.449945e+01 41 | 4.042797e-01 -7.441454e+01 42 | 4.102234e-01 -7.441110e+01 43 | 4.161672e-01 -7.432760e+01 44 | 4.221109e-01 -7.424020e+01 45 | 4.280547e-01 -7.409881e+01 46 | 4.339984e-01 -7.397354e+01 47 | 4.399422e-01 -7.384661e+01 48 | 4.458859e-01 -7.373173e+01 49 | 4.518296e-01 -7.358719e+01 50 | 4.577734e-01 -7.353921e+01 51 | 4.637171e-01 -7.332281e+01 52 | 4.696609e-01 -7.326123e+01 53 | 4.756046e-01 -7.321216e+01 54 | 4.815484e-01 -7.310992e+01 55 | 4.874921e-01 -7.305406e+01 56 | 4.934358e-01 -7.300076e+01 57 | 4.993796e-01 -7.296336e+01 58 | 5.053233e-01 -7.296434e+01 59 | 5.112671e-01 -7.280957e+01 60 | 5.172108e-01 -7.288344e+01 61 | 5.231546e-01 -7.285011e+01 62 | 5.290983e-01 -7.284018e+01 63 | 5.350420e-01 -7.285947e+01 64 | 5.409858e-01 -7.285007e+01 65 | 5.469295e-01 -7.287512e+01 66 | 5.528733e-01 -7.291456e+01 67 | 5.588170e-01 -7.300497e+01 68 | 5.647608e-01 -7.308907e+01 69 | 5.707045e-01 -7.308116e+01 70 | 5.766482e-01 -7.317453e+01 71 | 5.825920e-01 -7.326284e+01 72 | 5.885357e-01 -7.331562e+01 73 | 5.944795e-01 -7.349405e+01 74 | 6.004232e-01 -7.364860e+01 75 | 6.063670e-01 -7.375506e+01 76 | 6.123107e-01 -7.385431e+01 77 | 6.182544e-01 -7.410940e+01 78 | 6.241982e-01 -7.423048e+01 79 | 6.301419e-01 -7.435069e+01 80 | 6.360857e-01 -7.451632e+01 81 | 6.420294e-01 -7.459079e+01 82 | 6.479732e-01 -7.467410e+01 83 | 6.539169e-01 -7.489332e+01 84 | 6.598606e-01 -7.500607e+01 85 | 6.658044e-01 -7.504319e+01 86 | 6.717481e-01 -7.516238e+01 87 | 6.776919e-01 -7.526725e+01 88 | 6.836356e-01 -7.536169e+01 89 | 6.895794e-01 -7.541303e+01 90 | 6.955231e-01 -7.547210e+01 91 | 7.014668e-01 -7.560305e+01 92 | 7.074106e-01 -7.564236e+01 93 | 7.133543e-01 -7.564848e+01 94 | 7.192981e-01 -7.569372e+01 95 | 7.252418e-01 -7.574163e+01 96 | 7.311856e-01 -7.576284e+01 97 | 7.371293e-01 -7.578747e+01 98 | 7.430730e-01 -7.571163e+01 99 | 7.490168e-01 -7.577044e+01 100 | 7.549605e-01 -7.578774e+01 101 | 7.609043e-01 -7.578925e+01 102 | 7.668480e-01 -7.572048e+01 103 | 7.727918e-01 -7.582874e+01 104 | 7.787355e-01 -7.575039e+01 105 | 7.846792e-01 -7.581086e+01 106 | 7.906230e-01 -7.570474e+01 107 | 7.965667e-01 -7.575299e+01 108 | 8.025105e-01 -7.571614e+01 109 | 8.084542e-01 -7.572310e+01 110 | 8.143980e-01 -7.569142e+01 111 | 8.203417e-01 -7.570513e+01 112 | 8.262854e-01 -7.576102e+01 113 | 8.322292e-01 -7.578141e+01 114 | 8.381729e-01 -7.577685e+01 115 | 8.441167e-01 -7.581563e+01 116 | 8.500604e-01 -7.583426e+01 117 | 8.560042e-01 -7.589245e+01 118 | 8.619479e-01 -7.585633e+01 119 | 8.678916e-01 -7.588314e+01 120 | 8.738354e-01 -7.592777e+01 121 | 8.797791e-01 -7.595586e+01 122 | 8.857229e-01 -7.613348e+01 123 | 8.916666e-01 -7.611875e+01 124 | 8.976104e-01 -7.622596e+01 125 | 9.035541e-01 -7.625909e+01 126 | 9.094978e-01 -7.636292e+01 127 | 9.154416e-01 -7.639571e+01 128 | 9.213853e-01 -7.648904e+01 129 | 9.273291e-01 -7.655146e+01 130 | 9.332728e-01 -7.662862e+01 131 | 9.392166e-01 -7.671975e+01 132 | 9.451603e-01 -7.678022e+01 133 | 9.511041e-01 -7.684699e+01 134 | 9.570478e-01 -7.694991e+01 135 | 9.629915e-01 -7.692519e+01 136 | 9.689353e-01 -7.699057e+01 137 | 9.748790e-01 -7.706372e+01 138 | 9.808228e-01 -7.715718e+01 139 | 9.867665e-01 -7.716667e+01 140 | 9.927103e-01 -7.726632e+01 141 | 9.986540e-01 -7.726151e+01 142 | 1.004598e+00 -7.724401e+01 143 | 1.010541e+00 -7.733789e+01 144 | 1.016485e+00 -7.732457e+01 145 | 1.022429e+00 -7.744992e+01 146 | 1.028373e+00 -7.745473e+01 147 | 1.034316e+00 -7.751458e+01 148 | 1.040260e+00 -7.744023e+01 149 | 1.046204e+00 -7.748145e+01 150 | 1.052148e+00 -7.755322e+01 151 | 1.058091e+00 -7.752372e+01 152 | 1.064035e+00 -7.747048e+01 153 | 1.069979e+00 -7.753305e+01 154 | 1.075923e+00 -7.754327e+01 155 | 1.081866e+00 -7.757571e+01 156 | 1.087810e+00 -7.757871e+01 157 | 1.093754e+00 -7.762832e+01 158 | 1.099698e+00 -7.763885e+01 159 | 1.105641e+00 -7.768064e+01 160 | 1.111585e+00 -7.764156e+01 161 | 1.117529e+00 -7.766978e+01 162 | 1.123473e+00 -7.766254e+01 163 | 1.129416e+00 -7.767966e+01 164 | 1.135360e+00 -7.768798e+01 165 | 1.141304e+00 -7.777542e+01 166 | 1.147248e+00 -7.770989e+01 167 | 1.153191e+00 -7.773100e+01 168 | 1.159135e+00 -7.780334e+01 169 | 1.165079e+00 -7.773367e+01 170 | 1.171023e+00 -7.778733e+01 171 | 1.176966e+00 -7.776076e+01 172 | 1.182910e+00 -7.780038e+01 173 | 1.188854e+00 -7.785442e+01 174 | 1.194798e+00 -7.784286e+01 175 | 1.200741e+00 -7.786883e+01 176 | 1.206685e+00 -7.797569e+01 177 | 1.212629e+00 -7.791532e+01 178 | 1.218572e+00 -7.798631e+01 179 | 1.224516e+00 -7.792018e+01 180 | 1.230460e+00 -7.801431e+01 181 | 1.236404e+00 -7.806088e+01 182 | 1.242347e+00 -7.803755e+01 183 | 1.248291e+00 -7.811750e+01 184 | 1.254235e+00 -7.807282e+01 185 | 1.260179e+00 -7.816702e+01 186 | 1.266122e+00 -7.820845e+01 187 | 1.272066e+00 -7.817072e+01 188 | 1.278010e+00 -7.821525e+01 189 | 1.283954e+00 -7.828464e+01 190 | 1.289897e+00 -7.830340e+01 191 | 1.295841e+00 -7.829070e+01 192 | 1.301785e+00 -7.827123e+01 193 | 1.307729e+00 -7.838644e+01 194 | 1.313672e+00 -7.840873e+01 195 | 1.319616e+00 -7.840347e+01 196 | 1.325560e+00 -7.839049e+01 197 | 1.331504e+00 -7.842610e+01 198 | 1.337447e+00 -7.843913e+01 199 | 1.343391e+00 -7.841426e+01 200 | 1.349335e+00 -7.850097e+01 201 | 1.355279e+00 -7.851906e+01 202 | 1.361222e+00 -7.854023e+01 203 | 1.367166e+00 -7.865560e+01 204 | 1.373110e+00 -7.860046e+01 205 | 1.379054e+00 -7.873260e+01 206 | 1.384997e+00 -7.868242e+01 207 | 1.390941e+00 -7.858293e+01 208 | 1.396885e+00 -7.875019e+01 209 | 1.402829e+00 -7.873293e+01 210 | 1.408772e+00 -7.876604e+01 211 | 1.414716e+00 -7.892511e+01 212 | 1.420660e+00 -7.940317e+01 213 | 1.426603e+00 -7.992424e+01 214 | 1.432547e+00 -8.025514e+01 215 | 1.438491e+00 -6.313136e+01 216 | 1.444435e+00 -7.957386e+01 217 | -------------------------------------------------------------------------------- /5_umbrella/profile1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/5_umbrella/profile1.png -------------------------------------------------------------------------------- /5_umbrella/profile2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/5_umbrella/profile2.png -------------------------------------------------------------------------------- /5_umbrella/profile3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shekfeh/gromacs-tutorials/6318664f5089a357b667773124c9b1567eca4575/5_umbrella/profile3.png -------------------------------------------------------------------------------- /6_tpi/README.md: -------------------------------------------------------------------------------- 1 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 2 | 3 | Tutorial 6: Excess Chemical Potential of Methane using Test Particle Insertion 4 | ====================================================== 5 | 6 | In this tutorial we'll be using test particle insertion (TPI) to calculate the excess 7 | chemical potential of methane solvation in water. Most users are unaware that 8 | GROMACS has a built-in method for running TPI. This tutorial will not be a 9 | comprehensive discussion on the statistical mechanics of TPI, but will address 10 | issues when needed. The user is encouraged to seek out scientific resources 11 | regarding this method. 12 | 13 | TPI involves perturbing some state to some other, very similar state. We will be 14 | taking bulk water and insertng a methane particle and measuring the 15 | potential energy change from this. There is a statistical mechanical 16 | relationship between this change in potential energy and the excess chemical 17 | potential. For us, state A is the bulk water system, and state B is the water 18 | system with a methane. 19 | 20 | With GROMACS you need to run state A as a normal MD simulation. We already did 21 | this for our case of bulk water in [Tutorial 1](https://github.com/wesbarnett/gromacs-tutorials/blob/master/1_tip4pew_water/README.md). We'll reuse the output trajectory 22 | files for inserting the methane. 23 | 24 | Setup 25 | ----- 26 | 27 | ### Create water system 28 | 29 | Follow Tutorial 1 to run a system containing TIP4PEW water. 30 | 31 | ### Add test particle to topology file 32 | 33 | Our original topology file just had water. In the new topology file we simply 34 | need to add 1 test particle, and it needs to be the last molecule in the system. 35 | We'll use `opls_066` for the particle's atom type which is OPLS's united atom 36 | methane. Here's what my final topology file looks like (the number of waters 37 | will be different for your system): 38 | 39 | #include "oplsaa.ff/forcefield.itp" 40 | #include "oplsaa.ff/tip4pew.itp" 41 | 42 | [ moleculetype ] 43 | ; Name nrexcl 44 | Methane 3 45 | 46 | [ atoms ] 47 | ; nr type resnr residue atom cgnr charge mass 48 | 1 opls_066 1 CH4 C 1 0 16.043 49 | 50 | 51 | [ System ] 52 | Methane in water 53 | 54 | [ Molecules ] 55 | SOL 395 56 | Methane 1 57 | 58 | ### Add test particle to gro file 59 | 60 | You also need to add the test particle to the gro file. Simply edit `conf.gro` 61 | (or any of the other `.gro` files uses) and add a line at the end containing the 62 | test particle's position (right before the box coordinates). The line I added 63 | looks like this: 64 | 65 | 396CH4 C 1581 0.000 0.000 0.000 66 | 67 | The actual position doesn't matter; GROMACSS just wants a placeholder for the 68 | test particle. Additionally you need to add 1 to the total number of particles 69 | in the system on the second line of the `.gro` file. 70 | 71 | ### Parameter files 72 | 73 | We only need one parameter file for TPI. Simply copy `prd.mdp` from your bulk 74 | water simulation and change `integrator` to `tpi`. You should change `nsteps` to 75 | the number of insertions per frame that you want to attempt. I chose `100000` 76 | steps for my simulation. You will also need 77 | to change `cutoff-scheme` to `group`, since `Verlet` has not be implemented for 78 | TPI. 79 | 80 | Simulation 81 | ---------- 82 | 83 | For the simulation we are just rerunning the bulk water simulation using the 84 | saved trajectory file (which was named `prd.xtc` in the first tutorial). To do 85 | this first run `grompp`: 86 | 87 | ```bash 88 | $ gmx grompp -f mdp/tpi.mdp -o tpi -po tpi -pp tpi -c conf.gro 89 | ``` 90 | 91 | Now use the `-rerun` flag with `mdrun`: 92 | 93 | ```bash 94 | $ gmx mdrun -deffnm tpi -rerun prd.xtc 95 | ``` 96 | 97 | Analysis 98 | -------- 99 | 100 | The log file file, in this case named `tpi.log`, contains a line with the 101 | average volume and the average excess chemical potential. My two lines looked 102 | like this: 103 | 104 | = 1.18704e+01 nm^3 105 | = 8.81230e+00 kJ/mol 106 | 107 | `` is output in kJ/mol, but if we convert it to kcal/mol we get 2.106 108 | kcal/mol. This is in line with our results from the free energy of solvation 109 | done in [Tutorial 110 | 4](https://github.com/wesbarnett/gromacs-tutorials/blob/master/1_tip4pew_water/README.m) 111 | using the lambda-coupling method where I got 2.289 kcal/mol. The difference can 112 | be attributed to the usage of an all-atom model with the free energy of 113 | solvation simulations and a united-atom model in this case. 114 | 115 | Summary 116 | ------- 117 | 118 | In this tutorial we looked at how to use GROMACS to perform test particle 119 | insertion in order to get the excess chemical potential of a united-atom OPLS 120 | methane. 121 | 122 | [Return to main page](https://github.com/wesbarnett/gromacs-tutorials) 123 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #GROMACS Tutorials 2 | 3 | Wes Barnett 4 | 5 | Some [GROMACS](http://www.gromacs.org) tutorials for beginners. It's not 6 | necessary to do the tutorials in order, but the first two 7 | tutorials are essential before going on to the others, as the structure file 8 | (`methane.pdb`) and topology file (`topol.top`) for methane from tutorial 2 are 9 | used in all subsequent tutorials. The tutorials are designed for GROMACS version 10 | 5.1 and up. If you are using an older version, some of the commands or 11 | parameters may have changed. Note especially that the pull code for umbrella 12 | sampling has changed since 5.0 and older releases. 13 | 14 | ##Prerequisites 15 | 16 | I assume you have some working knowledge of the command line. Specifically, you 17 | should know how to make directories, change into them, edit text files, and 18 | download files to your system. When you see a `$` or `>` this is the prompt on 19 | the commandline and indicates you should type the text following it. If the 20 | commandline is new to you, consider going through [CodeAcademy's 21 | tutorial](https://www.codecademy.com/en/courses/learn-the-command-line/). 22 | 23 | I also assume you have GROMACS installed on a machine available to you. Source 24 | code and installation instructions can be found on the [GROMACS documentation 25 | page](http://manual.gromacs.org/documentation). 26 | 27 | Throughout the tutorials we'll be using OPLS methane and TIP4PEW water. 28 | 29 | ##Contents 30 | 31 | 1. [Water](https://github.com/wesbarnett/gromacs-tutorials/blob/master/1_tip4pew_water/README.md) - Basics of setting up a simulation. Find out the 32 | density of TIP4PEW water. 33 | 2. [One methane in water](https://github.com/wesbarnett/gromacs-tutorials/blob/master/2_methane_in_water/README.md) - How to create a topology file 34 | for a molecule and solvate it. Get the radial distribution function. 35 | 3. [Several methanes in water](https://github.com/wesbarnett/gromacs-tutorials/blob/master/3_methanes_in_water/README.md) - How to put multiple 36 | solutes into a system. Get the methane-methane potential of mean force. 37 | 4. [Free energy of solvation of methane](https://github.com/wesbarnett/gromacs-tutorials/blob/master/4_methane_fe/README.md) - How to do a free energy 38 | simulation when coupling a molecule. Use MBAR to get the result. 39 | 5. [Umbrella sampling](https://github.com/wesbarnett/gromacs-tutorials/blob/master/5_umbrella/README.md) - Get methane-methane PMF from umbrella sampling using pull 40 | code. 41 | 6. [Test particle insertion](https://github.com/wesbarnett/gromacs-tutorials/blob/master/6_tpi/README.md) - Get the excess chemical potential of methane using test particle insertion. 42 | 43 | ## Links 44 | 45 | Some of the other software that I use in these tutorials that you may find 46 | useful are: 47 | 48 | * [alchemical-analysis](https://github.com/MobleyLab/alchemical-analysis) 49 | * [Avogadro](http://avogadro.cc/wiki/Main_Page) 50 | * [gnuplot](http://www.gnuplot.info/) 51 | * [vmd](http://www.ks.uiuc.edu/Research/vmd/) 52 | --------------------------------------------------------------------------------