1 | #mono_gauss_coil model |
---|
2 | #conversion of DebyeModel.py |
---|
3 | #converted by Steve King, Mar 2016 |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | r""" |
---|
8 | This model strictly describes the scattering from *monodisperse* polymer chains in theta solvents or polymer melts, conditions under which the distances between segments follow a Gaussian distribution. Provided the number of segments is large (ie, high molecular weight polymers) the single-chain form factor P(Q) is that described by Debye (1947). |
---|
9 | |
---|
10 | To describe the scattering from *polydisperse* polymer chains, see the To describe the scattering from *monodisperse* polymer chains, see the :ref:`poly_gauss_coil <poly-gauss-coil>` model. |
---|
11 | |
---|
12 | Definition |
---|
13 | ---------- |
---|
14 | |
---|
15 | *I(q)* = *scale* |cdot| *I* \ :sub:`0` |cdot| *P(q)* + *background* |
---|
16 | |
---|
17 | where |
---|
18 | |
---|
19 | *I*\ :sub:`0` = |phi|\ :sub:`poly` |cdot| *V* |cdot| (|rho|\ :sub:`poly` - |rho|\ :sub:`solv`)\ :sup:`2` |
---|
20 | |
---|
21 | *P(q)* = 2 [exp(-Z) + Z - 1] / Z \ :sup:`2` |
---|
22 | |
---|
23 | *Z* = (*q R* \ :sub:`g`)\ :sup:`2` |
---|
24 | |
---|
25 | and |
---|
26 | |
---|
27 | *V* = *M* / (*N*\ :sub:`A` |delta|) |
---|
28 | |
---|
29 | Here, |phi|\ :sub:`poly` is the volume fraction of polymer, *V* is the volume of a polymer coil, *M* is the molecular weight of the polymer, *N*\ :sub:`A` is Avogadro's Number, |delta| is the bulk density of the polymer, |rho|\ :sub:`poly` is the sld of the polymer, |rho|\ :sub:`solv` is the sld of the solvent, and *R*\ :sub:`g` is the radius of gyration of the polymer coil. |
---|
30 | |
---|
31 | The 2D scattering intensity is calculated in the same way as the 1D, but where the *q* vector is redefined as |
---|
32 | |
---|
33 | .. math:: |
---|
34 | |
---|
35 | q = \sqrt{q_x^2 + q_y^2} |
---|
36 | |
---|
37 | References |
---|
38 | ---------- |
---|
39 | |
---|
40 | P Debye, *J. Phys. Colloid. Chem.*, 51 (1947) 18. |
---|
41 | |
---|
42 | R J Roe, *Methods of X-Ray and Neutron Scattering in Polymer Science*, Oxford University Press, New York (2000). |
---|
43 | |
---|
44 | http://www.ncnr.nist.gov/staff/hammouda/distance_learning/chapter_28.pdf |
---|
45 | """ |
---|
46 | |
---|
47 | from numpy import inf, sqrt, exp |
---|
48 | |
---|
49 | name = "mono_gauss_coil" |
---|
50 | title = "Scattering from monodisperse polymer coils" |
---|
51 | |
---|
52 | description = """ |
---|
53 | Evaluates the scattering from |
---|
54 | monodisperse polymer chains. |
---|
55 | """ |
---|
56 | category = "shape-independent" |
---|
57 | |
---|
58 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
59 | parameters = [["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"], |
---|
60 | ["radius_gyration", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"]] |
---|
61 | |
---|
62 | # NB: Scale and Background are implicit parameters on every model |
---|
63 | def Iq(q, i_zero, radius_gyration): |
---|
64 | # pylint: disable = missing-docstring |
---|
65 | z = (q * radius_gyration) * (q * radius_gyration) |
---|
66 | if (q == 0).any(): |
---|
67 | inten = i_zero |
---|
68 | else: |
---|
69 | inten = i_zero * 2.0 * (exp(-z) + z - 1.0 ) / (z * z) |
---|
70 | return inten |
---|
71 | #Iq.vectorized = True # Iq accepts an array of q values |
---|
72 | |
---|
73 | def Iqxy(qx, qy, *args): |
---|
74 | # pylint: disable = missing-docstring |
---|
75 | return Iq(sqrt(qx ** 2 + qy ** 2), *args) |
---|
76 | #Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values |
---|
77 | |
---|
78 | demo = dict(scale = 1.0, |
---|
79 | i_zero = 70.0, |
---|
80 | radius_gyration = 75.0, |
---|
81 | background = 0.0) |
---|
82 | |
---|
83 | oldname = "DebyeModel" |
---|
84 | oldpars = dict(scale = 'scale', |
---|
85 | radius_gyration = 'rg', |
---|
86 | background = 'background') |
---|
87 | |
---|
88 | tests = [ |
---|
89 | [{'scale': 70.0, 'radius_gyration': 75.0, 'background': 0.0}, |
---|
90 | [0.0106939, 0.469418], [57.1241, 0.112859]], |
---|
91 | ] |
---|