## Task #2442

### Port gmx saxs and gmx sans to c++

**Description**

In order to make better use of experimental data in gromacs we should have a better forward model of small angle x-ray and neutron scattering. A number of features could be useful to such calculations.

- Real Space calculation of radius of gyration and/or scattering
- Fourier space calculation of scattering
- Convolutions for e.g. polychromaticity and other experimental details
- Ability to calculate excess scattering by subtracting a solvent scattering curve
- Perhaps eventually to also take raw counts from detectors as an input

Since this is being implemented in the trajectory analysis framework, the user should be able to provide a selection, but there may also be some utility in having a generic selection of e.g. protein and solvent within a certain radius of protein.

This tool may eventually need to be used as an input for a force provider to be useful in the context of data steered MD so parallelization could be more important than in the normal analysis tools.

One final consideration (or perhaps the first consideration) is that a lot of these tools already exist e.g. in crysol/cryson so the question of what is a reasonable amount of work to put into this is a valid one.

**Related issues**

### History

#### #1 Updated by Berk Hess almost 2 years ago

**Tracker**changed from*Feature*to*Task*

#### #2 Updated by Joe Jordan almost 2 years ago

**Related to***Task #2461: Expose more info from t_atom to trajectory analysis framework*added

#### #3 Updated by Alexey Shvetsov over 1 year ago

I have some implementation of

4. Ability to calculate excess scattering by subtracting a solvent scattering curve (this one somehow not that easy as it can be seen, but tested against experimental data)

2. Fourier space calculation of scattering (i use it for 4).