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
In Windows, using the Windows Subsystem for Linux (WSL) or Cygwin for compiling and running MolSpin would be easiest. The WSL setup should be available in the Windows app store and, most of the time, installed on the system. When Ubuntu is used here, the installation is straightforward. The following commands should be used to install the correct environment:
sudo update // Updating Ubuntu
sudo upgrade // Upgrading Ubuntu, these two commands are done to get
// the most recent Ubuntu version and compilers.
sudo apt-get install liblapack-dev // Get LAPACK library.
sudo apt-get install libblas-dev // Get OPEBLAS library.
sudo apt-get install libboost-dev // Installs files for the Boost C++ libraries.
sudo apt-get install libarmadillo-dev // Get Armadillo.
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).