Skip to main content

Python bindings for the Scattering Equation Builder (SEB) library

Project description

Notes for this repository in developing

Release Development Goals

The current development targets are:

  • Make setup straightforward for users with a standard Python 3 installation.
  • Enable installation with a single command: pip install pyseb.
  • Return scattering equations as native SymPy expressions for downstream symbolic and numerical workflows.
  • Keep GiNAC workflow as is in the old repository.

Future Development Goals

  • Add import/export support for World structures, so users can save and reload models from files.

Documentation

Developer note: build options

The canonical build uses CMake + Ninja. The top-level makefile is now only a thin convenience wrapper around those CMake commands.

1) Build with Makefile shortcuts

Build the portable C++ core:

$ cd /home/tobi/pySEB
$ make core

Build with the optional GiNaC backend:

$ cd /home/tobi/pySEB
$ make ginac

Build the Python extension:

$ cd /home/tobi/pySEB
$ make python

Build and run C++ tests:

$ cd /home/tobi/pySEB
$ make tests

2) Build with CMake + Ninja (recommended)

$ cd /home/tobi/pySEB
$ cmake -S . -B build-core -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=OFF -DSEB_ENABLE_GINAC_BACKEND=OFF
$ cmake --build build-core --target seb seb-symbolic

Build with the optional GiNaC backend:

$ cd /home/tobi/pySEB
$ cmake -S . -B build-ninja-ginac -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=OFF -DSEB_ENABLE_GINAC_BACKEND=ON
$ cmake --build build-ninja-ginac

3) Build and run tests (CTest)

$ cd /home/tobi/pySEB
$ cmake -S . -B build-ninja-ginac -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=OFF -DSEB_ENABLE_GINAC_BACKEND=ON
$ cmake --build build-ninja-ginac
$ cmake -S Tests -B Tests/build-ninja -G Ninja -DCMAKE_BUILD_TYPE=Release -DSEB_BUILD_DIR=/home/tobi/pySEB/build-ninja-ginac
$ cmake --build Tests/build-ninja
$ ctest --test-dir Tests/build-ninja --output-on-failure

4) Install pySEB locally with pip (developer workflow)

Create and use a virtual environment:

$ cd /home/tobi/pySEB
$ python3 -m venv venv
$ source venv/bin/activate
$ python -m pip install -U pip setuptools wheel

Editable install from source (recommended while developing):

$ python -m pip install -e .

Quick smoke test:

python - <<'PY'
import pyseb
w = pyseb.World()
print("pyseb OK", type(w).__name__)
PY

Optional: build and install wheel locally:

$ python -m pip install -U build
$ python -m build
$ python -m pip install dist/pyseb-0.1.0-cp311-cp311-linux_x86_64.whl

5) What must be true before users can run pip install pyseb

This project now has packaging CI for source distributions and desktop Python wheels, and the Packaging workflow currently builds green wheels for every target platform. Before a real public pip install pyseb release, the remaining external release work is:

  1. Publish artifacts to PyPI Build and upload both sdist and wheels after the packaging workflow is green. This still needs a tagged release run.

  2. Build wheels for supported Python versions and desktop platforms ✅ Supported Python versions are currently 3.9, 3.10, 3.11, and 3.12. Wheels build and repair successfully for Linux x86_64 (manylinux), Windows AMD64, macOS x86_64 (Intel, macOS 14+), and macOS arm64 (Apple Silicon, macOS 15+). iPhone/iPad iOS wheels are not part of the first release.

  3. Keep test suite green C++ tests are release-gated by the Packaging workflow's CTest job.

  4. Keep Python API and docs/examples aligned docs/python.md, pyseb/examples/python/sympy_example.py, and the Python smoke tests use the current World.Add(...)/World.Link(...) calling style.

  5. Release securely Configure PyPI trusted publishing (register this GitHub repository/workflow as a trusted publisher on the PyPI project settings) before uploading artifacts from CI. The release.yml publish job already requests id-token: write and uses pypa/gh-action-pypi-publish, so no code change is needed once the PyPI-side trust relationship is configured.

Unsupported platforms can still install from source if Python 3.9+, CMake, a C++ compiler, pybind11, GSL, and platform-specific build tools are available.

