[8c8cb05] | 1 | #if !defined(o_h) |
---|
| 2 | #define pearl_necklace_h |
---|
[0ba3b08] | 3 | #include "parameters.hh" |
---|
[8c8cb05] | 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for sphere parameters |
---|
| 7 | */ |
---|
[0ba3b08] | 8 | //[PYTHONCLASS] = PearlNecklaceModel |
---|
| 9 | //[DISP_PARAMS] = radius, edge_separation |
---|
| 10 | //[DESCRIPTION] =<text>Calculate form factor for Pearl Necklace Model |
---|
[8c8cb05] | 11 | // [Macromol. Symp. 2004, 211, 25-42] |
---|
[0ba3b08] | 12 | // Parameters: |
---|
| 13 | // background:background |
---|
| 14 | // scale: scale factor |
---|
| 15 | // sld_pearl: the SLD of the pearl spheres |
---|
| 16 | // sld_string: the SLD of the strings |
---|
| 17 | // sld_solv: the SLD of the solvent |
---|
| 18 | // num_pearls: number of the pearls |
---|
| 19 | // radius: the radius of a pearl |
---|
| 20 | // edge_separation: the length of string segment; surface to surface |
---|
| 21 | // thick_string: thickness (ie, diameter) of the string |
---|
| 22 | // </text> |
---|
| 23 | //[FIXED]= <text>radius.width; edge_separation.width</text> |
---|
| 24 | //[NON_FITTABLE_PARAMS]= <text></text> |
---|
| 25 | //[ORIENTATION_PARAMS]= <text> </text> |
---|
[8c8cb05] | 26 | |
---|
| 27 | typedef struct { |
---|
[0ba3b08] | 28 | /// Scale factor |
---|
| 29 | // [DEFAULT]=scale= 1.0 |
---|
| 30 | double scale; |
---|
| 31 | /// radius [A] |
---|
| 32 | // [DEFAULT]=radius=80.0 [A] |
---|
| 33 | double radius; |
---|
| 34 | /// edge_separation |
---|
| 35 | // [DEFAULT]=edge_separation= 350 [A] |
---|
| 36 | double edge_separation; |
---|
| 37 | /// thick_string [A] |
---|
| 38 | // [DEFAULT]=thick_string= 2.5 [A] |
---|
| 39 | double thick_string; |
---|
| 40 | /// num_pearls |
---|
| 41 | // [DEFAULT]=num_pearls= 3 |
---|
| 42 | double num_pearls; |
---|
| 43 | /// sld_pearl |
---|
| 44 | // [DEFAULT]=sld_pearl= 1.0e-06 [1/A^(2)] |
---|
| 45 | double sld_pearl; |
---|
| 46 | /// sld_string |
---|
| 47 | // [DEFAULT]=sld_string= 1.0e-06 [1/A^(2)] |
---|
| 48 | double sld_string; |
---|
| 49 | /// sld_solv |
---|
| 50 | // [DEFAULT]=sld_solv= 6.3e-06 [1/A^(2)] |
---|
| 51 | double sld_solv; |
---|
| 52 | /// Background |
---|
| 53 | // [DEFAULT]=background=0 |
---|
| 54 | double background; |
---|
[8c8cb05] | 55 | |
---|
| 56 | }PeralNecklaceParameters; |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | |
---|
[0ba3b08] | 60 | class PearlNecklaceModel{ |
---|
| 61 | public: |
---|
| 62 | // Model parameters |
---|
| 63 | /// Scale factor |
---|
| 64 | // [DEFAULT]=scale= 1.0 |
---|
| 65 | Parameter scale; |
---|
| 66 | /// radius [A] |
---|
| 67 | // [DEFAULT]=radius=80.0 [A] |
---|
| 68 | Parameter radius; |
---|
| 69 | /// edge_separation |
---|
| 70 | // [DEFAULT]=edge_separation= 350 [A] |
---|
| 71 | Parameter edge_separation; |
---|
| 72 | /// thick_string [A] |
---|
| 73 | // [DEFAULT]=thick_string= 2.5 [A] |
---|
| 74 | Parameter thick_string; |
---|
| 75 | /// num_pearls |
---|
| 76 | // [DEFAULT]=num_pearls= 3 |
---|
| 77 | Parameter num_pearls; |
---|
| 78 | /// sld_pearl |
---|
| 79 | // [DEFAULT]=sld_pearl= 1.0e-06 [1/A^(2)] |
---|
| 80 | Parameter sld_pearl; |
---|
| 81 | /// sld_string |
---|
| 82 | // [DEFAULT]=sld_string= 1.0e-06 [1/A^(2)] |
---|
| 83 | Parameter sld_string; |
---|
| 84 | /// sld_solv |
---|
| 85 | // [DEFAULT]=sld_solv= 6.3e-06 [1/A^(2)] |
---|
| 86 | Parameter sld_solv; |
---|
| 87 | /// Background |
---|
| 88 | // [DEFAULT]=background=0 |
---|
| 89 | Parameter background; |
---|
| 90 | |
---|
| 91 | // Constructor |
---|
| 92 | PearlNecklaceModel(); |
---|
| 93 | |
---|
| 94 | // Operators to get I(Q) |
---|
| 95 | double operator()(double q); |
---|
| 96 | double operator()(double qx, double qy); |
---|
| 97 | double calculate_ER(); |
---|
| 98 | double evaluate_rphi(double q, double phi); |
---|
| 99 | }; |
---|
[8c8cb05] | 100 | |
---|
| 101 | #endif |
---|