This section explains how to run a first simulation.
After the installation is complete, the location of the BornAgain libraries needs to be included into the LD_LIBRARY_PATH
(or DYLD_LIBRARY_PATH
for MacOS) and PYTHONPATH
environment variables. This can be done by running the BornAgain setup script in a terminal:
source <install_dir>/bin/thisbornagain.sh
This command can also be placed in your .bashrc
file (.profile
for MacOS) to avoid having to run this command for each terminal session.
In your installation directory you will find the following directory structure:
|-- bin - Links to executables
|-- include
| |-- BornAgain-1.19 - C++ headers for development purposes
|-- lib
| |-- BornAgain-1.19 - The BornAgain libraries
|-- share
| |-- BornAgain-1.19
| |-- Examples - Directory with examples
Run an example and enjoy your first BornAgain simulation plot.
python <install_dir>/share/BornAgain-/Examples/python/simulation/ex01_BasicParticles/CylindersAndPrisms.py
The BornAgain application can be run by executing following command
$ <install_dir>/bin/bornagain