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{\phi}{V(R_N)} F^2(q) + \text{background} |
---|
22 | |
---|
23 | where |
---|
24 | |
---|
25 | .. math:: |
---|
26 | F(q) = (\rho_\text{shell}-\rho_\text{solv}) \sum_{i=1}^{N} \left[ |
---|
27 | 3V(r_i)\frac{\sin(qr_i) - qr_i\cos(qr_i)}{(qr_i)^3} |
---|
28 | - 3V(R_i)\frac{\sin(qR_i) - qR_i\cos(qR_i)}{(qR_i)^3} |
---|
29 | \right] |
---|
30 | |
---|
31 | for |
---|
32 | |
---|
33 | .. math:: |
---|
34 | |
---|
35 | r_i &= r_c + (i-1)(t_s + t_w) && \text{ solvent radius before shell } i \\ |
---|
36 | R_i &= r_i + t_s && \text{ shell radius for shell } i |
---|
37 | |
---|
38 | $\phi$ is the volume fraction of particles, $V(r)$ is the volume of a sphere |
---|
39 | of radius $r$, $r_c$ is the radius of the core, $t_s$ is the thickness of |
---|
40 | the shell, $t_w$ is the thickness of the solvent layer between the shells, |
---|
41 | $\rho_\text{shell}$ is the scattering length density of a shell, and |
---|
42 | $\rho_\text{solv}$ is the scattering length density of the solvent. |
---|
43 | |
---|
44 | The outer-most shell radius $R_N$ is used as the effective radius |
---|
45 | for $P(Q)$ when $P(Q) * S(Q)$ is applied. |
---|
46 | |
---|
47 | |
---|
48 | The 2D scattering intensity is the same as 1D, regardless of the orientation |
---|
49 | of the q vector which is defined as: |
---|
50 | |
---|
51 | .. math:: |
---|
52 | |
---|
53 | q = \sqrt{q_x^2 + q_y^2} |
---|
54 | |
---|
55 | For information about polarised and magnetic scattering, see |
---|
56 | the :ref:`magnetism` documentation. |
---|
57 | |
---|
58 | This code is based on the form factor calculations implemented in the NIST |
---|
59 | Center for Neutron Research provided c-library (Kline, 2006). |
---|
60 | |
---|
61 | References |
---|
62 | ---------- |
---|
63 | |
---|
64 | B Cabane, *Small Angle Scattering Methods*, |
---|
65 | in *Surfactant Solutions: New Methods of Investigation*, |
---|
66 | Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, |
---|
67 | New York, (1987). |
---|
68 | |
---|
69 | **Author:** NIST IGOR/DANSE **on:** pre 2010 |
---|
70 | |
---|
71 | **Last Modified by:** Piotr Rozyczko **on:** Feb 24, 2016 |
---|
72 | |
---|
73 | **Last Reviewed by:** Paul Butler **on:** March 20, 2016 |
---|
74 | |
---|
75 | """ |
---|
76 | |
---|
77 | from numpy import inf |
---|
78 | |
---|
79 | name = "multilayer_vesicle" |
---|
80 | title = "P(Q) for a Multi-lamellar vesicle" |
---|
81 | description = """ |
---|
82 | multilayer_vesicle model parameters; |
---|
83 | scale : scale factor for abs intensity if needed else 1.0 |
---|
84 | volfraction: volume fraction |
---|
85 | radius : Core radius of the multishell |
---|
86 | thick_shell: shell thickness |
---|
87 | thick_solvent: water thickness |
---|
88 | sld_solvent: solvent scattering length density |
---|
89 | sld: shell scattering length density |
---|
90 | n_shells:number of "shell plus solvent" layer pairs |
---|
91 | background: incoherent background |
---|
92 | """ |
---|
93 | category = "shape:sphere" |
---|
94 | |
---|
95 | # pylint: disable=bad-whitespace, line-too-long |
---|
96 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
97 | parameters = [ |
---|
98 | ["volfraction", "", 0.05, [0.0, 1], "", "volume fraction of vesicles"], |
---|
99 | ["radius", "Ang", 60.0, [0.0, inf], "volume", "radius of solvent filled core"], |
---|
100 | ["thick_shell", "Ang", 10.0, [0.0, inf], "volume", "thickness of one shell"], |
---|
101 | ["thick_solvent", "Ang", 10.0, [0.0, inf], "volume", "solvent thickness between shells"], |
---|
102 | ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "sld", "solvent scattering length density"], |
---|
103 | ["sld", "1e-6/Ang^2", 0.4, [-inf, inf], "sld", "Shell scattering length density"], |
---|
104 | ["n_shells", "", 2.0, [1.0, inf], "volume", "Number of shell plus solvent layer pairs"], |
---|
105 | ] |
---|
106 | # pylint: enable=bad-whitespace, line-too-long |
---|
107 | |
---|
108 | # TODO: proposed syntax for specifying which parameters can be polydisperse |
---|
109 | #polydispersity = ["radius", "thick_shell"] |
---|
110 | |
---|
111 | source = ["lib/sas_3j1x_x.c", "multilayer_vesicle.c"] |
---|
112 | |
---|
113 | def ER(radius, thick_shell, thick_solvent, n_shells): |
---|
114 | n_shells = int(n_shells+0.5) |
---|
115 | return radius + n_shells * (thick_shell + thick_solvent) - thick_solvent |
---|
116 | |
---|
117 | demo = dict(scale=1, background=0, |
---|
118 | volfraction=0.05, |
---|
119 | radius=60.0, |
---|
120 | thick_shell=10.0, |
---|
121 | thick_solvent=10.0, |
---|
122 | sld_solvent=6.4, |
---|
123 | sld=0.4, |
---|
124 | n_shells=2.0) |
---|
125 | |
---|
126 | tests = [ |
---|
127 | # Accuracy tests based on content in test/utest_other_models.py |
---|
128 | [{'radius': 60.0, |
---|
129 | 'thick_shell': 10.0, |
---|
130 | 'thick_solvent': 10.0, |
---|
131 | 'sld_solvent': 6.4, |
---|
132 | 'sld': 0.4, |
---|
133 | 'n_shells': 2.0, |
---|
134 | 'scale': 1.0, |
---|
135 | 'background': 0.001, |
---|
136 | }, 0.001, 122.1405], |
---|
137 | |
---|
138 | [{'volfraction': 1.0, |
---|
139 | 'radius': 60.0, |
---|
140 | 'thick_shell': 10.0, |
---|
141 | 'thick_solvent': 10.0, |
---|
142 | 'sld_solvent': 6.4, |
---|
143 | 'sld': 0.4, |
---|
144 | 'n_shells': 2.0, |
---|
145 | 'scale': 1.0, |
---|
146 | 'background': 0.001, |
---|
147 | }, (0.001, 0.30903), 1.61873], |
---|
148 | ] |
---|