Let's install Molden 5.7 from source on 64 bit Ubuntu 16.04. This guide also works with the new ubuntu release 18.04 and Molden 5.8.
These are my machine specs (uname -a):
Linux virtual-machine 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Refresh the apt repository:
sudo apt update
Install required dependencies:
sudo apt install gfortran libx11-6 libx11-dev libgl1-mesa-glx libgl1-mesa-dev build-essential mesa-common-dev libglu1-mesa-dev libxmu-dev xutils-dev
Now extract molden5.7 in a location of your choice. I like to place it under the home folder. Make sure the folder (and sub directories) ownership is the one of your user.
Now application is compiling. A the end of the process you'll be displayed with this message:
Overriding existing associations: Continue (y/n)
At that point turn back to the terminal where you were compiling and type "y". The application is now successfully compiled. You will notice that a file called molden was created inside the folder. That is the executable of molden.
Lastly, create a file called molden.f to enable 3D real time rotations and include the following:
Extra tip: Create an alias to the program so that we can run the program from anywhere in the system (it will also create a blank icon in your programs list). To do so create a file called ".bash_aliases" in your home directory.
Write the following:
To try the program use one of the example files included in the application package under the folder tests and under the doc folder:
molden <your_input_file >output_file>&
Close all the terminal windows and open again, if you type molden the program will open :)
Update October 2018:
I am excited to share with you that I have created a snap of Molden 5.8.
For who may not know what is a snap:
Snaps are self-contained application package that bundles most of the libraries and runtimes it needs and can be updated and reverted without affecting the rest of the system.
Snaps are confined from the OS and other apps through security mechanisms according to fine-grained policies controlled by the user and the OS defaults.
Installing Molden is now extremely simple. Just type the following in the terminal:
sudo snap install molden
The app code and files can be found at /snap/molden.
If you want to contribute or report a bug, do so at Molden repository