Current Codebase Challenges

  • Test stability needs to stay visible
    The current C++ suite is passing, but reliability should remain release-gated by the CTest and Python smoke-test workflows.

  • Build workflows are fragmented
    Multiple parallel build paths (Make, CMake, Ninja, Python packaging) increase maintenance overhead and developer confusion.

  • Architecture is partially modularized, but build boundaries still need care
    Symbolic backend logic lives in seb-symbolic, and Python bindings are optional with BUILD_PYTHON. The active source layout is split into seb/ for the C++ scattering core, seb-symbolic/ for symbolic expressions/backends, and pyseb/ for Python bindings, package code, examples, and Python tests.

    • Keep new symbolic engines as backend-specific implementations registered through SymbolicFactory.
    • Keep pySEB as a thin binding/package layer over the stable seb and seb-symbolic targets.
  • Adding new sub-units has become harder
    The implementation and validation path for new sub-units is more complex than before, which slows development.

  • Documentation drift exists
    Several Markdown docs are outdated or inconsistent with current build steps and API behavior.

  • Technical debt
    Some inheritance paths are currently messy. For example, GiNaCSymbolic.hpp contains a temporary compatibility inheritance used as a quick fix:

    // Backward compatibility for legacy code paths that still construct GiNaCSymbolic.
    class GiNaCSymbolic : public GiNaCFactory {
    };
    

Current C++ test status in this development branch: 8/8 passing with ctest --test-dir Tests/build-ninja --output-on-failure.



Scattering Equation Builder - SEB

SEB is a C++ library where one can build a structure by linking sub-units such as polymers or geometric shapes together and then ask SEB to analytically derive a symbolic expression for the small angle scattering of the structure.

Introduction

SEB is a C++ library that allows you to build structures from sub-units such as spheres, polymers, rods, etc., and obtain their scattering properties symbolically. SEB provides functions that enable you to attach sub-units together at specific points called reference points, and compute the form factor of a composite structure, $F$, the radius of gyration, $R^2_g$, and other scattering properties relevant for structures in solution.

Workflow

To give you a quick overview of how SEB works, imagine a structure that you want to build from the available sub-units. You can use SEB to write a short C++ program that defines the structure by creating and linking sub-units together, and generate the form factor as a symbolic equation. You can then plot the equation by substituting the symbols with numerical values. A typical work flow of SEB is shown in the following picture:

Workflow

  1. Here we imagine a star-polymer structure one can build from the given sub-units.
  2. Using the SEB library, we write a small C++ program to build the structure by attaching GaussianPolymer sub-units to a central point.
  3. End the code with calling cout << getFormFactor("PolymerStar") << endl to analytically calculate a symbolic expression for the form factor.
  4. Graph the equation by substituting the symbols in the equation for specific values.

Supported Subunits

Subunits

Overview of supported sub-units (SEB V1.0): a) a solid cylinder (SolidCylinder: center, hull, ends, surface), b) a solid sphere (SolidSphere: center, surface), c) a solid spherical shell (SolidSphericalShell: center, surfacei, surfaceo, surface), d) a thin spherical shell (ThinSphericalShell: center, surface), e) a thin disk (ThinDisk: center, surface, rim), f) a linear polymer (GaussianPolymer: end1, end2, middle, contour), g) a polymer loop (GaussianLoop: contour), h) a thin circle (ThinCircle: center, contour), i) a thin rod (ThinRod: end1, end2, middle, contour), j) an invisible point (Point: point). For each sub-unit type, the parenthesis shows its SEB name and reference points by which it can be linked to other sub-units.

Example structures

--- ---

Structures and form factors. Top left image) linear chains of different types of sub-units, Top right image) dendrimers of different types of sub-units, bottom left image) Rods and polymers attached to different surfaces on geometric bodies, and bottom right image) chain of 5 di-block copolymer stars and its form factor for three different contrasts. See the SEB paper for details and the PaperFigs folder for the code to generate these.

SEB Articles

The theory behind SEB can be found in the journal articles: Carsten Svaneborg, Jan Skov Pedersen, J. Chem. Phys. 136, 104105 (2012) "A formalism for scattering of complex composite structures. I. Applications to branched structures of asymmetric sub-units" and Carsten Svaneborg, Jan Skov Pedersen, J. Chem. Phys. 136, 154907 (2012) "A formalism for scattering of complex composite structures. II. Distributed reference points"

