• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

config/H31-Jul-2018-3,9653,510

doc/H03-May-2022-

examples/H03-May-2022-200,146199,431

init/H03-May-2022-149127

manually_patched/H03-May-2022-

src/H31-Jul-2018-92,47872,839

.gitignoreH A D31-Jul-2018561 5951

LICENSEH A D31-Jul-201817.6 KiB340281

Makefile.amH A D31-Jul-2018459 2116

README.mdH A D31-Jul-20185.6 KiB6149

autogen.shH A D03-May-202239 31

check_upstream.shH A D03-May-2022901 3027

configure.acH A D31-Jul-2018475 2019

gnuize.shH A D03-May-2022504 188

gnuize_delta.shH A D03-May-20221.5 KiB3620

gnuize_src_orig.shH A D03-May-2022891 2214

population.f90H A D31-Jul-201866.6 KiB1,4811,047

update_src.shH A D03-May-20221.7 KiB6542

update_src_delta.shH A D03-May-20223.4 KiB122105

README.md

1# About *gMultiwfn*
2gMultiwfn is an unofficial and (maybe) enhanced gfortran port of the popular wavefunction analyzing software *[Multiwfn](http://sobereva.com/multiwfn)* developed by Tian Lu. This gfortran port is maintained by Xing Yin (stecue@gmail.com). Email Xing or [open an issue on the github](https://github.com/stecue/gMultiwfn/issues) (__*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](http://bbs.keinsci.com/forum-112-1.html) for `Multiwfn`.
3
4# Binary Packages
5RPM packages for openSUSE, Fedora and CentOS are built on the OBS platform (thanks to openSUSE!). Go to this [gMultiwfn download page]( https://software.opensuse.org//download.html?project=home%3Astecue%3AgMultiwfn&package=gMultiwfn) and select the OS, the download instructions for your system will show.
6
7# Compile From Source
8`gMultiwfn` uses the standard [GNU Build System](https://en.wikipedia.org/wiki/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.
9
10## Download the package
11The source tarball can be found [here](https://github.com/stecue/gMultiwfn/releases). Please use the link displayed as **[gMultiwfn-3.4.0-0.tar.gz](https://github.com/stecue/gMultiwfn/releases/download/v3.4.0-0/gMultiwfn-3.4.0-0.tar.gz)**, not the links displayed as
12
13> **Source code** (zip)
14>
15> **Source code** (tar.gz)
16
17The laters are the "git" versions of the source code generated by GitHub automatically and they are for developers only.
18
19## Requirements
20* You can use either Intel Fortran Compiler (`ifort`) or `gfortran`.
21* 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 with `ifort` by default.
22* If you choose `gfortran`, make sure you have lapack/blas and their development files (usually named as `lapack-devel` and `blas-devel` *or* `lapack-dev` and `blas-dev` in your distro's repository) installed. The optimized LAPACK/BLAS implementations (see below) will not be searched and used by the `configure` script during building.
23
24## Basic build protocol
251. Open a terminal and go to the directory where the tarball is downloaded, or move the tarball to your current directory.
262. 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:
27```bash
28tar -xvzf gMultiwfn-3.4.0-0.tar.gz
29```
303. Make a separate build direcotry under the original "root" source directory:
31```bash
32cd gMultiwfn-3.4.0-0
33mkdir build
34```
354. Run the `configure` script to configure the installation path and generate the make files. The binary (`Multiwfn`) will always be installed to a `bin` directory but you can specify the where the `bin` direcory is located. For `$HOME/bin`, type:
36```bash
37../configure --prefix=$HOME
38```
395. 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:
40```bash
41make -j8 && make install
42```
436. Now `Multiwfn` should be found at `$HOME/bin`. Add `$HOME/bin` to your `PATH` environment variable if not added before. Type `Multiwfn` to see if the building is successful.
44
45# Switch To A Faster LAPACK/BLAS Implementation
46`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.
47
48## Use `update-alternatives` to make a system-wide change
49Use `man` or refer to your disto's manual on the usage. You may need root user's privilege to run this command.
50
51## Use `LD_PRELOAD` to change just for `gMultiwfn`
52`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.
53
54# (Must Read) Differences Between *Multiwfn* And *gMultiwfn*
551. `gMultiwfn` does not contain the GUI which is base on the closed-source DISLIN library.
562. `gMultiwfn` supports the `OMP_NUM_THREADS` enviroment variable and the traditional `nthreads` parameter from `settings.ini` or the interactive input (the hidden option `1000` at the main menu). `nthreads` has the higher priority. Only when `nthreads` is set to `0` (which is the default setting without a `settings.ini` file), `OMP_NUM_THREADS` determines the number of threads to use. For example, to use 8 threads without `settings.ini`, just run
57```bash
58OMP_NUM_THREADS=8 gMultiwfn
59```
603. Depending on the version of OpenBLAS, you may need to use the serial version or the OpenMP version of OpenBLAS with `OMP_NUM_THREADS`. See discussions [here](https://groups.google.com/forum/#!topic/openblas-users/W6ehBvPsKTw) and [here](https://github.com/xianyi/OpenBLAS/issues/208).
61