Debian Codegraph @

source/core/hist/intensity_calculator/pepsi/CompositeDistanceHistogramPepsi.cpp

raw
1 // SPDX-License-Identifier: LGPL-3.0-or-later
2 // Author: Kristian Lytje
3
4 #include <hist/intensity_calculator/pepsi/CompositeDistanceHistogramPepsi.h>
5
6 using namespace ausaxs;
7
8 double hist::CompositeDistanceHistogramPepsi::exv_factor(double, double cx) {
9 // Approximation of the G(q) factor from the Pepsi-SAXS paper, doi: 10.1107/S2059798317005745
10 // This is just a Maclaurin expansion of the original expression, containing only the linear terms and no q-dependence
11 // double magic_constant = 1/(4*constants::pi*constants::pi);
12 double magic_constant = 1;
13 double rm = 1.64;
14 double c = 2*std::numbers::pi*constexpr_math::pow(4*std::numbers::pi/3, 2./3)*rm*rm*magic_constant;
15 return (1 + cx*(3-c));
16 }
17
18 double hist::CompositeDistanceHistogramPepsi::exv_factor(double q) const {
19 return exv_factor(q, free_params.cx);
20 }
21
22 Limit hist::CompositeDistanceHistogramPepsi::get_excluded_volume_scaling_factor_limits() const {
23 return {-0.05, 0.05};
24 }