Massimiliano Arca

COMPILING MOLDEN 5.7 ON MACOS HIGH SIERRA: HOW TO

13 February 2018

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 or TD-DFT absorption spectra.

Although the binaries are currently available (see this in Macs in Chemistry), you may want to compile it yourself in a 64 bit version under macOS High Sierra (10.13). Notably you won’t need Fink or MacPorts.

1) First, use the App Store to install the latest version (9.2 at the moment) of Xcode – it’s free. This will provide you a lot of developing software, and in particular the gcc compiler.

2) Molden works by using X11 for the video output. Hence, you will need a version of the X.Org X Window System running under macOS. My advice is to download and install XQuartz from here. The current version 2.7.11 runs just fine under High Sierra. Here is the direct link. Download the dmg file, double click it and run the XQuartz.pkg file.

3) Now you need a working Fortran compiler. My advice is tGNU Fortran Compiler gfortran 6.3. It can be found in various versions at http://gcc.gnu.org/wiki/GFortranBinaries#MacOS. Again you will get a dmg file: just double-click it, then run the gfortran.pkg file and simply follow the instructions.

Verify that everything is ok before proceeding. Open your Terminal (/Applications/Utilities/Terminal.app) and type:

make -v

you should get something like this:

GNU Make 3.81

Copyright (C) 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.0

Then type:

gfortran --version

Now you should get:

GNU Fortran (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

3) Finally, you can download the Molden 5.7 source code. Open your Terminal (/Applications/Utilities/Terminal.app) and type:

cd Desktop

curl ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/molden5.7.tar.gz -o molden5.7.tar.gz

When the download is over, close the terminal and look at your desktop. Double-click the file molden5.0.tar.gz and you’ll get a new folder called molden5.7. Now you’re ready to compile the software. Open again the Terminal and type

cd Desktop/molden5.7

 to get in the right directory and

make all

to compile Molden 5.7. Just ignore the alerts, they won’t affect the final executable files.

4) Now you can remove the original files:

rm -r *.o *.c *.f *.log *.old *.g77 *.f.g77

rm -r */*.o */*.c */*.f */*.h */*.bak

Try and run your compiled Molden 5.7 by typing

./molden

or

./gmolden

for the OpenGL version.

In order to be able to access Molden from your Application menu, just move the molden5.7 folder from your desktop to your Application folder.

5) That’s it. Now you can enjoy Molden on your 64 bit macOS High Sierra system!

 

Should you find any problem with the compilation, don’t hesitate to contact me directly by e-mail.

Questionnaire and social

Share on:
Impostazioni cookie