The following requirements need to be fulfilled in order to successfully install the software:

  • g++/gcc v4.9 or higher
  • icpc/icc v2018 or higher [optional but recommended]
  • MPI compilers [optional, needed only for LAMMPS]
  • FFTW libraries
  • GSL libraries [optional, needed only for normal_modes executable]
  • Read the entire README before doing anything!

Setup

The home directory of MBX will be referred to as $MBX_HOME. You must set this environment variable, which can be exported either manually or by sourcing sourceme.sh:

git clone https://github.com/paesanilab/MBX.git
cd MBX/
export MBX_HOME=$PWD

Compilation

MBX has different compilation instructions depending on how you plan to use it:

  • For use with i-PI, Python, Fortran, or standalone, perform a basic installation using the steps below.
  • For use with LAMMPS, perform an alternative MBX_MPI installation

Basic installation of MBX (for use with i-PI, Python, Fortran, or standalone. NOT LAMMPS)

autoreconf -fi
./configure
make && make install

./configure has additional flags and options if you want to customize your installation:

  • CXX= if you want to use a different compiler than the system default. Popular options include CXX=icpc or CXX=g++
  • --enable-shared if you want to also compile MBX as a shared library. This is required for using MBX with Python.
  • --enable-debug for debugging using GDB.
  • --enable-verbose will turn on additional logging to the console.
  • --disable-optimization will disable compiler optimizations. This is not recommended unless you are debugging.
  • --help to see additional configuration options

After performing basic installation, you should run the unit tests to make sure everything is working properly.

Alternative installation of MBX_MPI (LAMMPS only)

If you want to use MBX with LAMMPS, instead skip to this section about the LAMMPS plugin. This special installation using MPI is only compatible with LAMMPS and is incompatible with i-PI, Python, Fortran or standalone usage. If you need to use any of these other plugins, perform a separate basic installation in a different directory.