1 | r""" |
---|
2 | Definition |
---|
3 | ---------- |
---|
4 | |
---|
5 | This model is a trivial extension of the core_shell_sphere function to include |
---|
6 | *N* shells where the core is filled with solvent and the shells are interleaved |
---|
7 | with layers of solvent. For *N = 1*, this returns the same as the vesicle model, |
---|
8 | except for the normalisation, which here is to outermost volume. |
---|
9 | The shell thicknessess and SLD are constant for all shells as expected for |
---|
10 | a multilayer vesicle. |
---|
11 | |
---|
12 | .. figure:: img/multi_shell_geometry.jpg |
---|
13 | |
---|
14 | Geometry of the multilayer_vesicle model. |
---|
15 | |
---|
16 | See the :ref:`core-shell-sphere` model for more documentation. |
---|
17 | |
---|
18 | The 1D scattering intensity is calculated in the following way (Guinier, 1955) |
---|
19 | |
---|
20 | .. math:: |
---|
21 | P(q) = \text{scale} \cdot \frac{V_f}{V_t} F^2(q) + \text{background} |
---|
22 | |
---|
23 | for |
---|
24 | |
---|
25 | .. math:: |
---|
26 | F(q) = (\rho_\text{shell}-\rho_\text{solv}) \sum_{i=1}^{n_\text{pairs}} |
---|
27 | \left[ |
---|
28 | 3V(R_i)\frac{\sin(qR_i)-qR_i\cos(qR_i)}{(qR_i)^3} \\ |
---|
29 | - 3V(R_i+t_s)\frac{\sin(q(R_i+t_s))-q(R_i+t_s)\cos(q(R_i+t_s))}{(q(R_i+t_s))^3} |
---|
30 | \right] |
---|
31 | |
---|
32 | and |
---|
33 | |
---|
34 | .. math:: |
---|
35 | R_i = r_c + (i-1)(t_s + t_w) |
---|
36 | |
---|
37 | where $V_f$ is the volume fraction of particles, $V_t$ is the volume of the |
---|
38 | whole particle, $V(r)$ is the volume of a sphere of radius $r$, $r_c$ is the |
---|
39 | radius of the core, $\rho_\text{shell}$ is the scattering length density of a |
---|
40 | shell, $\rho_\text{solv}$ is the scattering length density of the solvent. |
---|
41 | |
---|
42 | The outer most radius, $r_o = R_n + t_s$, is used for both the volume fraction |
---|
43 | normalization and for the effective radius for *S(Q)* when $P(Q) * S(Q)$ |
---|
44 | is applied. |
---|
45 | |
---|
46 | The 2D scattering intensity is the same as 1D, regardless of the orientation |
---|
47 | of the q vector which is defined as: |
---|
48 | |
---|
49 | .. math:: |
---|
50 | |
---|
51 | q = \sqrt{q_x^2 + q_y^2} |
---|
52 | |
---|
53 | For information about polarised and magnetic scattering, see |
---|
54 | the :ref:`magnetism` documentation. |
---|
55 | |
---|
56 | This code is based on the form factor calculations implemented in the NIST |
---|
57 | Center for Neutron Research provided c-library (Kline, 2006). |
---|
58 | |
---|
59 | References |
---|
60 | ---------- |
---|
61 | |
---|
62 | B Cabane, *Small Angle Scattering Methods*, |
---|
63 | in *Surfactant Solutions: New Methods of Investigation*, |
---|
64 | Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, |
---|
65 | New York, (1987). |
---|
66 | |
---|
67 | **Author:** NIST IGOR/DANSE **on:** pre 2010 |
---|
68 | |
---|
69 | **Last Modified by:** Piotr Rozyczko **on:** Feb 24, 2016 |
---|
70 | |
---|
71 | **Last Reviewed by:** Paul Butler **on:** March 20, 2016 |
---|
72 | |
---|
73 | """ |
---|
74 | |
---|
75 | from numpy import inf |
---|
76 | |
---|
77 | name = "multilayer_vesicle" |
---|
78 | title = "P(Q) for a Multi-lamellar vesicle" |
---|
79 | description = """ |
---|
80 | multilayer_vesicle model parameters; |
---|
81 | scale : scale factor for abs intensity if needed else 1.0 |
---|
82 | volfraction: volume fraction |
---|
83 | radius : Core radius of the multishell |
---|
84 | thick_shell: shell thickness |
---|
85 | thick_solvent: water thickness |
---|
86 | sld_solvent: solvent scattering length density |
---|
87 | sld: shell scattering length density |
---|
88 | n_pairs:number of "shell plus solvent" layer pairs |
---|
89 | background: incoherent background |
---|
90 | """ |
---|
91 | category = "shape:sphere" |
---|
92 | |
---|
93 | # pylint: disable=bad-whitespace, line-too-long |
---|
94 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
95 | parameters = [ |
---|
96 | ["volfraction", "", 0.05, [0.0, 1], "", "volume fraction of vesicles"], |
---|
97 | ["radius", "Ang", 60.0, [0.0, inf], "", "radius of solvent filled core"], |
---|
98 | ["thick_shell", "Ang", 10.0, [0.0, inf], "", "thickness of one shell"], |
---|
99 | ["thick_solvent", "Ang", 10.0, [0.0, inf], "", "solvent thickness between shells"], |
---|
100 | ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "sld", "solvent scattering length density"], |
---|
101 | ["sld", "1e-6/Ang^2", 0.4, [-inf, inf], "sld", "Shell scattering length density"], |
---|
102 | ["n_pairs", "", 2.0, [1.0, inf], "", "Number of shell plus solvent layer pairs"], |
---|
103 | ] |
---|
104 | # pylint: enable=bad-whitespace, line-too-long |
---|
105 | |
---|
106 | source = ["lib/sph_j1c.c", "multilayer_vesicle.c"] |
---|
107 | |
---|
108 | # TODO: the following line does nothing |
---|
109 | polydispersity = ["radius", "n_pairs"] |
---|
110 | |
---|
111 | demo = dict(scale=1, background=0, |
---|
112 | volfraction=0.05, |
---|
113 | radius=60.0, |
---|
114 | thick_shell=10.0, |
---|
115 | thick_solvent=10.0, |
---|
116 | sld_solvent=6.4, |
---|
117 | sld=0.4, |
---|
118 | n_pairs=2.0) |
---|
119 | |
---|
120 | tests = [ |
---|
121 | # Accuracy tests based on content in test/utest_other_models.py |
---|
122 | [{'radius': 60.0, |
---|
123 | 'thick_shell': 10.0, |
---|
124 | 'thick_solvent': 10.0, |
---|
125 | 'sld_solvent': 6.4, |
---|
126 | 'sld': 0.4, |
---|
127 | 'n_pairs': 2.0, |
---|
128 | 'scale': 1.0, |
---|
129 | 'background': 0.001, |
---|
130 | }, 0.001, 122.1405], |
---|
131 | |
---|
132 | [{'volfraction': 1.0, |
---|
133 | 'radius': 60.0, |
---|
134 | 'thick_shell': 10.0, |
---|
135 | 'thick_solvent': 10.0, |
---|
136 | 'sld_solvent': 6.4, |
---|
137 | 'sld': 0.4, |
---|
138 | 'n_pairs': 2.0, |
---|
139 | 'scale': 1.0, |
---|
140 | 'background': 0.001, |
---|
141 | }, (0.001, 0.30903), 1.61873], |
---|
142 | ] |
---|