Você está na página 1de 10

INSTALLATION GUIDE

(For Mac OS + Ubuntu Linux)


Preliminary Notes:
a. Internet connection is required
b. Install Ubuntu Linux, possibly via Parallels Desktop, beforehand
c. Installation and tutorial simulation of GROMACS (not including download and installation
of Parallels Desktop and Ubuntu Linux) will take at least 6 hours on a quad-core
computer
d. Terminal entries are case-sensitive
e. <version> refers to the current version of your downloaded files, should be in the format
3.13.3
i. Remember to match your own version number

Terminal Commands Guide:


● sudo​ - stands for “superuser do”; runs commands with security privileges
● cd​ - navigate through folders
● ls​ - see folder contents
● Cmd + Z - interrupt/stop command run
● ./​ - run executable file
● ./configure​ - build the software on your specific system; makes sure all of the
dependencies for the rest of the build and install process are available, and finds out
whatever it needs to know to use those dependencies
● tar xzvf​ - unzip a .tar file; (X) Extract (Z) .gz file (V) display a list of files/directories
involved (F) specify archive file name
● make​ - utility for building and maintaining groups of programs (and other types of files)
from source code; to determine automatically which pieces of a large program need to
be re-compiled, and issue the commands necessary to recompile them
● make install​ - copy the built program, its libraries, and documentation to the correct
locations

Steps:
1. Open the Terminal
2. Type the following in the Terminal, then press enter:
sudo apt-get install g++
3. Enter your password
4. Download ​CMake​ from ​https://cmake.org/download/​ and save to Downloads folder
a. Platform: Unix/Linux Source
b. Files: cmake-<version>.tar.gz
5. Download ​FFTW​ from ​http://www.fftw.org/download.html​ and save to Downloads folder
a. Download as http file: fftw-<version>.tar.gz

6. Download GROMACS from


http://manual.gromacs.org/documentation/2019/download.html​ and save to Downloads
folder
a. Download Source Code as http file with file extension tar.gz

7. (INSTALLATION OF CMake) Type the following in the Terminal, then ​press enter after
each line​:
ls
cd Downloads
ls​, you should see the three tar.gz files
tar xzvf cmake​, then press tab to complete the file name
8. Check that a cmake folder has been created inside the Downloads folder
9. Type the following in the Terminal, then ​press enter after each line​:
ls​, you should see three tar.gz files and the cmake folder
cd cmake-3.13.3
ls
./configure
make
sudo make install
10. Type the following in the Terminal, then press enter:
sudo apt-get install nautilus
11. Type the following in the Terminal, then press enter:
sudo nautilus​, wherein a file explorer should be launched
12. Enter your password.
13. In that file explorer, go to Computer → Search “cmake” → Copy cmake file
a. There should not be a “lock symbol” in the cmake file (see the two photos)
14. Open file explorer, go to Computer → usr → bin → Paste cmake file
15. (INSTALLATION OF FFTW) Type the following in the Terminal, then ​press enter after
each line​:
cd ..
ls
tar xzvf fftw​, then press tab to complete the file name
ls​, there should be 5 files already
cd fftw-3.3.8
ls
./configure
make
make install
16. (INSTALLATION OF GROMACS) Type the following in the Terminal, then ​press enter
after each line​:
cd ..
ls
tar xzvf gromacs​, then press tab to complete the file name
ls​, there should be a total of 6 files already
cd gromacs​, then press tab to complete the file name
17. (MAKING A NEW EMPTY DIRECTORY) Type the following in the Terminal, then ​press
enter after each line​:
mkdir build
ls​, there should be a build directory
cd build
ls
cmake <the dragged file> -DGMX_BUILD_OWN_FFTW=ON
a. Open a file explorer, then go to Downloads, then drag the gromacs-2019 folder
after “cmake<space>”
b. It should appear something like:
cmake ‘/home/yourname/Downloads/gromacs-2019’-DGMX_BUILD_OWN_FFTW=ON
18. (CONTINUATION) Type the following in the Terminal, then ​press enter after each line​:
make
sudo make install
source /usr/local/gromacs/bin/GMXRC
19. To check that GROMACS has been installed successfully, type the following in the
Terminal, then press enter. There should be no error prompts.
gmx pdb2gmx
20. If for some reason, there IS an error prompt stating:
The program 'gmx' is currently not installed. You can install
it by typing: sudo apt install gromacs
then just follow the instruction and type:
sudo apt install gromacs
after which the Terminal will ask for your password. Step 18 should run now.
Main References:
[Michael Papili]. (2014, August 25). ​Installing Gromacs 5 part 1​ [Video File]. Retrieved from
https://www.youtube.com/watch?v=vOJsmtFeSGk​ on Jan. 27, 2019.

[Michael Papili]. (2014, August 25). ​Installing Gromacs 5 part 2​ [Video File]. Retrieved from
https://www.youtube.com/watch?v=BZNzYt_DUB0​ on Jan. 27, 2019.

[Computer Hope]. (2017). ​Linux make command.​ Retrieved from


https://www.computerhope.com/unix/umake.htm​ on Jan. 28, 2019.

