source: sasmodels/sasmodels/models/lamellarFFHG.py @ d1fe925

gh-pages
Last change on this file since d1fe925 was d1fe925, checked in by ajj, 8 years ago

Creating gh_pages branch for docs

  • Property mode set to 100644
File size: 3.6 KB
Line 
1# Note: model title and parameter table are inserted automatically
2r"""
3This model provides the scattering intensity, *I(q)*, for a lyotropic lamellar
4phase where a random distribution in solution are assumed. The SLD of the head
5region is taken to be different from the SLD of the tail region.
6
7*2.1.31.1. Definition*
8
9The 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
15The form factor is
16
17.. image:: img/lamellarFFHG_.jpg
18
19where |delta|\ T = tail length (or *tail_length*), |delta|\ H = head thickness
20(or *h_thickness*), |drho|\ H = SLD(headgroup) - SLD(solvent),
21and |drho|\ T = SLD(tail) - SLD(solvent).
22
23The 2D scattering intensity is calculated in the same way as 1D, where
24the *q* vector is defined as
25
26.. math::
27
28    Q = \sqrt{Q_x^2 + Q_y^2}
29
30The returned value is in units of |cm^-1|, on absolute scale. In the
31parameters, *sld_tail* = SLD of the tail group, and *sld_head* = SLD
32of the head group.
33
34.. image:: img/lamellarFFHG_138.jpg
35
36*Figure. 1D plot using the default values (w/1000 data point).*
37
38Our model uses the form factor calculations implemented in a C library
39provided by the NIST Center for Neutron Research (Kline, 2006).
40
41REFERENCE
42
43F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
44
45also in J. Phys. Chem. B, 105, (2001) 11081-11088
46
47*2014/04/17 - Description reviewed by S King and P Butler.*
48"""
49
50from numpy import inf
51
52name = "lamellar_FFHG"
53title = "Random lamellar phase with Head Groups "
54description = """\
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        sld_head = Head scattering length density
61        sld_solvent = solvent scattering length density
62        background = incoherent background
63        scale = scale factor
64"""
65category = "shape:lamellae"
66
67#             ["name", "units", default, [lower, upper], "type","description"],
68parameters = [["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?
82form_volume = """
83    return 1.0;
84    """
85
86Iq = """
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
104Iqxy = """
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
111demo = 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
117oldname = 'LamellarFFHGModel'
118oldpars = dict(head_length='h_thickness', sld='sld_tail',
119               head_sld='sld_head', solvent_sld='sld_solvent')
120
Note: See TracBrowser for help on using the repository browser.