This release brings important changes in the sample model. We rectify the logic by inverting the place of inter-particle structures and particles in the model hierarchy. For the first time, we support three-dimensional bulk structures, starting with dilute and dense random assemblies. Ground is laid for future addition of ordered 3D structures.
This release breaks Python scripts and GUI projects. Structural changes are so deep that we cannot provide a migration script. However, thanks to progress in agentic coding based on a large language model, we can offer a new migration service: Send us your script from BornAgain 23 or earlier, and we will try conversion to BornAgain 24 using our trained coding agent.
We now describe the most important changes in some detail.
In the instrument model, we added support for a detector below the horizon and for a beam entering from below.
Support for polarization has been improved. The polarization analyzer now takes three arguments: direction, parallel transmission, and antiparallel transmission.
The Offspecular now performs adaptive integration along phi_f; therefore
the n_phi argument could be removed. The integration can be controlled
with ‘setOffspecIntegratorOptions’.
In the Sample model, we completely removed the Layout class. To recall,
the previous model hierarchy was
IInterference class, except if particles are uncorrelatedThe new model hierarchy is
The interparticle structure is specified by classes that inherit from the
abstract interface class Struct. The prefix “Interference” has been dropped
from all class names:
In the future, we intend to add Ordered3D classes to support bulk lattices.
The Disordered2D and Disordered3D stand for random particle assemblies.
By default, these assemblies are either Dilute, meaning that particles
are completely uncorrelated, or Dense. For dense assemblies, excluded-volume
interactions are taken into account, and the structure factor is computed
according to the Percus-Yevick approximation.
In the past, 2D structures were always deposited on top of a reference plane. This was the bottom interface of a layer, except for the substrate where the reference was the top interface.
Now 2D structures must be added using new functions
If a plane is only partly covered by structure, or is to be covered by an incoherent mixture of different structures, then use the functions
coverage argument (with values between 0 and 1).In the past, particles wer aligned at the bottom, i.e. the lowest point of the particle volume was placed in the reference plane. There was some workaround for spheres in lattices, and some exception for soft particles. To end with that confusion, alignemnt at bottom, center, or top must now explicitly be specified in the Particle, Compound, CoreShell, Mixture, Mesocrystal constructors.
The new Mixture class, implemented upon user request, represents particle sites occupied at random by different kinds of particles.
For 2D ordered systems, the parameter lateralPositionVariance (former
positionVariance) has now the dimension length (instead of area).
For the Mesocrystal class, there is a new setMesoReciprocalSum option.
There are a few changes to form factor classes:
Ellipsoid addedHemiEllipsoid replaced by EllipsoidalSegmentHorizontalCylinder accepts cutFromTop and cutFromBottom argumentsThe Material class has been reengineered so that refraction-index-based
and SLD-based materials can be used together.
The SimulationOption setUseAvgMaterials is now true by default. This means
that the transmission and reflection computation uses a refractive index that
takes into account not only the bulk material of a layer but also its particle
decoration. The new default ensures correctness (within the limits of DWBA)
even for dense decorations. Setting the option back to false is a legitimate
approximation for dilute decorations, but has no computational advantages.
Therefore it should be rarely needed, except perhaps for reproducing previous
simulations.
For further improvements and bug fixes, see the CHANGELOG.
Best greetings from the BornAgain maintainer team:
Ammar Nejati, Mikhail Svechnikov, Joachim Wuttke
January 1, 0001