BornAgain is a multi-platform framework available in Windows, MacOS and Linux. The C++ code, all configuration files, tests and Python scripts are all open-source, available at https://jugit.fz-juelich.de/mlz/bornagain.
The framework consists of shared libraries written in C++. Thanks to the Python bindings the libraries can be imported into Python as external modules.
BornAgain depends on a few external and well established open-source libraries: boost, GNU Scientific Library, and Fast Fourier Transformation libraries. They must be installed on the system to run BornAgain on Unix platforms. In the case of Windows and MacOS they are added to the system automatically during the installation of BornAgain.
Other dependencies are included in the source archive under 3rdparty to facilitate deployment and installation.
Dynamic class hierarchies can be built on the fly to represent complex sample structures. For example, to simulate the scattering from a mixture of cylinders and prisms deposited on a substrate, the following tree of objects has to be created.
The parent Sample object represents the sample and contains three children: the semi-infinite air layer, the semi-infinite substrate layer, and the interface between them. The air layer contains the so-called ParticleLayout object, which holds information about the particles populating the layer and the interference between them. Each particle is fully defined via its children: the material the particle is made of and the form factor representing the particle’s shape.
The Python API is explained in the following sections of this documentation.