Installation

Linux

This software package relies on the Armadillo C++ Linear Algebra Library, which needs to be installed on the system prior to compilation of the MolSpin application. Furthermore, it is suggested that OpenBLAS and LAPACK are also installed on the system, and you should make sure that they are recognized by Armadillo when installing that package (when you install Armadillo it will tell you whether it has detected those packages).

You can use other high-speed math libraries like Intel MKL instead of OpenBLAS, but you may need to modify the makefile in that case. Note also if you are not using OpenBLAS that you need to change main.cpp: import and usage of the function "openblas_set_num_threads" should be removed (it is just 2 lines that should be removed).

To compile the MolSpin application, enter the folder containing makefile and main.cpp in a terminal, and type make. If everything works, you will then have the executable file called "molspin" in the folder. If it does not work, you may need to change the makefile or configure your Armadillo installation.

Note that installation (or rather compilation) of MolSpin does not generate any files outside the MolSpin folder containing the source code.

Windows

We have not tried to compile the application on Windows, but since Armadillo also is available for Windows, it should be possible. Otherwise you can run it through the Windows Subsystem for Linux or Cygwin.

If you are not using OpenBLAS, you need to change main.cpp: import and usage of the function "openblas_set_num_threads" should be removed (it is just 2 lines that should be removed).

Note that installation (or rather compilation) of MolSpin does not generate any files outside the MolSpin folder containing the source code.

Testing your MolSpin installation

Once MolSpin is installed, you should check that everything works by running make test (provided you are using a Linux terminal).