Brocklehurst, G. (2015). ​The magic behind configure, make, and make install.​ Retrieved from
https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install​ on Jan. 28,
2019.
ALTERNATIVE INSTALLATION GUIDE
(For Windows OS only)
Steps:
1. Download and install Ubuntu app from Microsoft Store.

2. On Windows search bar, type “Turn Windows features on or off”.


a. Turn on the feature “Windows Subsystem for Linux”. Note: If this feature has not
previously been turned on, you will be requested to restart your computer after
turning the feature on. Do so.
3. After restarting, open the Ubuntu app and wait for installation.
a. Enter a username and a password.
b. Note that the password will not be displayed as you type it so type carefully.

4. Type ​sudo apt update ​and press Enter.


5. Type s ​ udo apt upgrade ​and press Enter.
6. Install the following after upgrade. A progress bar is shown at the bottom of the window
to show installation progress.
7. Type ​sudo apt install gcc ​and press Enter.
8. Type ​sudo apt install cmake ​and press Enter.
9. Type ​sudo apt install build-essential ​and press Enter.
10. Type ​sudo apt install libfftw3-dev ​and press Enter.
11. Type ​sudo apt install gromacs ​and press Enter.
12. To check if the installations went well, retype the commands. It will be shown that the
programs were installed in their newest versions.
SIMULATION GUIDE
Preliminary Notes:
a. This simulation guide runs on Ubuntu Linux
b. This guide will only set up a simulation of a protein in a box with water.

Steps:
1. Download the pdb file of the protein to be simulated and prepare it for simulations (e.g.
remove crystal waters)
2. Use pdb2gmx to generate files that will be used in the gromacs simulation from the pdb
file:
gmx pdb2gmx -f [.pdb file] -o [.gro file output] -water spce

After pressing [ENTER], you will be asked to choose the appropriate force field to be
used.

Three output files will be generated:


● [topol.top] — The topology for the molecule
● [posre.itp] — Position restraint file
● [outputname.gro] — Post-processed structure file

3. Define simulation box dimensions using editconf


gmx editconf -f [input.gro file] -o [output.gro file] -c -d 1.0 -bt
cubic

Notes:
● [-c] — center protein in box
​ .0​] — place protein at least ​1.0​ nm from the box edge
● [-d 1
● [-bt c​ ubic​] — define box type as ​cubic

4. Fill box with solvent (in this case, the solvent is water)
gmx solvate -cp [protein.gro file] -cs [solvent.gro file]
-o [output.gro file] -p topol.top

Notes:
● [-cp] — configuration of the protein; use the output from the editconf step
● [-cs] — configuration of the solvent; For this example, we used spc216.gro which
is a 3-point solvent model that is part of the GROMACS installation. This can be
used for SPC, SPC/E, and TIP3P water
● [-p] — updates the topology file

5. Relax the system through energy minimization:


First, create binary input file using grompp (GROMACS pre-processor)
gmx grompp -f minim.mdp -c [.gro file from step 4] -p topol.top -o
em.tpr

Notes:
● [-f] — input .mdp file; More info on molecular dynamics parameters here
http://manual.gromacs.org/documentation/2018/user-guide/mdp-options.html
mdp file used for this example:
http://www.mdtutorials.com/gmx/lysozyme/Files/minim.mdp
● [-c] — coordinate file; use output .gro file from solvation step (step 4)

Next, use mdrun to perform minimization


gmx mdrun -v -deffnm em

Notes:
● [-v] — makes mdrun print the progress to the screen at every step
● [-deffnm] — defines the filename of the input and output files

This step will produce the following files:


● [.log] — ASCII-text log file
● [.edr] — Binary energy file
● [.trr] — Binary full-precision trajectory
● [.gro] — Energy-minimized structure

6. NVT Equilibration
gmx grompp -f nvt.mdp -c [output.gro from step 5]
-r [output.gro from step 5] -p topol.top -o nvt.tpr

Notes:
● .mdp file used for this example:
http://www.mdtutorials.com/gmx/lysozyme/Files/nvt.mdp
● [-r] — coordinate file for the origin of position restraints

gmx mdrun -v -deffnm nvt

7. NPT Equilibration
gmx grompp -f npt.mdp -c [output.gro from step 6]
-r [output.gro from step 6] -t nvt.cpt -p topol.top -o nvt.tpr

Notes:
● .mdp file used for this example:
http://www.mdtutorials.com/gmx/lysozyme/Files/npt.mdp
● [-t] — checkpoint file from NVT equilibration
gmx mdrun -v -deffnm npt

8. Production MD
gmx grompp -f md.mdp -c [output.gro from step 7] -t npt.cpt -p topol.top
-o mdprod.tpr

Notes:
● .mdp file used for this example:
http://www.mdtutorials.com/gmx/lysozyme/Files/md.mdp
This runs for 500000 steps for a total of 1-ns MD simulation

gmx mdrun -v -deffnm mdprod

Main Reference:
Lemkul, J. A. (2018). GROMACS tutorial. ​Lysozyme in Water​. Retrieved from
http://www.mdtutorials.com/gmx/lysozyme/index.html​ on Jan 28, 2019.

Você também pode gostar