Installation

The MOMAP package comprises several different programs, and also uses a number of quantum chemisty programs - specifically, an ab initio package for electronic structure calcualtions. Currently, we have interfaced MOMAP to Gaussian(09 or 16), Turbomole, NWChem and Dalton. The MOMAP package support Gaussian and Turbomole more fully than the others. Thus we recommend that Gaussian or Turbomole ab initio packages are used. The following instructions apply to Unix and Linux systems; they can be followed with little change for Mac OS X and Windows systems by working from a terminal window on the Mac or by using a Unix emulator such as Cygwin under Windows.

Prerequisites

In order to install the MOMAP package, the following components must be present on your local system:

  • MPICH2 / OPENMPI
  • LAPACK (version >= 3.5.0)
  • FFTW (version >= 3.2.2)

All of the prerequisites need to support dynamically linking. Shared objects should be compiled for each package. If your local machine do not have shared objects compiled, you’d need to recompile your package with --enable-shared option, or you could choose to install a new package locally. The following part presents the installation instruction for these prerequisites. You can choose to install the missing prerequisites according to your local machine deployment. Feel free to skip the part(s) that your local machine has already installed the package(s).

Install MPICH2 library

Go to the MPI website and download the source code, uncompress the folder, and change into the MPICH2 directory.

>>> wget -c http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.5/mpich2-1.5.tar.gz
>>> tar xzvf mpich2-1.5.tar.gz
>>> cd mpich2-1.5

Once doing this, you should be able to configure your installation by performing ./configure. The --enable-shared would be an necessary option . If you need to install MPICH2 to a local directory (for example, if you don’t have root access to your machine), type ./configure --prefix=/installation/directory/mpich2. For more information about possible configuration parameters, type ./configure --help.

>>> ./configure --prefix=/installation/directory/mpich2 --enable-f77 --enable-fc --enable-static --enable-shared
>>> make
>>> make install

If there’re not any errors during compiling process, it means the MPICH2 package is installed successfully. Mark down the install location of the MPICH2. You’ll need that path when you install MOMAP.

Install LAPACK library

The MOMAP installation requires a shared object of LAPACK library. However, official LAPACK doesn’t support shared library compliation. Here, we present a typical and simple way to compile shared library of LAPACK 3.7.0.

The first step is to get the official package of LAPACK 3.7.0 and untar it.

>>> wget -c http://www.netlib.org/lapack/lapack-3.7.0.tgz
>>> tar xzvf lapack-3.7.0.tgz

And the next step is to change the current directory to the lapack source code.

>>> cd lapack-3.7.0

Now you need to download a patch for LAPACK 3.7.0 from the official website of MOMAP. Then you’ll get a patch file called shared-lapack-3.7.0.patch. Place this file to the directory of lapack source code. After that, you can patch this file to the source code by running the following command.

>>> patch -p0 < shared-lapack-3.7.0.patch

And remember to add the current directory to the LD_LIBRARY_PATH environment variable.

>>> export LD_LIBRARY_PATH=/path/to/lapack-3.7.0:$LD_LIBRARY_PATH

And then compile the BLAS and LAPACK library subsequently.

>>> cd BLAS/SRC
>>> make
>>> cd ../..
>>> make

After the compiliation process, you’ll find libblas.so and liblapack.so are generated in your directory.

Install FFTW library

To install FFTW library, the first step is to choose an appropriate version of FFTW to download and untar it. And then enter the package directory.

>>> wget -c http://www.fftw.org/fftw-3.3.5.tar.gz
>>> tar xzvf fftw-3.3.5.tar.gz
>>> cd fftw-3.3.5

Installation for FFTW library is simple. The key step is to make sure that option --enable-shared is included in your configure command.

>>> ./configure --prefix=/installation/path/fftw --enable-threads --enable-openmp --enable-mpi --enable-static --enable-shared --enable-fortran F77=gfortran
>>> make
>>> make install

If the compilation has no errors, it means the FFTW library is installed successfully. Make sure to mark down the installation path of FFTW library. You’ll use it in the subsequent MOMAP installation.

Note

If you want to run transport calculation in MOMAP. you also need to have Gaussian 09 and PBS job scheduler system (Torque, Pbspro, etc) install in your machine. For more information, check Gaussian Inc. and Portable Batch System.

Install MOMAP

  1. Obtain the latest MOMAP release from the official website. The release MOMAP package is named as momap-<version>-<mpi_type>.tar.gz. Make sure the package you download is adaptive to the environment of your local machine.

After that, untar the MOMAP package in a proper directory, and change into the base directory of MOMAP.

>>> tar xzvf momap-<version>-<mpi_type>.tar.gz
>>> cd momap-<version>-<mpi_type>
>>> MOMAP_ROOT=`pwd`
  1. Obtain a valid license from the official website. Usually the license file is named as licence.lic. Once the license file is downloaded to your local machine, move the license file to the base directory of MOMAP package.
>>> mv /path/to/license.lic $MOMAP_ROOT/
  1. Copy the environment.example file to the bin/ directory as a hidden file.
>>> cp environment.example bin/.environment

Now you need to define some environment variables in your local bin/.environment file.

  • MOMAP_ROOT should be set to the full pathname of the base directory for the MOMAP package.
  • MOMAP_LICENSE should be set to the filename of the MOMAP license with full pathname.
  • MOMAP_LAPACK_LIB should be set to the full pathname of the directory containing the LAPACK shared library.
  • MOMAP_FFTW_LIB should be set to the full pathname of the directory containing the FFTW shared library.
  • MOMAP_MPI_ROOT should be set to the full pathname of the directory containing the MPICH2 / OPENMPI program.
  • MOMAP_MPI_LIB should be set to the full pathname of the directory containing the MPICH2 / OPENMPI shared library.
  • MOMAP_MPI_BIN should be set to the full pathname of the directory containing the MPICH2 / OPENMPI executables.

Note

If the version of your local compiler gcc in your system is lower than 5.3.0, please uncomment the MOMAP_EXTERNAL_LIB definition line in the bin/.environment file. It will prevent you from encountering the “error while loading some shared libraries” errors.

  1. Finally, you need to define a global environment variable MOMAP_ROOT and add the MOMAP bin directory to your path. For example:
export MOMAP_ROOT=/path/to/momap-1.0.0
export PATH=$MOMAP_ROOT/bin:$PATH

This can be included in your initialization file. This would probably be your .bashrc file if you use the Bash shell.

Once you finish the installation process, restart the prompt shell, then you are free to run your MOMAP program.