[dc02af0] | 1 | # Note: model title and parameter table are inserted automatically |
---|
| 2 | r""" |
---|
[eb69cce] | 3 | This model provides the scattering intensity, $I(q)$, for a lyotropic lamellar |
---|
[3c56da87] | 4 | phase where a random distribution in solution are assumed. The SLD of the head |
---|
| 5 | region is taken to be different from the SLD of the tail region. |
---|
[dc02af0] | 6 | |
---|
[d138d43] | 7 | Definition |
---|
| 8 | ---------- |
---|
[dc02af0] | 9 | |
---|
[d138d43] | 10 | The scattering intensity $I(q)$ is |
---|
[dc02af0] | 11 | |
---|
| 12 | .. math:: |
---|
| 13 | |
---|
[d138d43] | 14 | I(q) = 2\pi\frac{\text{scale}}{2(\delta_H + \delta_T)} P(q) \frac{1}{q^2} |
---|
[dc02af0] | 15 | |
---|
[d138d43] | 16 | The form factor $P(q)$ is |
---|
[dc02af0] | 17 | |
---|
[d138d43] | 18 | .. math:: |
---|
| 19 | |
---|
| 20 | P(q) = \frac{4}{q^2} |
---|
| 21 | \left\lbrace |
---|
| 22 | \Delta \rho_H |
---|
| 23 | \left[\sin[q(\delta_H + \delta_T)\ - \sin(q\delta_T)\right] |
---|
| 24 | + \Delta\rho_T\sin(q\delta_T) |
---|
| 25 | \right\rbrace^2 |
---|
[dc02af0] | 26 | |
---|
[eb69cce] | 27 | where $\delta_T$ is *tail_length*, $\delta_H$ is *head_length*, |
---|
[d138d43] | 28 | $\Delta\rho_H$ is the head contrast (*head_sld* $-$ *solvent_sld*), |
---|
| 29 | and $\Delta\rho_T$ is tail contrast (*sld* $-$ *solvent_sld*). |
---|
[dc02af0] | 30 | |
---|
[3c56da87] | 31 | The 2D scattering intensity is calculated in the same way as 1D, where |
---|
[eb69cce] | 32 | the $q$ vector is defined as |
---|
[dc02af0] | 33 | |
---|
| 34 | .. math:: |
---|
| 35 | |
---|
[d138d43] | 36 | q = \sqrt{q_x^2 + q_y^2} |
---|
[dc02af0] | 37 | |
---|
| 38 | |
---|
[d138d43] | 39 | References |
---|
| 40 | ---------- |
---|
[dc02af0] | 41 | |
---|
| 42 | F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502 |
---|
| 43 | |
---|
| 44 | also in J. Phys. Chem. B, 105, (2001) 11081-11088 |
---|
| 45 | |
---|
| 46 | *2014/04/17 - Description reviewed by S King and P Butler.* |
---|
| 47 | """ |
---|
| 48 | |
---|
[3c56da87] | 49 | from numpy import inf |
---|
[dc02af0] | 50 | |
---|
| 51 | name = "lamellar_FFHG" |
---|
[d138d43] | 52 | title = "Random lamellar phase with Head Groups" |
---|
[dc02af0] | 53 | description = """\ |
---|
[3e428ec] | 54 | [Random lamellar phase with Head Groups] |
---|
| 55 | I(q)= 2*pi*P(q)/(2(H+T)*q^(2)), where |
---|
| 56 | P(q)= see manual |
---|
| 57 | layer thickness =(H+T+T+H) = 2(Head+Tail) |
---|
| 58 | sld = Tail scattering length density |
---|
[22eac46] | 59 | head_sld = Head scattering length density |
---|
| 60 | solvent_sld = solvent scattering length density |
---|
[3e428ec] | 61 | background = incoherent background |
---|
| 62 | scale = scale factor |
---|
[dc02af0] | 63 | """ |
---|
[a5d0d00] | 64 | category = "shape:lamellae" |
---|
[dc02af0] | 65 | |
---|
[3eb6b90] | 66 | # pylint: disable=bad-whitespace, line-too-long |
---|
[3e428ec] | 67 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
[3eb6b90] | 68 | parameters = [["tail_length", "Ang", 15, [0, inf], "volume", "Tail thickness"], |
---|
| 69 | ["head_length", "Ang", 10, [0, inf], "volume", "head thickness"], |
---|
| 70 | ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "", "Tail scattering length density"], |
---|
| 71 | ["head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "", "Head scattering length density"], |
---|
| 72 | ["solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "", "Solvent scattering length density"]] |
---|
| 73 | # pylint: enable=bad-whitespace, line-too-long |
---|
[dc02af0] | 74 | |
---|
| 75 | # No volume normalization despite having a volume parameter |
---|
| 76 | # This should perhaps be volume normalized? |
---|
| 77 | form_volume = """ |
---|
| 78 | return 1.0; |
---|
| 79 | """ |
---|
| 80 | |
---|
| 81 | Iq = """ |
---|
| 82 | const double qsq = q*q; |
---|
[3c56da87] | 83 | const double drh = head_sld - solvent_sld; |
---|
| 84 | const double drt = sld - solvent_sld; //correction 13FEB06 by L.Porcar |
---|
| 85 | const double qT = q*tail_length; |
---|
| 86 | double Pq, inten; |
---|
| 87 | Pq = drh*(sin(q*(head_length+tail_length))-sin(qT)) + drt*sin(qT); |
---|
| 88 | Pq *= Pq; |
---|
| 89 | Pq *= 4.0/(qsq); |
---|
| 90 | |
---|
| 91 | inten = 2.0e-4*M_PI*Pq/qsq; |
---|
| 92 | |
---|
| 93 | // normalize by the bilayer thickness |
---|
| 94 | inten /= 2.0*(head_length+tail_length); |
---|
| 95 | |
---|
| 96 | return inten; |
---|
[dc02af0] | 97 | """ |
---|
[3c56da87] | 98 | |
---|
[dc02af0] | 99 | Iqxy = """ |
---|
[bfb195e] | 100 | return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS); |
---|
[dc02af0] | 101 | """ |
---|
| 102 | |
---|
| 103 | # ER defaults to 0.0 |
---|
| 104 | # VR defaults to 1.0 |
---|
| 105 | |
---|
[3e428ec] | 106 | demo = dict(scale=1, background=0, |
---|
[3eb6b90] | 107 | tail_length=15, head_length=10, |
---|
[3e428ec] | 108 | sld=0.4, head_sld=3.0, solvent_sld=6.0, |
---|
[3eb6b90] | 109 | tail_length_pd=0.2, tail_length_pd_n=40, |
---|
| 110 | head_length_pd=0.01, head_length_pd_n=40) |
---|
[3c56da87] | 111 | |
---|
[dc02af0] | 112 | oldname = 'LamellarFFHGModel' |
---|
[22eac46] | 113 | oldpars = dict(head_length='h_thickness', tail_length='t_length', |
---|
| 114 | sld='sld_tail', head_sld='sld_head', solvent_sld='sld_solvent') |
---|
[7f47777] | 115 | # |
---|
[3eb6b90] | 116 | tests = [[{'scale': 1.0, 'background': 0.0, 'tail_length': 15.0, 'head_length': 10.0, |
---|
| 117 | 'sld': 0.4, 'head_sld': 3.0, 'solvent_sld': 6.0}, [0.001], [653143.9209]]] |
---|