The reference for the SEB library itself is Tobias W. J. Jarrett and Carsten Svaneborg "A computational tool for symbolic derivation of the small angle scattering from complex composite structures", Journal of Applied Crystallography 57, 587 (2024). See below for Bibtex citations for these papers.

SEB's wiki

If you need API information or want more examples than below on how to use SEB please see the wiki (still under construction).

Installing

SEB has only been compiled on linux systems and has not been extensively tested on mac OS or Windows. If you are using Windows, we recommend using the Windows Subsystem for Linux (WSL), search for it in the search bar. Before downloading the source code make sure you have installed

  1. A working C++11 compliant compiler.
  2. A standard development environment with make and git.
  3. The GiNaC symbolic manipulation library for C++. GiNaC depends on the CLN library.
  4. The GNU scientific Library

SEB on Linux (Ubuntu)

Install dependencies

Ubuntu:

sudo apt update
sudo apt install libcln-dev libgsl-dev libginac-dev

Cloning the GIT code

You can clone the source code in the terminal using

git clone https://github.com/Tobionecenobi/SEB.git

this will create a SEB folder in the current working directory and download the source code into this folder.

Installing SEB on Windows (using WSL)

Windows Subsystem for Linux (WSL) allows you to install a virtual machine running e.g. Ubuntu. In that case you can use the Linux installation guide above.

Installing SEB on Windows (using MSYS2)

See the guide Lau Blom Grøndahl You may experience that the C++ compiler and make are not included by default.

Installing SEB on Mac (using brew)

Thanks to Andreas Haar Larsen / Caolan Browne for help here.

In a terminal do:

brew install cln
brew install gsl
brew install ginac

Clone SEB from github:

git clone https://github.com/Tobionecenobi/SEB.git

This creates a sub-folder SEB in which you find the source code. Before you can compile SEB you need to find the location of the GiNaC include files.

find /opt/homebrew -name ginac.h

If Homebrew installed GiNaC in a non-standard prefix, pass that prefix to CMake when configuring the optional GiNaC backend:

cmake -S . -B build-ninja-ginac -G Ninja -DSEB_ENABLE_GINAC_BACKEND=ON -DCMAKE_PREFIX_PATH=/opt/homebrew
cmake --build build-ninja-ginac

Nb. your exact Homebrew prefix might be different from the one above. Then you are ready to compile SEB.

Optional: Manual compilation of GSL/CLN/GINAC

This will install the GNU scientific library and GiNaC package along with their dependencies.

[!TIP] If you have problems installing GiNaC: If you have trouble installing GiNaC you can try to build GiNaC from scratch. To do this see following guide in SEB's wiki.

[!TIP] Another tip for installing GiNaC is to:

1) clone the cln library git clone git://www.ginac.de/cln.git and read the INSTALL* files.

2) clone the GiNaC library git clone git://www.ginac.de/ginac.git and again read the INSTALL* files.

There are guides for installing using cmake or installing on windows for both libraries.

Compiling

Assuming you git cloned into the folder SEB, then

cd SEB
make

will compile the SEB library (into build/libseb.a), along with all the examples (in Examples), code for generating figures in the SEB paper (in PaperFigs). Assuming everything went well, then Examples and PaperFigs will be full of executables which you can run to see how SEB works. These targets can be recompiled individually by calling make with "seb", "examples", "paperFigs", or "work" as an argument. The last argument compiles user own code in the work folder, which is empty when you clone the repo.

Running an example

cd Examples
./Micelle     (or Micelle.exe on windows).

This example calculates the scattering from 100 Gaussian polymers added to the surface of a solid sphere, in particular, the form factor, the form factor amplitude relative to the center, and the phase factor between two free polymer ends. The output of the program is

Form factor= \frac{9900 \frac{ \sin( R_{sphere} q)^{2} {(-1+\exp(- R_{g_{poly}}^{2} q^{2}))}^{2} \beta_{poly}^{2}}{ R_{sphere}^{2} R_{g_{poly}}^{4} q^{6}}+200 \frac{ \beta_{poly}^{2} {(-1+ R_{g_{poly}}^{2} q^{2}+\exp(- R_{g_{poly}}^{2} q^{2}))}}{ R_{g_{poly}}^{4} q^{4}}-600 \frac{ \beta_{sphere} \sin( R_{sphere} q) {(-1+\exp(- R_{g_{poly}}^{2} q^{2}))} \beta_{poly} {(\sin( R_{sphere} q)- R_{sphere} \cos( R_{sphere} q) q)}}{ R_{sphere}^{4} R_{g_{poly}}^{2} q^{6}}+9 \frac{ \beta_{sphere}^{2} {(\sin( R_{sphere} q)- R_{sphere} \cos( R_{sphere} q) q)}^{2}}{ R_{sphere}^{6} q^{6}}}{\beta_{sphere}^{2}+10000 \beta_{poly}^{2}+200  \beta_{sphere} \beta_{poly}}

