How to compile and run the code
Linux and OS X
- input.txt and main.cpp should be saved in the same folder
- compilation on Linux and OS X:
g++ main.cpp -o skmf
- running (e.g. in bash shell):
Installing Code::Blocks and opening main.cpp
The program code is written in C++. To compile it on Windows, we recommend installing the open source Code::Blocks IDE (integrated development environment). Download the binary release from the following link:
Download the codeblocks-XX.YYmingw-nosetup.zip file, where XX.YY is the current version number (16.01 on 28/04/2016). Extract the downloaded .zip file and run codeblocks.exe .
In Code::Blocks open the downloaded main.cpp file under File -> Open.
Changing to C++11 standard
The program code uses C++11 standard, the compiler must be set accordingly.
Go to Settings -> Compiler...
Under Compiler Settings -> Compiler flags tick the box next to the "Have g++ follow the C++11 ISO C++ language standard [-std=C++11]" line, then click the OK button.
Compiling and running the code
To create an executable .exe file press Ctrl+F9 or click on the yellow gear icon in the top row.
Go to the folder where you copied the input.txt and main.cpp files and run the newly created main.exe file.
Visualizing the results
The SKMF software's output file is in extended .XYZ file format. To visualize the results we recommend OVITO, The Open Visualization Tool which is available to all major operating systems, including Microsoft Windows, MacOS and Linux.
To get help in the first steps of using OVITO to visualise the results of the simulations, please go to our OVITO tutorial page.