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