source: sasmodels/sasmodels/models/lamellarPC.py @ dc02af0

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since dc02af0 was dc02af0, checked in by richardh, 9 years ago

adding Lamellar models, polydisp needs checking

  • Property mode set to 100644
File size: 3.8 KB
Line 
1# Note: model title and parameter table are inserted automatically
2r"""
3This model calculates the scattering from a stack of repeating lamellar structures. The stacks of lamellae (infinite
4in lateral dimension) are treated as a paracrystal to account for the repeating spacing. The repeat distance is further
5characterized by a Gaussian polydispersity. **This model can be used for large multilamellar vesicles.**
6
7*2.1.33.1. Definition*
8
9The scattering intensity *I(q)* is calculated as
10
11.. image:: img/image145.jpg
12
13The form factor of the bilayer is approximated as the cross section of an infinite, planar bilayer of thickness *t*
14
15.. image:: img/image146.jpg
16
17Here, the scale factor is used instead of the mass per area of the bilayer (*G*). The scale factor is the volume
18fraction of the material in the bilayer, *not* the total excluded volume of the paracrystal. *Z*\ :sub:`N`\ *(q)*
19describes the interference effects for aggregates consisting of more than one bilayer. The equations used are (3-5)
20from the Bergstrom reference below.
21
22Non-integer numbers of stacks are calculated as a linear combination of the lower and higher values
23
24.. image:: img/image147.jpg
25
26The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
27
28.. math::
29
30    Q = \sqrt{Q_x^2 + Q_y^2}
31
32The parameters of the model are *Nlayers* = no. of layers, and *pd_spacing* = polydispersity of spacing.
33
34==============  ========  =============
35Parameter name  Units     Default value
36==============  ========  =============
37background      |cm^-1|   0
38scale           None      1
39Nlayers         None      20
40pd_spacing      None      0.2
41sld_layer       |Ang^-2|  1e-6
42sld_solvent     |Ang^-2|  6.34e-6
43spacing         |Ang|     250
44thickness       |Ang|     33
45==============  ========  =============
46
47.. image:: img/image148.jpg
48
49*Figure. 1D plot using the default values above (w/20000 data point).*
50
51Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
52(Kline, 2006).
53
54REFERENCE
55
56M Bergstrom, J S Pedersen, P Schurtenberger, S U Egelhaaf, *J. Phys. Chem. B*, 103 (1999) 9888-9897
57
58"""
59
60from numpy import pi, inf
61
62name = "lamellarPC"
63title = "Random lamellar sheet with paracrystal structure factor"
64description = """\
65        [Random lamellar phase with paracrystal structure factor]
66        randomly oriented stacks of infinite sheets
67                with paracrytal S(Q), having polydisperse spacing.
68        sld = sheet scattering length density
69                sld_solvent = solvent scattering length density
70                background = incoherent background
71                scale = scale factor
72"""
73
74parameters = [
75#   [ "name", "units", default, [lower, upper], "type",
76#     "description" ],
77    [ "thickness", "Ang",  33.0, [0, inf], "volume",
78      "sheet thickness" ],
79    [ "Nlayers", "",  20, [0, inf], "",
80      "Number of layers" ],
81    [ "spacing", "Ang", 250., [0.0,inf], "",
82      "d-spacing of paracrystal stack" ],
83    [ "spacing_polydisp", "Ang", 0.0, [0.0,inf], "",
84      "d-spacing of paracrystal stack" ],
85    [ "sld", "1e-6/Ang^2", 1.0, [-inf,inf], "",
86      "layer scattering length density" ],
87    [ "solvent_sld", "1e-6/Ang^2", 6.34, [-inf,inf], "",
88      "Solvent scattering length density" ],
89    ]
90
91       
92source = [ "lamellarPC_kernel.c"]
93
94# No volume normalization despite having a volume parameter
95# This should perhaps be volume normalized?
96form_volume = """
97    return 1.0;
98    """
99
100Iqxy = """
101    // never called since no orientation or magnetic parameters.
102    return -1.0;
103    """
104
105# ER defaults to 0.0
106# VR defaults to 1.0
107
108demo = dict(
109        scale=1, background=0,
110                thickness=33,Nlayers=20,spacing=250,spacing_polydisp=0.2,
111        sld=1.0, solvent_sld=6.34,
112                thickness_pd= 0.2, thickness_pd_n=40
113         )
114oldname = 'LamellarPCrystalModel'
115oldpars = dict(spacing_polydisp='pd_spacing', sld='sld_layer',solvent_sld='sld_solvent')
116
117
Note: See TracBrowser for help on using the repository browser.