1 | #if !defined(barbell_h) |
---|
2 | #define barbell_h |
---|
3 | |
---|
4 | /** |
---|
5 | * Structure definition for BarBell parameters |
---|
6 | */ |
---|
7 | //[PYTHONCLASS] = BarBellModel |
---|
8 | //[DISP_PARAMS] = rad_bar,len_bar,rad_bell,phi, theta |
---|
9 | //[DESCRIPTION] =<text>Calculates the scattering from a barbell-shaped cylinder. That is |
---|
10 | // a sphereocylinder with spherical end caps |
---|
11 | // that have a radius larger than that of |
---|
12 | // the cylinder and the center of the end cap |
---|
13 | // radius lies outside of the cylinder. |
---|
14 | // Note: As the length of cylinder(bar) -->0, |
---|
15 | // it becomes a dumbbell. |
---|
16 | // And when rad_bar = rad_bell, |
---|
17 | // it is a spherocylinder. |
---|
18 | // It must be that rad_bar <(=) rad_bell. |
---|
19 | // [Parameters]; |
---|
20 | // scale: volume fraction of spheres, |
---|
21 | // background:incoherent background, |
---|
22 | // rad_bar: radius of the cylindrical bar, |
---|
23 | // len_bar: length of the cylindrical bar, |
---|
24 | // rad_bell: radius of the spherical bell, |
---|
25 | // sld_barbell: SLD of the barbell, |
---|
26 | // sld_solv: SLD of the solvent. |
---|
27 | // </text> |
---|
28 | //[FIXED]= rad_bar.width;len_bar;rad_bell;phi.width; theta.width |
---|
29 | //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text> |
---|
30 | |
---|
31 | typedef struct { |
---|
32 | /// Scale factor |
---|
33 | // [DEFAULT]=scale= 1.0 |
---|
34 | double scale; |
---|
35 | |
---|
36 | /// rad_bar [A] |
---|
37 | // [DEFAULT]=rad_bar=20.0 [A] |
---|
38 | double rad_bar; |
---|
39 | |
---|
40 | /// length of the bar [A] |
---|
41 | // [DEFAULT]=len_bar=400.0 [A] |
---|
42 | double len_bar; |
---|
43 | |
---|
44 | /// Radius of sphere [A] |
---|
45 | // [DEFAULT]=rad_bell=40.0 [A] |
---|
46 | double rad_bell; |
---|
47 | |
---|
48 | /// sld_barbell [1/A^(2)] |
---|
49 | // [DEFAULT]=sld_barbell= 1.0e-6 [1/A^(2)] |
---|
50 | double sld_barbell; |
---|
51 | |
---|
52 | /// sld_solv [1/A^(2)] |
---|
53 | // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)] |
---|
54 | double sld_solv; |
---|
55 | |
---|
56 | /// Incoherent Background [1/cm] |
---|
57 | // [DEFAULT]=background=0.0 [1/cm] |
---|
58 | double background; |
---|
59 | |
---|
60 | /// Angle of the main axis against z-axis in detector plane [rad] |
---|
61 | // [DEFAULT]=theta=0.0 [rad] |
---|
62 | double theta; |
---|
63 | /// Azimuthal angle around z-axis in detector plane [rad] |
---|
64 | // [DEFAULT]=phi=0.0 [rad] |
---|
65 | double phi; |
---|
66 | |
---|
67 | } BarBellParameters; |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | /// 1D scattering function |
---|
72 | double barbell_analytical_1D(BarBellParameters *pars, double q); |
---|
73 | |
---|
74 | /// 2D scattering function |
---|
75 | double barbell_analytical_2D(BarBellParameters *pars, double q, double phi); |
---|
76 | double barbell_analytical_2DXY(BarBellParameters *pars, double qx, double qy); |
---|
77 | double barbell_analytical_2D_scaled(BarBellParameters *pars, double q, double q_x, double q_y); |
---|
78 | |
---|
79 | #endif |
---|