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 makedepend xutils-dev mesa-common-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
In the 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.
$ make
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.
3 Comments
Thanks a lot.
To get “makedepend”, I had to install “xutils-dev” dependency
thanks, updated post
Thank You, I have been changing OS ( from MInt, to Mageia, to Debian) for this.
One Trackback
[...] on this blog, but the script provided below is very ugly. Please follow the instructions given in this update [...]