Form factor amplitude relative to centre= -\frac{100 \frac{ \sin( R_{sphere} q) {(-1+\exp(- R_{g_{poly}}^{2} q^{2}))} \beta_{poly}}{ R_{sphere} R_{g_{poly}}^{2} q^{3}}-3 \frac{ \beta_{sphere} {(\sin( R_{sphere} q)- R_{sphere} \cos( R_{sphere} q) q)}}{ R_{sphere}^{3} q^{3}}}{\beta_{sphere}+100 \beta_{poly}}

Phase factor tip-to-tip= \frac{ \sin( R_{sphere} q)^{2} \exp(-2  R_{g_{poly}}^{2} q^{2})}{ R_{sphere}^{2} q^{2}}

Here R_{sphere} is the radius of the sphere, \beta_{sphere} the excess scattering length of the sphere, R_{poly} is the radius of gyration of the polymer, and \beta_{poly} is its excess scattering length. All scattering expressions are normalized so they converge to unity in the q->0 limit.

LaTeX produce the following rendering of the form factor expression: $$\frac{9900 \frac{ \sin( R_{sphere} q)^{2} {(-1+\exp(- R_{g_{poly}}^{2} q^{2}))}^{2} \beta_{poly}^{2}}{ R_{sphere}^{2} R_{g_{poly}}^{4} q^{6}}+200 \frac{ \beta_{poly}^{2} {(-1+ R_{g_{poly}}^{2} q^{2}+\exp(- R_{g_{poly}}^{2} q^{2}))}}{ R_{g_{poly}}^{4} q^{4}}-600 \frac{ \beta_{sphere} \sin( R_{sphere} q) {(-1+\exp(- R_{g_{poly}}^{2} q^{2}))} \beta_{poly} {(\sin( R_{sphere} q)- R_{sphere} \cos( R_{sphere} q) q)}}{ R_{sphere}^{4} R_{g_{poly}}^{2} q^{6}}+9 \frac{ \beta_{sphere}^{2} {(\sin( R_{sphere} q)- R_{sphere} \cos( R_{sphere} q) q)}^{2}}{ R_{sphere}^{6} q^{6}}}{\beta_{sphere}^{2}+10000 \beta_{poly}^{2}+200 \beta_{sphere} \beta_{poly}} $$

This looks pretty horrific because GiNaC does not attempt to simplify expressions, but it has the advantage that we can immediately provide a physical interpretation of all the terms. The terms in the numerator describe 1) the polymer-to-polymer interference contribution, 2) the single polymer Debye form factor, 3) the polymer-to-core interference contribution, 4) the Rayleigh form factor of the core. The numerator is the total excess scattering length squared hence its just $\left(100 \beta_{poly}+\beta_{sphere}\right)^2$.

The example folder has numerous other examples, most of which produce symbolic expressions. These can become very long. The code to generate all the figures from the SEB paper is located in PaperFigs. We have uploaded png plots of the figures with illustrations of the structures. For each curve, there is a corresponding C++ file that generates that structure and its scattering curve.

Validation

To ensure that all the sub-unit scattering expressions implemented in SEB are correct. We have validated the code and theory as follows.

Sampling Scattering Profiles for Complex Geometries

For more complex geometries, we have sampled the scattering profiles directly. We generate random points on the surface and internally in the geometry. Based on these points we have used the Debye formula to calculate the scattering form factors between pairs of scatterers inside the geometry, form factor amplitudes between internal points and reference points, and finally the phase factors between all pairs of reference points. Here reference points in the example of a solid spherical shell would be the centre, the internal surface, the external surface and the total surface. This gives a relatively large number of synthetic scattering files for each geometry. (Code+data in Mathematica/Sampled)

