[30b4ddf] | 1 | r""" |
---|
| 2 | *This model was implemented by an interested user!* |
---|
| 3 | |
---|
| 4 | Unlike a concentrated polymer solution, the fine-scale polymer distribution |
---|
| 5 | in a gel involves at least two characteristic length scales, |
---|
| 6 | a shorter correlation length ( $a1$ ) to describe the rapid fluctuations |
---|
| 7 | in the position of the polymer chains that ensure thermodynamic equilibrium, |
---|
| 8 | and a longer distance (denoted here as $a2$ ) needed to account for the static |
---|
[168052c] | 9 | accumulations of polymer pinned down by junction points or clusters of such |
---|
[40a87fa] | 10 | points. The latter is derived from a simple Guinier function. Compare also the |
---|
[b8954d7] | 11 | gauss_lorentz_gel model. |
---|
[30b4ddf] | 12 | |
---|
| 13 | |
---|
| 14 | Definition |
---|
| 15 | ---------- |
---|
| 16 | |
---|
| 17 | The scattered intensity $I(q)$ is calculated as |
---|
| 18 | |
---|
| 19 | .. math:: |
---|
| 20 | |
---|
[513efc5] | 21 | I(Q) = I(0)_L \frac{1}{\left( 1+\left[ ((D+1/3)Q^2a_{1}^2 |
---|
| 22 | \right]\right)^{D/2}} + I(0)_G exp\left( -Q^2a_{2}^2\right) + B |
---|
[30b4ddf] | 23 | |
---|
| 24 | where |
---|
| 25 | |
---|
| 26 | .. math:: |
---|
| 27 | |
---|
| 28 | a_{2}^2 \approx \frac{R_{g}^2}{3} |
---|
| 29 | |
---|
[513efc5] | 30 | Note that the first term reduces to the Ornstein-Zernicke equation |
---|
| 31 | when $D = 2$; ie, when the Flory exponent is 0.5 (theta conditions). |
---|
| 32 | In gels with significant hydrogen bonding $D$ has been reported to be |
---|
| 33 | ~2.6 to 2.8. |
---|
[30b4ddf] | 34 | |
---|
| 35 | |
---|
[b8954d7] | 36 | References |
---|
| 37 | ---------- |
---|
[30b4ddf] | 38 | |
---|
[0507e09] | 39 | .. [#] Mitsuhiro Shibayama, Toyoichi Tanaka, Charles C Han, *J. Chem. Phys.* 1992, 97 (9), 6829-6841 |
---|
[30b4ddf] | 40 | |
---|
[0507e09] | 41 | .. [#] Simon Mallam, Ferenc Horkay, Anne-Marie Hecht, Adrian R Rennie, Erik Geissler, *Macromolecules* 1991, 24, 543-548 |
---|
| 42 | |
---|
| 43 | Source |
---|
| 44 | ------ |
---|
| 45 | |
---|
| 46 | `gel_fit.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gel_fit.py>`_ |
---|
| 47 | |
---|
| 48 | `gel_fit.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gel_fit.c>`_ |
---|
| 49 | |
---|
| 50 | Authorship and Verification |
---|
| 51 | ---------------------------- |
---|
| 52 | |
---|
| 53 | * **Author:** |
---|
| 54 | * **Last Modified by:** |
---|
| 55 | * **Last Reviewed by:** |
---|
| 56 | * **Source added by :** Steve King **Date:** March 25, 2019 |
---|
[30b4ddf] | 57 | """ |
---|
| 58 | |
---|
[2d81cfe] | 59 | import numpy as np |
---|
[30b4ddf] | 60 | from numpy import inf |
---|
| 61 | |
---|
| 62 | name = "gel_fit" |
---|
| 63 | title = "Fitting using fine-scale polymer distribution in a gel." |
---|
| 64 | description = """\ |
---|
| 65 | Structure factor for interacting particles: |
---|
| 66 | |
---|
| 67 | Shibayama-Geissler Two-Length Scale Fit for Gels (GelFit) |
---|
| 68 | |
---|
| 69 | Shibayama; Tanaka; Han J Chem Phys (1992), 97(9), 6829-6841 |
---|
| 70 | Mallam; Horkay; Hecht; Rennie; Geissler, Macromol (1991), 24, 543 |
---|
| 71 | """ |
---|
| 72 | category = "shape-independent" |
---|
| 73 | |
---|
[168052c] | 74 | # pylint: disable=bad-whitespace, line-too-long |
---|
[30b4ddf] | 75 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
[b8954d7] | 76 | parameters = [["guinier_scale", "cm^-1", 1.7, [-inf, inf], "", "Guinier length scale"], |
---|
[a807206] | 77 | ["lorentz_scale", "cm^-1", 3.5, [-inf, inf], "", "Lorentzian length scale"], |
---|
| 78 | ["rg", "Ang", 104.0, [2, inf], "", "Radius of gyration"], |
---|
| 79 | ["fractal_dim", "", 2.0, [0, inf], "", "Fractal exponent"], |
---|
[30b4ddf] | 80 | ["cor_length", "Ang", 16.0, [0, inf], "", "Correlation length"] |
---|
[168052c] | 81 | ] |
---|
| 82 | # pylint: enable=bad-whitespace, line-too-long |
---|
[30b4ddf] | 83 | |
---|
| 84 | source = ["gel_fit.c"] |
---|
| 85 | |
---|
[48462b0] | 86 | def random(): |
---|
[b297ba9] | 87 | """Return a random parameter set for the model.""" |
---|
[48462b0] | 88 | guinier_scale = 10**np.random.uniform(1, 3) |
---|
| 89 | lorentz_scale = 10**np.random.uniform(1, 3) |
---|
| 90 | rg = 10**np.random.uniform(1, 5) |
---|
| 91 | fractal_dim = np.random.uniform(0, 6) |
---|
| 92 | cor_length = 10**np.random.uniform(0, 3) |
---|
| 93 | pars = dict( |
---|
| 94 | #background=0, |
---|
| 95 | scale=1, |
---|
| 96 | guinier_scale=guinier_scale, |
---|
| 97 | lorentz_scale=lorentz_scale, |
---|
| 98 | rg=rg, |
---|
| 99 | fractal_dim=fractal_dim, |
---|
| 100 | cor_length=cor_length |
---|
| 101 | ) |
---|
| 102 | return pars |
---|
| 103 | |
---|
[30b4ddf] | 104 | demo = dict(background=0.01, |
---|
| 105 | guinier_scale=1.7, |
---|
[a807206] | 106 | lorentz_scale=3.5, |
---|
| 107 | rg=104, |
---|
| 108 | fractal_dim=2.0, |
---|
[30b4ddf] | 109 | cor_length=16.0) |
---|
| 110 | |
---|
| 111 | tests = [[{'guinier_scale': 1.0, |
---|
[a807206] | 112 | 'lorentz_scale': 1.0, |
---|
| 113 | 'rg': 10.0, |
---|
| 114 | 'fractal_dim': 10.0, |
---|
[6dd90c1] | 115 | 'cor_length': 20.0, |
---|
| 116 | 'background': 0.0, |
---|
[168052c] | 117 | }, 0.1, 0.716532], |
---|
[30b4ddf] | 118 | |
---|
| 119 | [{'guinier_scale': 4.0, |
---|
[a807206] | 120 | 'lorentz_scale': 10.0, |
---|
| 121 | 'rg': 500.0, |
---|
| 122 | 'fractal_dim': 1.0, |
---|
[30b4ddf] | 123 | 'cor_length': 20.0, |
---|
| 124 | 'background': 20.0, |
---|
[168052c] | 125 | }, 5.0, 20.1224653026], |
---|
| 126 | ] |
---|