SasView / sasview

Code for the SasView application.
BSD 3-Clause "New" or "Revised" License
51 stars 41 forks source link

Addition of new polyhedral models using the Wuttke formula #2084

Open jules-marcone opened 2 years ago

jules-marcone commented 2 years ago

When working with nanoparticles and using SAXS as a characterization method, it is really important to have a good model to obtain better fitting results. However, the current SasView model library lacks good models for some nanoparticle shapes when exiting the usual spherical shapes. Decahedrons, for example, may become very difficult to analyze properly.

Using the Wuttke formula (J. Appl. Cryst. (2021). 54, 580-587 - DOI), it is possible to calculate the form factor of any polyhedron by knowing the position of its vertices and the way they are connected to form the different faces. Two libraries created by Jochim Wuttke (LibHeinz and LibFormFactor) allow calculating this form factor for a given shape (with tunable parameters) and a given orientation.

Although the libformfactor itself does not cover a great number of shapes itself, it is possible with relative easiness to add shapes without much trouble.

The focus would be to add new shapes to this library (several have already been created, as can be seen here in files titled "cuboid", "tri" and "penta"), and link these shapes and calculations of the form factor to SasView. The main challenges will come from having to effectively link a calculation made by two libraries and calculating an average on all possible orientations to be able to use these models in SasView.

wpotrzebowski commented 2 years ago

On the technical level we are looking on exposing LibFormFactor library to python interface (via python binding).