Massimiliano Arca

HOW TO COMPILE MOLDEN 5.0 UNDER UBUNTU 12.04

25 May 2012

Molden is a great well-known software of computational chemistry by Gijs Schaftenaar, largely used for analysing the output files of programs as varied as Gaussian, Dalton, Molcas, ADF, and several others. Thanks to Molden even undergraduate students can, for example, investigate the shapes of molecular orbitals or examine calculated vibrational spectra.

In a previous post, I showed how to install Molden 5.0 on a 64 bit OS X Lion computer.  Installing Molden on the new Ubuntu 12.04 operating system is even easier.

First, be sure to be the administrator of your system and to have the administrator password at hand before proceeding.

Now, open a Terminal window and type:

sudo apt-get install build-essential

sudo apt-get install libX11-dev libgl1-mesa-dev

sudo apt-get install libglu1-mesa-dev xutils-dev gfortran

You will be asked for the administrator password. Now update your system by typing:

 sudo apt-get update; sudo apt-get upgrade

When prompted press “Y” on your keyboard (“S” in the Italian version of the OS). Now your system is ready for installing Molden. First you need to get the source of the software by typing:

 wget ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/molden5.0.tar.gz

Extract the copressed file just downloaded by typing:

tar xvfz molden5.0.tar.gz

rm molden5.0.tar.gz

cd molden5.0

Now, you will find yourself in the “molden5.0” directory. Before compiling, you will want to slighly modify the “makefile” file. Open it by typing:

 nano makefile

and in the makefile comment “LIBS =  -L/usr/X11R6/lib -lX11 –lm” by adding a “#” symbol, and uncomment “LIBS =  -L/usr/X11R6/lib64 -lX11 –lm”, few lines below.

Save and exit nano (CTRL+X) and compile the program:

 make

 If everything is ok you can now delete the unuseful files:

rm *.o *.f *.c *.f.g77 *.for *.old make_vms.com makefile* tt

mv surf surf_dir; cp surf_dir/surf .; rm –rf surf_dir

mv ambfor ambfor_dir; cp ambfor_dir/am* .; rm -rf ambfor_dir/

 You can come back to the parent directory by typing:

 cd ..

Now your $HOME/molden5.0 directory contains all the executable. If you use the tcsh, you may want to simplify the access of the program by adding the following lines to your .cshrc file (located in your $HOME directory).

 # Molden

set path = ( $path /opt/molden)

That’s it. Molden is ready to use! Just type “molden” or “gmolden” (OpenGL version) to enjoy it.

Questionnaire and social

Share on:
Impostazioni cookie