Analysis of small angle scattering (SAS) data requires intensive modelling to
infer and characterize the structures present in a sample. This iterative
improvement of models is a time consuming process. Here we present the
Scattering Equation Builder (SEB), a C++ library that derives exact analytic
expressions for the form factor of complex composite structures. The user
writes a small program that specifies how sub-units should be linked to form a
composite structure and calls SEB to obtain an expression for the form factor.
SEB supports e.g. Gaussian polymer chains and loops, thin rods and circles,
solid spheres, spherical shells and cylinders, and many different options for
how these can be linked together. In the present paper, we present the
formalism behind SEB, and give simple case studies such as block-copolymers
with different types of linkage and more complex examples such as a random walk
model of 100 linked sub-units, dendrimers, polymers and rods attached to
surfaces of geometric objects, and finally the scattering from a linear chain
of 5 stars, where each star is build by four diblock copolymers. These examples
illustrate how SEB can be used to develop complex models and hence reduce the
cost of analyzing SAS data.Comment: 18 pages, 13 figure