#!/bin/bash # run this script to install gromacs in $HOME of an user $USER (no sudo is required for this script to work) # check version of cmake via # cmake --version # If output is cmake version 2.8.12.2, you must install a higher cmake version 3.6.2. By referring to #ref: http://jotmynotes.blogspot.com/2016/10/updating-cmake-from-2811-to-362-or.html # An user $USER can install cmake 3.6.2 locally as $USER in $HOME (instead of in the default /usr/local root directory) via the following procedure cd $HOME ## If the computer cannot go online, download it manually and place it in the $HOME directory wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz tar -zxvf cmake-3.6.2.tar.gz cd cmake-3.6.2 ./bootstrap --prefix=$HOME/local make make install echo 'PATH=$HOME/local/bin:$PATH' >> $HOME/.bash_profile . ~/.bashrc cmake --version # You shall see the cmake version display 3.6.2 after sourcing ~/.bashrc, which is the version that is installed in $HOME/local. # If you still see the old cmake version, source ~/.bashrc in a new terminal until you get the following output ## cmake --version ## cmake version 3.6.2 ## CMake suite maintained and supported by Kitware (kitware.com/cmake) ## After cmake version 3.6.2 is installed locally, proceed next to install gromacs ## If the computer cannot go online, download it manually and place it in the $HOME directory wget http://ftp.gromacs.org/pub/gromacs/gromacs-2019.3.tar.gz tar xfz gromacs-2019.3.tar.gz cd gromacs-2019.3 mkdir build cd build ## In comsics which cannot access the internet online, with no gpu, issue the following command cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=OFF -DGMX_FFT_LIBRAR=/share/apps/fftw-3.3.4/gnu/lib -DGMX_GPU=OFF -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=$HOME/GROMACS make make check make install source $HOME/GROMACS/bin/GMXRC echo 'source $HOME/GROMACS/bin/GMXRC' >> ~/.bashrc