-
Notifications
You must be signed in to change notification settings - Fork 47
Support for SAXS fitting #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support for SAXS fitting #3194
Conversation
…atic download in dev mode
|
Does periodictable have the formfactors needed by auSAXS? Could we add them if it doesn't? |
AUSAXS uses residue information to determine the number of hydrogens bound to every atom in the structure. With this, compound form factors (CH, CH2, NH, ...) can be used instead of the pure atomic ones (C, N, O, ..) for better accuracy. This can actually have a significant impact on the quality of the fit. I imagine such aggregated form factor tables are outside the scope of periodictable, which seems more focused towards individual atoms? |
|
Yeah, it is currently out of scope. |
|
In regards to your 'Comments and suggestions' header, I'd like to note that the issues around data structures are currently being addressed in the refactoring project, although its going to take some time before that project is ready. Specifically, each reader at the moment just has a |
Description
I have implemented support for performing SAXS fits through the AUSAXS library. Note that this requires a newer version of AUSAXS which must manually be moved to the
src/sas/sascalc/calculator/ausaxs/libdirectory, available from here: https://github.com/SasView/AUSAXS/releases/tag/v4I have refactored how SasView hooks into my library. I think this new approach is far superior, and is also easier to extend in the future. Due to this change, we will need extensive testing to ensure the existing SANS hook is still working as expected.
I also made some changes to the GenericScatteringCalculator GUI manager since my SAXS calculation need some additional data which was not previously available:
self.typeenum variable to the GenSAS object, with four possible values corresponding to the currently selected calculation model:I use this variable to check what calculations are supposed to be run, instead of relying on various combinations of existing variables, as was previously done.
Comments and suggestions
As part of this PR, I had to dig quite deep into the internals of this part of SasView. I have a few comments and suggestions for future improvements:
Todo
libausaxsmust now be included since there is no fallback for SAXS calculations.libausaxs?Future additions
This is a list of additional features which could be useful to do in a future PR:
Documentation
Significant documentation of this new feature is required. I will add this later.
Installers
This could potentially affect the installers since I'll have to change which version of AUSAXS is being shipped with SasView. Testing should be performed for each platform.
Note: All GH artifacts are currently broken due to using an older version of AUSAXS!