Run a first simulation

This section explains how to run a first simulation.

Post installation steps

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.

Running the first Python simulation

In your installation directory you will find the following directory structure:

|-- bin                   - Links to executables
|-- include
|   |-- BornAgain-1.16    - C++ headers for development purposes
|-- lib
|   |-- BornAgain-1.16    - The BornAgain libraries
|-- share
|   |-- BornAgain-1.16
|       |-- 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

Running the BornAgain GUI

The BornAgain application can be run by executing following command

$ <install_dir>/bin/bornagain