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

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since c9e31e2 was 3c56da87, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

lint cleanup

  • Property mode set to 100644
File size: 3.5 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
67parameters = [
68#   [ "name", "units", default, [lower, upper], "type",
69#     "description" ],
70    [ "tail_length", "Ang",  15, [0, inf], "volume",
71      "Tail thickness" ],
72    [ "head_length", "Ang",  10, [0, inf], "volume",
73      "head thickness" ],
74    [ "sld", "1e-6/Ang^2", 0.4, [-inf,inf], "",
75      "Tail scattering length density" ],
76    [ "head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "",
77      "Head scattering length density" ],
78    [ "solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "",
79      "Solvent scattering length density" ],
80    ]
81
82# No volume normalization despite having a volume parameter
83# This should perhaps be volume normalized?
84form_volume = """
85    return 1.0;
86    """
87
88Iq = """
89    const double qsq = q*q;
90    const double drh = head_sld - solvent_sld;
91    const double drt = sld - solvent_sld;    //correction 13FEB06 by L.Porcar
92    const double qT = q*tail_length;
93    double Pq, inten;
94    Pq = drh*(sin(q*(head_length+tail_length))-sin(qT)) + drt*sin(qT);
95    Pq *= Pq;
96    Pq *= 4.0/(qsq);
97
98    inten = 2.0e-4*M_PI*Pq/qsq;
99
100    // normalize by the bilayer thickness
101    inten /= 2.0*(head_length+tail_length);
102
103    return inten;
104    """
105
106Iqxy = """
107    return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS);
108    """
109
110# ER defaults to 0.0
111# VR defaults to 1.0
112
113demo = dict(
114    scale=1, background=0,
115    tail_length=15,head_length=10,
116    sld=0.4, head_sld=3.0, solvent_sld=6.0,
117    tail_length_pd= 0.2, tail_length_pd_n=40,
118    head_length_pd= 0.01, head_length_pd_n=40,
119    )
120
121oldname = 'LamellarFFHGModel'
122oldpars = dict(head_length='h_thickness', sld='sld_tail',
123               head_sld='sld_head', solvent_sld='sld_solvent')
124
Note: See TracBrowser for help on using the repository browser.