Analytical Derivation and Comparison with Synthetic Data

We have used Wolfram Mathematica to derive analytic expressions for the sub-units (Code in Mathematica/*.nb). Where relevant these expressions have been compared the synthetic data to ensure that all expressions derived by Mathematica match the sampled data within the statistical accuracy of our sampling. At this stage we can trust that theoretical expressions match the synthetic scattering data.

Implementation in SEB

To implement sub-units in SEB, we have exported the Mathematica expressions to C++ either manually or using CForm[expression]. The resulting expresions are in sub-unit header files in the seb/Subunits folder, where each header file is a specific sub-unit geometry. We also generate Guinier expansions of all scattering expressions to obtain size expressions for $\langle Rg^2 \rangle$ for the form factor, and $\sigma\langle R^2 \rangle$ for form factor amplitudes and phase factors. The size expressions are also exported to the C++ code. The SubUnit->ValidateDefinedTerms() method checks that all scattering terms and size terms are defined for the reference points combinations for a sub-unit.

Validation of Mathematical Correctness

Finally, to ensure that the scattering terms not only exist but are also mathematically correct, we have taken the following steps:

  1. Generation of Theoretical Scattering Data: Using Mathematica, we have created tabulated theory scattering curves for each scattering expression. This data, devoid of statistical sampling errors, can be found in the Examples/Validate subfolders.
  2. Numerical Evaluation and Comparison: Each scattering expression has been numerically evaluated at the same q-values as those used in the Mathematica-generated curves. We then compared the results from these numerical evaluations with the theoretical data. To ensure precision, we've set a tolerance level of $10^{-4}$ for the systematic error on the evaluation of the special functions. Scattering expressions showing deviations larger than this tolerance are flagged for review and potential correction.

By following these steps, we aim to guarantee that our mathematical formulations in SEB are not only theoretically sound but also practically applicable and accurate.

Checking Guinier Expansions

To check the Guinier expansions e.g. of a form factor amplitude, we predict the scattering from the Guinier expansion $A_{\text{Guinier}}(q)= 1- q^2 \sigma \langle R^2\rangle/6$, where an size expression for $\sigma \langle R^2 \rangle$ is hard-coded for each reference point. Where the second term is $<0.01$ we compare $A_\text{Guinier}(q)$ to the scattering data generated by Mathematica. These should also match within the accuracy of a tolerance, that again we choose as $10^{-4}$. Size expressions with larger deviations are flagged as bugs that needs to be fixed.

Additional Checks with GiNaC

For some of the sub-unit expressions but not all, we can also use GiNaC to expand the scattering terms directly as a Taylor series around $q=0$. That automatically generates the size expressions. In that case we perform a term-by-term comparison with the 1,0, $2 \langle Rg^2 \rangle$ for form factors or 1, 0, $\sigma\langle R^2 \rangle$ for form factor amplitudes and phase factors to check that the expressions match. This does not work for special functions, where GiNaC does not know the Series expansions. The comparison also fails for expressions that are sufficiently complicated so even though $A==B$ GiNaC is not able to simplify $A-B$ to zero and hence prove their identity.

Symbolic Expression Abstraction Layer

SEB now includes a symbolic expression abstraction layer with a portable C++ backend, optional GiNaC support in C++, and SymPy conversion in Python. See docs/symbolic-backends.md for the backend model.

Using GiNaC in C++

GiNaC is an optional C++ symbolic backend. To explicitly initialize it in a GiNaC-enabled build:

#include "SEB.hpp"
#include "GiNaCSymbolic.hpp"

int main() {
    // Initialize the SymbolicFactory with GiNaC
    SymbolicFactory::setInstance(new GiNaCSymbolic());

    // Use SEB as normal
    World w("World");
    // ...
}

Using SymPy in Python

The Python bindings (pySEB) use SymPy for symbolic computations. You can use pySEB with SymPy as follows:

import pyseb
import sympy

# Create a world
world = pyseb.World("World")

# Add a diblock copolymer
world.Add("diblock", "diblock")

# Get the form factor expression
form_factor = world.FormFactor("diblock")

# Print the expression
print(form_factor)

# Convert to LaTeX
latex_expr = sympy.latex(form_factor.expr)
print(latex_expr)

Using SEB in your own C++ Code

To use SEB you can either 1) develop code in the repository work/ folder or 2) develop code anywhere on your computer. Option 1 allows you to reuse the SEB compilation infrastructure and no installation of SEB is required. Option 2 requires the user to manually compile the code specifying where SEB header files and library is located.

Example source code

To derive the scattering for a diblock copolymer created by linking two Gaussian polymer models end-to-end, we do

#include "SEB.hpp"

int main()
{
    // Define world
    World w;

    // Add a single polymer, named 'poly1'
    GraphID g = w.Add("GaussianPolymer", "poly1");

    // Add a second polymer, named 'poly2'. Poly2's end1 is linked to poly1's end2 forming a diblock copolymer
    w.Link("GaussianPolymer", "poly2.end1", "poly1.end2");

    // Wrap the g structure naming it "diblockcopolymer"
    GraphID g2 = w.Add(g, "diblockcopolymer");

    // Request the symbolic expression for the form factor of this structure
    ex formFactor=w.FormFactor("diblockcopolymer");

    // Print out form factor expression
    cout << formFactor << endl;

    // Request LaTeX formatted output
    cout << latex;

    // Print out LaTeX expression for form factor
    cout << formFactor << endl;
}

The output is

2*(beta_poly1^2+beta_poly2^2+2*beta_poly2*beta_poly1)^(-1)*(beta_poly2^2*Rg_poly2^(-4)*q^(-4)*(-1+exp(-Rg_poly2^2*q^2)+Rg_poly2^2*q^2)+q^(-4)*(-1+q^2*Rg_poly1^2+exp(-q^2*Rg_poly1^2))*Rg_poly1^(-4)*beta_poly1^2+beta_poly2*Rg_poly2^(-2)*q^(-4)*Rg_poly1^(-2)*(-1+exp(-Rg_poly2^2*q^2))*beta_poly1*(-1+exp(-q^2*Rg_poly1^2)))

2 \frac{\frac{ \beta_{poly2}^{2} {(-1+\exp(- R_{g_{poly2}}^{2} q^{2})+ R_{g_{poly2}}^{2} q^{2})}}{ R_{g_{poly2}}^{4} q^{4}}+\frac{ {(-1+ q^{2} R_{g_{poly1}}^{2}+\exp(- q^{2} R_{g_{poly1}}^{2}))} \beta_{poly1}^{2}}{ q^{4} R_{g_{poly1}}^{4}}+\frac{ \beta_{poly2} {(-1+\exp(- R_{g_{poly2}}^{2} q^{2}))} \beta_{poly1} {(-1+\exp(- q^{2} R_{g_{poly1}}^{2}))}}{ R_{g_{poly2}}^{2} q^{4} R_{g_{poly1}}^{2}}}{\beta_{poly1}^{2}+\beta_{poly2}^{2}+2  \beta_{poly2} \beta_{poly1}}

where the top line is the symbolic expression in the default format, and the bottom expression is formatted according to LaTeX. Rendinger the equation in LaTeX we get the following

image

Again we can interpret the physical origin of the three terms in this expression. The terms in the numerator are 1) the Debye form factor of poly2, 2) the Debye form factor of poly1, and 3) the interference contribution between scatterers on poly1 and scatterers on poly2. The numerator is the total excess scattering length squared which is given by $(\beta_{poly1}+\beta_{poly2})^2$.

Compiling

To compile the code depends on where your code is located

work folder

make work

Running this command in the repository root will compile and link user C++ code in the work/ folder using the SEB compile infrastructure. The resulting executable is placed in work/.

Elsewhere

Assuming your code is in code.cpp then you can compile and link your code manually with

c++ -O2 -c -IFOLDER/pySEB/seb -IFOLDER/pySEB/seb-symbolic code.cpp
c++  code.o  -lseb -lseb-symbolic -lgsl -lgslcblas -lm -lginac -LFOLDER/pySEB/build-ninja-ginac  -o myexecutable

where the user manually has to specify the location of the header files and libraries, where you should modify FOLDER to fit your local environment. Note its important the object file is specified before the libraries when compiling.

Contributing

SEB is Open Source and we wellcome contributions from users. Each time a new sub-unit or even just a new reference point is added to SEB the library of structures that can be generated by SEB grows exponentially. For adding code for new sub-units, please provide the code along with validation code following our protocol above or better. Ideally we would also like to include the mathematical derivation of the scattering expressions within SEB for future documentation.

Bibtex

@article{svaneborg2012formalism1,
  title={A formalism for scattering of complex composite structures. {I}. {A}pplications to branched structures of asymmetric sub-units},
  author={Svaneborg, Carsten and Pedersen, Jan Skov},
  journal={J. Chem. Phys.},
  volume={136},
  number={10},
  pages={104105},
  year={2012},
  publisher={AIP Publishing},
  doi={10.1063/1.3682778},
  url={http://doi.org/10.1063/1.3682778}
}

@article{svaneborg2012formalism2,
  title={A formalism for scattering of complex composite structures. {II}. {D}istributed reference points},
  author={Svaneborg, Carsten and Pedersen, Jan Skov},
  journal={J. Chem. Phys.},
  volume={136},
  pages={154907},
  year={2012},
  publisher={AIP Publishing},
  doi={10.1063/1.3701737},
  url={http://doi.org/10.1063/1.3701737}
}

@article{Jarrett2024SEB,
  title={{S}{E}{B}: a computational tool for symbolic derivation of the small-angle scattering from complex composite structures},
  author={Jarrett, Tobias William Jensen   and Svaneborg, Carsten}
  journal={J. Appl. Crystallogr.},
  volume={57},
  pages={587},
  year={2024},
  publisher={IUCL},
  doi={10.1107/S1600576724001729},
  url={http://doi.org/10.1107/S1600576724001729}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyseb-0.1.0.tar.gz (6.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyseb-0.1.0-cp312-cp312-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.12Windows x86-64

pyseb-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyseb-0.1.0-cp312-cp312-macosx_15_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyseb-0.1.0-cp312-cp312-macosx_14_0_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.12macOS 14.0+ x86-64

pyseb-0.1.0-cp311-cp311-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.11Windows x86-64

pyseb-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyseb-0.1.0-cp311-cp311-macosx_15_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyseb-0.1.0-cp311-cp311-macosx_14_0_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 14.0+ x86-64

pyseb-0.1.0-cp310-cp310-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.10Windows x86-64

pyseb-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyseb-0.1.0-cp310-cp310-macosx_15_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyseb-0.1.0-cp310-cp310-macosx_14_0_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 14.0+ x86-64

pyseb-0.1.0-cp39-cp39-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.9Windows x86-64

pyseb-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyseb-0.1.0-cp39-cp39-macosx_15_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

pyseb-0.1.0-cp39-cp39-macosx_14_0_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.9macOS 14.0+ x86-64

File details

Details for the file pyseb-0.1.0.tar.gz.

File metadata

  • Download URL: pyseb-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 389e276b1afedc097bb8c344c2cf6dce093486ed6dc8f7dd6a03827c9e0c6ae8
MD5 85b2bc5b4ff3860dede2198d471e5ea9
BLAKE2b-256 993961f353759429ed205352338310fe8af2504d1e915865fc4f65fc8e26d7f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0.tar.gz:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyseb-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7f6927a4454b0d9968813f5c877474d294e7f90c1d799adc8d0a6bedc14be0db
MD5 be758881ff29bd5a1e57cbd462d3b127
BLAKE2b-256 ddfb8ba23383d606192aba7a50cc98ffd29535486f5d6b31949b82fd0fe29a2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6a05e2405e225840ebc6572c34706a127015899dad1f494cdd53cce1da1958f5
MD5 1544f561c5551c05c528f348da96a2b5
BLAKE2b-256 4fb3ce71919093bd2c1a5f99a2ccae342eaeef0842619fb1e890764201b94461

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1c4e98a9d77cd1d53dd05bac244345318608dd2d1471882ffcde3abcf959ca11
MD5 1722fdfa2bf4e222d74fbf4bf416bd2a
BLAKE2b-256 c962b9d54d91b3f0f9f72a18579f11eab04461e3f5fa931fea0f46d99221812a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp312-cp312-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp312-cp312-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 70a974bf7f328c2d2c23cff3e1fbce43df5d0c82494f5e70c98e0b9f169956f6
MD5 bb54b439f5a994c4e3e447a2000beddf
BLAKE2b-256 d8b57922827ef79b38735d052f723f379f8627c003d78a645da5038b85dc8847

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp312-cp312-macosx_14_0_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyseb-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 911ddafcbc92f3cd7747d7094a8333309f4d708cdd1d24c82b7766247c7c9aeb
MD5 4b44f71c7221dc3eec7afd218f5b1f9e
BLAKE2b-256 1250949c4ff95e7b7abd2de24160c46ecaf89a0c16168459dfbe9e7b4f52cf81

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c5589d7203e1090931a259a055120722a66fc403d070a8894d93d26d54c9707c
MD5 c22286bc6de56988fad7da3640e7adda
BLAKE2b-256 e8d3d1f1b92fd68ea7ebfb4132535f66bec854da4869055366426d105a823f31

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e2d4fbc9d5d6d03d9a41faa3eb75e6964f115142bb1e13fe81d3192221b8fe79
MD5 c13466bc13a96e6a3f8f3c3d17dff57d
BLAKE2b-256 28c5e0097c8227b714cabf8f9d95b9feaba9d3c2eb46ffa0135c1d818a3bdd4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp311-cp311-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 3d4ebcbe10b81762ee2b141b62c963ad99d5ad98cb73417f7bed7f33fc4f02d3
MD5 3632e5a2c7af5776c20a691d11481be1
BLAKE2b-256 e6302e92589b66f4cd50bd7313266e05c186c8bd5f8ace7dfbd6ac7dba7d03c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp311-cp311-macosx_14_0_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyseb-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1fb2f4f2a4f580357f132ec6449c612585430f4ba8f76ff08511fc11c316bdc2
MD5 63ed89b5910ea5682c249a9bf30516f4
BLAKE2b-256 1d00139f4532b5ad3213b29ba2eb2cd1de8ea8f0161f5100ccf630a09a1ae51b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68fd757f2e720a0834f547a7cb6bb32a2ca20bf4dcd122b85b9c962662dd41fa
MD5 556f06113a1c6055c87f2f0f2b853fb5
BLAKE2b-256 ebafbffc7f2ed84ced7a85bd95dff88f35d0dbe448da15809bf7caf291b672a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a9ecc0f99371d5efb44132b207dc02ff3dda774ab20399fbe634d8f893e904b7
MD5 4617e0a7af98e2c02700422dd7ef6c5f
BLAKE2b-256 71c2633966cc5cce8ff3a2027af87010584efcb98012fdba03ca890fb31ce155

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp310-cp310-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp310-cp310-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 987dcd4b6953dd6ec4f88f3b2cfccacca7f0af88690f908611e0800d6570dc97
MD5 25b0b1135141e95cbf5d4cfcb78c3641
BLAKE2b-256 de51eaf4d1ec272d040f2ad8b3311e7ca4bb2298643d0992c5e4d0ba8e4901fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp310-cp310-macosx_14_0_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyseb-0.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3898ce4a977d55c06f22590d5b44b8c1f747d6a26b66cb229e46b1f54c7ec01a
MD5 a082a14e4d1d97e2eb9b2cb2fa989fa4
BLAKE2b-256 032414b08fe50c9b234a325dcff4e64ca1e6e854eab6051d327b518e4290a087

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp39-cp39-win_amd64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 384753e7048cba591cb2d948bfd663bded06fa850b41e106eeed5f96529c9b01
MD5 4638845051aa7a94403621c1832a7f9e
BLAKE2b-256 646580e0b90a23d37aa0d24c6aec41338ffb865a2758f5c8b3a932f15ae90fa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pyseb-0.1.0-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyseb-0.1.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f9c5fb1a4be26f76028f675c57c32988b56f2362bef2899474b67affcbd14b14
MD5 91d88f70255fb96bdddab7a002d2cde0
BLAKE2b-256 7ead9b25e4271c2f4b162aec709e1efa7b57a8079c388f5c4472d0c9f23ef1ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp39-cp39-macosx_15_0_arm64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyseb-0.1.0-cp39-cp39-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for pyseb-0.1.0-cp39-cp39-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 c763384faeeda5926f5d249f627e81fe118e22d7c415f07e146d1271b60f58ef
MD5 47a0f73e5da5f1abdc7362b765396807
BLAKE2b-256 56ed0783cecbb1b4876aab3fdb75db8dc4a9ca3697d31bfcf5586d8670d09a9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyseb-0.1.0-cp39-cp39-macosx_14_0_x86_64.whl:

Publisher: release.yml on Tobionecenobi/pySEB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page