gMultiwfn is an unofficial and (maybe) enhanced gfortran port of the popular wavefunction analyzing software Multiwfn developed by Tian Lu. This gfortran port is maintained by Xing Yin ([email protected]). Email Xing or open an issue on the github (strongly preferred!) on the github if you find a bug or need a new additional feature. You can also discuss related topics in the official Chinese forum for Multiwfn
.
RPM packages for openSUSE, Fedora and CentOS are built on the OBS platform (thanks to openSUSE!). Go to this gMultiwfn download page and select the OS, the download instructions for your system will show.
gMultiwfn
uses the standard GNU Build System. If you are familiar with ./configure
and make && make install
, building gMultiwfn is very easy. The following steps sevre as a general guideline and you can make changes accordingly if you are an expert on GNU autotools or have special needs.
The source tarball can be found here. Please use the link displayed as gMultiwfn-3.4.0-0.tar.gz, not the links displayed as
Source code (zip)
Source code (tar.gz)
The laters are the "git" versions of the source code generated by GitHub automatically and they are for developers only.
- You can use either Intel Fortran Compiler (
ifort
) orgfortran
. - If you choose
ifort
, make sure Intel Math Kernel Library (Intel MKL) is installed. If not sure, you can just try to continue building first because MKL is usually bundled and installed withifort
by default. - If you choose
gfortran
, make sure you have lapack/blas and their development files (usually named aslapack-devel
andblas-devel
orlapack-dev
andblas-dev
in your distro's repository) installed. The optimized LAPACK/BLAS implementations (see below) will not be searched and used by theconfigure
script during building.
- Open a terminal and go to the directory where the tarball is downloaded, or move the tarball to your current directory.
- Unzip and extract files from the source tarball. If the name of the tarball is
gMultiwfn-3.4.0-1.tar.gz
, the command would be:
tar -xvzf gMultiwfn-3.4.0-0.tar.gz
- Make a separate build direcotry under the original "root" source directory:
cd gMultiwfn-3.4.0-0
mkdir build
- Run the
configure
script to configure the installation path and generate the make files. The binary (Multiwfn
) will always be installed to abin
directory but you can specify the where thebin
direcory is located. For$HOME/bin
, type:
../configure --prefix=$HOME
- make and install. You can specify the number of processes to be used by
make
. For example, to fully utilize the power of a 4-core/8-thread CPU, type:
make -j8 && make install
- Now
Multiwfn
should be found at$HOME/bin
. Add$HOME/bin
to yourPATH
environment variable if not added before. TypeMultiwfn
to see if the building is successful.
gMultiwfn
is dynamically linked to lapack
and blas
by default. The reference implementations of lapack
and blas
are usually the slowest and in a lot of cases they can be safely replaced by optimized implementations such as OpenBLAS
and ATLAS
using the steps described below. Note that installing OpenBLAS or ATLAS is beyond the scope of this document and please refer to your distro's manual on that information.
Use man
or refer to your disto's manual on the usage. You may need root user's privilege to run this command.
LD_PRELOAD
is the enviroment variable to force the dynamic linker in Linux to use a certain version of shared libraries (.so files). It provides a quick solution to try a new libarary without being asked for root user privilege. Assuming OpenBLAS
is installed to /path/to/libopenblas.so
, LD_PRELOAD=/path/to/libopenblas.so Multiwfn
will start Multiwfn
with the optimized OpenBLAS. To avoid typing the extra letters every time, simply add alias gMultiwfn='LD_PRELOAD=/path/to/libopenblas.so Multiwfn'
to your bash initialization file (usually ~/.bashrc
). gMultiwfn
will be equivalent to LD_PRELOAD=/path/to/libopenblas.so Multiwfn'
for all new termnal windows.
gMultiwfn
does not contain the GUI which is base on the closed-source DISLIN library.gMultiwfn
supports theOMP_NUM_THREADS
enviroment variable and the traditionalnthreads
parameter fromsettings.ini
or the interactive input (the hidden option1000
at the main menu).nthreads
has the higher priority. Only whennthreads
is set to0
(which is the default setting without asettings.ini
file),OMP_NUM_THREADS
determines the number of threads to use. For example, to use 8 threads withoutsettings.ini
, just run
OMP_NUM_THREADS=8 gMultiwfn