Quite some time ago, I have posted a script that attempts to install Molden. This has become a very popular post but when I read the script again recently, I felt a strong obligation to post a much cleaner way to do things. The following instructions should work for any Debian based GNU/Linux distribution. This includes Ubuntu, but – while in the past, I have been using Ubuntu myself – I cannot recommend it any longer because it does a poor job in respecting your freedom. If you like Ubuntu‘s look & feel but value your freedom, you might want to give Trisquel a try. Anyway, this is about getting Molden to work.
First you will need to install a number of dependencies. I prefer gfortran but you may pick another Fortran compiler as well.
$ sudo apt-get install build-essential gfortran libX11-6 libX11-dev libgl1-mesa-dev libgl1-mesa-glx libglu1-mesa-dev libxmu-dev
Now download and extract the lastest Molden tarball.
$ wget ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/molden5.0.tar.gz $ tar -xf molden5.0.tar.gz $ cd molden5.0
makefile, one of the first lines assigns the variable
FC the name of the Fortran compiler to use. If using gfortran, it should read
FC = gfortran
If you have a 64bit operating system, comment / uncomment the following lines like this further down in the makefile
#LIBS = -L/usr/X11R6/lib -lX11 -lm LIBS = -L/usr/X11R6/lib64 -lX11 -lm
or vice versa for 32bit systems (which should be the default anyway).
Now build Molden. I get some ugly compiler warnings here, but they don’t seem to affect the usability of the product.
There is no
install target so you’ll have to manually
$ sudo install -t /usr/local/bin -m 755 molden gmolden
This should have been all. The build directory can now be removed.