1 | # Note: model title and parameter table are inserted automatically |
---|
2 | r""" |
---|
3 | This model provides the scattering intensity, *I(q)*, for a lyotropic lamellar |
---|
4 | phase where a random distribution in solution are assumed. The SLD of the head |
---|
5 | region is taken to be different from the SLD of the tail region. |
---|
6 | |
---|
7 | *2.1.31.1. Definition* |
---|
8 | |
---|
9 | The scattering intensity *I(q)* is |
---|
10 | |
---|
11 | .. math:: |
---|
12 | |
---|
13 | I(Q) = 2\pi{P(Q) \over (2(|delta|\ H +|delta|\ T) Q^2) |
---|
14 | |
---|
15 | The form factor is |
---|
16 | |
---|
17 | .. image:: img/lamellarFFHG_.jpg |
---|
18 | |
---|
19 | where |delta|\ T = tail length (or *tail_length*), |delta|\ H = head thickness |
---|
20 | (or *h_thickness*), |drho|\ H = SLD(headgroup) - SLD(solvent), |
---|
21 | and |drho|\ T = SLD(tail) - SLD(solvent). |
---|
22 | |
---|
23 | The 2D scattering intensity is calculated in the same way as 1D, where |
---|
24 | the *q* vector is defined as |
---|
25 | |
---|
26 | .. math:: |
---|
27 | |
---|
28 | Q = \sqrt{Q_x^2 + Q_y^2} |
---|
29 | |
---|
30 | The returned value is in units of |cm^-1|, on absolute scale. In the |
---|
31 | parameters, *sld_tail* = SLD of the tail group, and *sld_head* = SLD |
---|
32 | of the head group. |
---|
33 | |
---|
34 | .. image:: img/lamellarFFHG_138.jpg |
---|
35 | |
---|
36 | *Figure. 1D plot using the default values (w/1000 data point).* |
---|
37 | |
---|
38 | Our model uses the form factor calculations implemented in a C library |
---|
39 | provided by the NIST Center for Neutron Research (Kline, 2006). |
---|
40 | |
---|
41 | REFERENCE |
---|
42 | |
---|
43 | F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502 |
---|
44 | |
---|
45 | also in J. Phys. Chem. B, 105, (2001) 11081-11088 |
---|
46 | |
---|
47 | *2014/04/17 - Description reviewed by S King and P Butler.* |
---|
48 | """ |
---|
49 | |
---|
50 | from numpy import inf |
---|
51 | |
---|
52 | name = "lamellar_FFHG" |
---|
53 | title = "Random lamellar phase with Head Groups " |
---|
54 | description = """\ |
---|
55 | [Random lamellar phase with Head Groups] |
---|
56 | I(q)= 2*pi*P(q)/(2(H+T)*q^(2)), where |
---|
57 | P(q)= see manual |
---|
58 | layer thickness =(H+T+T+H) = 2(Head+Tail) |
---|
59 | sld = Tail scattering length density |
---|
60 | head_sld = Head scattering length density |
---|
61 | solvent_sld = solvent scattering length density |
---|
62 | background = incoherent background |
---|
63 | scale = scale factor |
---|
64 | """ |
---|
65 | category = "shape:lamellae" |
---|
66 | |
---|
67 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
68 | parameters = [["tail_length", "Ang", 15, [0, inf], "volume", |
---|
69 | "Tail thickness"], |
---|
70 | ["head_length", "Ang", 10, [0, inf], "volume", |
---|
71 | "head thickness"], |
---|
72 | ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "", |
---|
73 | "Tail scattering length density"], |
---|
74 | ["head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "", |
---|
75 | "Head scattering length density"], |
---|
76 | ["solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "", |
---|
77 | "Solvent scattering length density"], |
---|
78 | ] |
---|
79 | |
---|
80 | # No volume normalization despite having a volume parameter |
---|
81 | # This should perhaps be volume normalized? |
---|
82 | form_volume = """ |
---|
83 | return 1.0; |
---|
84 | """ |
---|
85 | |
---|
86 | Iq = """ |
---|
87 | const double qsq = q*q; |
---|
88 | const double drh = head_sld - solvent_sld; |
---|
89 | const double drt = sld - solvent_sld; //correction 13FEB06 by L.Porcar |
---|
90 | const double qT = q*tail_length; |
---|
91 | double Pq, inten; |
---|
92 | Pq = drh*(sin(q*(head_length+tail_length))-sin(qT)) + drt*sin(qT); |
---|
93 | Pq *= Pq; |
---|
94 | Pq *= 4.0/(qsq); |
---|
95 | |
---|
96 | inten = 2.0e-4*M_PI*Pq/qsq; |
---|
97 | |
---|
98 | // normalize by the bilayer thickness |
---|
99 | inten /= 2.0*(head_length+tail_length); |
---|
100 | |
---|
101 | return inten; |
---|
102 | """ |
---|
103 | |
---|
104 | Iqxy = """ |
---|
105 | return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS); |
---|
106 | """ |
---|
107 | |
---|
108 | # ER defaults to 0.0 |
---|
109 | # VR defaults to 1.0 |
---|
110 | |
---|
111 | demo = dict(scale=1, background=0, |
---|
112 | tail_length=15,head_length=10, |
---|
113 | sld=0.4, head_sld=3.0, solvent_sld=6.0, |
---|
114 | tail_length_pd= 0.2, tail_length_pd_n=40, |
---|
115 | head_length_pd= 0.01, head_length_pd_n=40) |
---|
116 | |
---|
117 | oldname = 'LamellarFFHGModel' |
---|
118 | oldpars = dict(head_length='h_thickness', tail_length='t_length', |
---|
119 | sld='sld_tail', head_sld='sld_head', solvent_sld='sld_solvent') |
---|
120 | |
---|