This
is a short tutorial of how to compile Gromacs, a-i, are the installation steps,
and
1-5 are the methods to get rid of an error of missing CMake. If you don't get any
error
during
the compile process, you can skip step1-5, but if you encounter a problem at
step e, please
come
back to run1-5 in order.
Also,
it has been noticed that version Gromacs/2019.3 installation is problematic due
to the
remote
server of Gromacs ftp service, so if you encounter some weird error like some
necessary
files
can't be accessed during the compiling process, maybe just consider to switch
to another
version
and try again. As you could tell, the compiling process needs an internet
connection.
The
whole process may take up to one hour even everything is correct, depending on
your hardware and internet connection speed.
a.
tar xzvf gromacs-2021-beta3.tar.gz
b.
cd gromacs-2021-beta3
c.
mkdir build
d.
cd build
e. CMake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
Now,
a very nasty error, especially you just installed a ubuntu system, "CMake
is missing", the system will suggest you "sudo apt install
CMake"
The
system suggestion is not wrong but just not enough to help you out of that
problem.
If
you do like the suggestion, you may solve it, but for others, there might be
another
error
remaining about C++ compiler path not defined, etc.
So,
I suggest you do like 1-5
as per below, then you have a great chance to have no error.
f. make
g. make check
h. sudo make install
i. source /usr/local/gromacs/bin/GMXRC
At last, as always, remember to write the souce line to /.bashrc
echo "source /usr/local/gromacs/bin/GMXRC" >>
~/.bashrc
1. sudo apt update
2.sudo apt upgrade
3. Go to ubuntu Appstore (I don't
recommend you use the command line which will be tedious)
4. In the search bar, search cmake, and
install it!
5. sudo apt-get install build-essential
Good
luck!