Installation
Quantum Package can be downloaded on GitHub as an archive or as a git repository.
git clone https://github.com/QuantumPackage/qp2
Before anything, go into your quantum_package
directory and run
./configure
This script will create the quantum_package.rc
bash script, which
sets all the environment variables required for the normal operation of
Quantum Package. It will also initialize the git submodules that are
required, and tell you which external dependencies are missing and need to be
installed. The required dependencies are located in the
external/qp2-dependencies directory, such that once Quantum Package is configured the
internet connection is not needed any more.
When all dependencies have been installed, (the configure will
inform you what is missing) source the quantum_package.rc
in order to
load all environment variables and compile Quantum Package.
Now all the requirements are met, you can compile the programs using
make
Installation of dependencies via a Conda environment
conda env create -f qp2.yml

Requirements
Linux OS
Fortran compiler : GNU Fortran, Intel Fortran or IBM XL Fortran
Python > 3.7
IRPF90 : Fortran code generator
EZFIO : Easy Fortran Input/Output library generator
ZeroMQ : networking library
GMP : Gnu Multiple Precision Arithmetic Library
Ninja : a parallel build system
|pkg-config| : a tool which returns information about installed libraries
When all the dependencies have been installed, go into the config
directory, and copy the configuration file that corresponds to your
architecture. Modify it if needed, and run configure with
configure -c
.
cp ./config/gfortran.example config/gfortran_avx.cfg
./configure -c config/gfortran_avx.cfg
Note
The popcnt
instruction accelerates a lot the programs, so the
SSE4.2, AVX or AVX2 instruction sets should be enabled in the
configuration file if possible.
Help for installing external dependencies
Using the configure executable
The configure executable can help you in installing the minimal dependencies you will need to compile the Quantum Package. The command is to be used as follows:
./configure -i <package>
The following packages are supported by the configure installer:
ninja
zeromq
f77zmq
gmp
ocaml (\(\approx\) 5 minutes)
docopt
resultsFile
bats
zlib
Example:
./configure -i ninja
If the configure executable fails to install a specific dependency
If the configure executable does not succeed in installing a specific dependency, you should try to install the dependency on your system by yourself.
Before doing anything below, try to install the packages with your package manager (apt, yum, etc).
Ninja
Ninja is a build system (like GNU make), with a focus on speed.
Download the latest binary version of Ninja here : https://github.com/ninja-build/ninja/releases/latest
Unzip the ninja-linux.zip file, and move the ninja binary into the
$QP_ROOT/bin
directory.
IRPF90
IRPF90 is a Fortran code generator for programming using the Implicit Reference to Parameters (IRP) method.
If you have pip for Python2, you can do
python3 -m pip install --user irpf90
Otherwise,
Download the latest version of IRPF90 here : https://gitlab.com/scemama/irpf90/-/archive/v1.7.2/irpf90-v1.7.2.tar.gz and move the downloaded archive in the
$QP_ROOT/external
directoryExtract the archive and go into the
irpf90-*
directory to run make
Note
The IRPF90_PATH
variable may need to be updated in the configuration
file $QP_ROOT/etc/irpf90.rc
.
ZeroMQ and its Fortran binding
ZeroMQ is a high-performance asynchronous messaging library.
Download the latest stable version of ZeroMQ here : https://github.com/zeromq/libzmq/releases/latest and move the downloaded archive in the
$QP_ROOT/external
directoryExtract the archive, go into the
zeromq-*
directory and run the following commands
./configure --prefix="${QP_ROOT}" --without-libsodium
make
make install
Download the Fortran binding here : https://github.com/zeromq/f77_zmq/releases/latest and move the downloaded archive in the
$QP_ROOT/external
directoryExtract the archive, go into the
f77_zmq-*
directory and run the following commands
export ZMQ_H=${QP_ROOT}/include/zmq.h
make
cp libf77zmq.a ${QP_ROOT}/lib
cp libf77zmq.so ${QP_ROOT}/lib
Copy the
f77_zmq_free.h
file in theZMQ
module as follows:
cp f77_zmq_free.h ${QP_ROOT}/src/zmq/f77_zmq.h
Zlib
Zlib is the compression library used by gzip.
Download the latest version of Zlib here: https://www.zlib.net/zlib-1.2.11.tar.gz and move it in the
$QP_ROOT/external
directoryExtract the archive, go into the
zlib-*
directory and run the following commands
./configure --prefix=${QP_ROOT}
make
make install
With Debian or Ubuntu, you can use
sudo apt install zlib1g-dev
GMP
GMP is the GNU Multiple Precision Arithmetic Library.
Download the latest version of gmp here: ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2 and move it in the
$QP_ROOT/external
directoryExtract the archive, go into the
gmp-*
directory and run the following commands
./configure --prefix=${QP_ROOT}
make
make install
With Debian or Ubuntu, you can use
sudo apt install libgmp-dev
OCaml
OCaml is a general purpose programming language with an emphasis on expressiveness and safety.
The following packages are required (Debian or Ubuntu):
sudo apt install libncurses5-dev pkg-config libgmp3-dev m4
Download the installer of the OPAM package manager here : https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh and move it in the
$QP_ROOT/external
directoryIf you use OCaml only with Quantum Package, you can install the OPAM directory containing the compiler and all the installed libraries in the
$QP_ROOT/external
directory asexport OPAMROOT=${QP_ROOT}/external/opam
Run the installer
echo ${QP_ROOT}/bin ${QP_ROOT}/external/opam_installer.sh --no-backup --fresh
The opam command can be installed in the
$QP_ROOT/bin
directory. To do this, take the output ofecho ${QP_ROOT}/bin
and use it as an answer to where opam should be installed.Install the OCaml compiler
opam init --comp=4.11.1 eval `${QP_ROOT}/bin/opam env`
If the installation fails because of bwrap, you can initialize opam using:
opam init --disable-sandboxing --comp=4.11.1 eval `${QP_ROOT}/bin/opam env`
Install the required external OCaml libraries
opam install ocamlbuild zmq sexplib ppx_sexp_conv ppx_deriving getopt
Docopt
Docopt is a Python package defining a command-line interface description language.
If you have pip for Python3, you can do
python3 -m pip install --user docopt
Otherwise,
Download the archive here : https://github.com/docopt/docopt/releases/tag/0.6.2
Extract the archive
Copy
docopt-0.6.2/docopt.py
in the$QP_ROOT/scripts
directory
resultsFile
resultsFile is a Python package to extract data from output files of quantum chemistry codes.
If you have pip for Python3, you can do
python3 -m pip install --user resultsFile