1 | # Note: model title and parameter table are inserted automatically |
---|
2 | r""" |
---|
3 | This calculates the structure factor (the Fourier transform of the pair correlation function *g(r)*) for a system of |
---|
4 | charged, spheroidal objects in a dielectric medium. When combined with an appropriate form factor (such as sphere, |
---|
5 | core+shell, ellipsoid, etc), this allows for inclusion of the interparticle interference effects due to screened coulomb |
---|
6 | repulsion between charged particles. |
---|
7 | |
---|
8 | **This routine only works for charged particles**. If the charge is set to zero the routine will self-destruct! |
---|
9 | For non-charged particles use a hard sphere potential. |
---|
10 | |
---|
11 | The salt concentration is used to compute the ionic strength of the solution which in turn is used to compute the Debye |
---|
12 | screening length. At present there is no provision for entering the ionic strength directly nor for use of any |
---|
13 | multivalent salts. The counterions are also assumed to be monovalent. |
---|
14 | |
---|
15 | For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as |
---|
16 | |
---|
17 | .. math:: |
---|
18 | |
---|
19 | Q = \sqrt{Q_x^2 + Q_y^2} |
---|
20 | |
---|
21 | ============== ======== ============= |
---|
22 | Parameter name Units Default value |
---|
23 | ============== ======== ============= |
---|
24 | effect_radius |Ang| 20.8 |
---|
25 | charge *e* 19 |
---|
26 | volfraction None 0.2 |
---|
27 | temperature K 318 |
---|
28 | salt conc M 0 |
---|
29 | dielectconst None 71.1 |
---|
30 | ============== ======== ============= |
---|
31 | |
---|
32 | .. image:: img/HayterMSAsq_227.jpg |
---|
33 | |
---|
34 | *Figure. 1D plot using the default values (in linear scale).* |
---|
35 | |
---|
36 | REFERENCE |
---|
37 | |
---|
38 | J B Hayter and J Penfold, *Molecular Physics*, 42 (1981) 109-118 |
---|
39 | |
---|
40 | J P Hansen and J B Hayter, *Molecular Physics*, 46 (1982) 651-656 |
---|
41 | """ |
---|
42 | |
---|
43 | # dp[0] = 2.0*effect_radius(); |
---|
44 | # dp[1] = fabs(charge()); |
---|
45 | # dp[2] = volfraction(); |
---|
46 | # dp[3] = temperature(); |
---|
47 | # dp[4] = saltconc(); |
---|
48 | # dp[5] = dielectconst(); |
---|
49 | |
---|
50 | from numpy import inf |
---|
51 | |
---|
52 | source = ["HayterMSAsq_kernel.c"] |
---|
53 | |
---|
54 | name = "HayterMSAsq" |
---|
55 | title = "Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor" |
---|
56 | description = """\ |
---|
57 | [Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor] |
---|
58 | Interparticle structure factor S(Q)for a charged hard spheres. |
---|
59 | Routine takes absolute value of charge, use HardSphere if charge goes to zero. |
---|
60 | In sasview the effective radius will be calculated from the |
---|
61 | parameters used in P(Q). |
---|
62 | """ |
---|
63 | # [ "name", "units", default, [lower, upper], "type", "description" ], |
---|
64 | parameters = [["effect_radius", "Ang", 20.75, [0, inf], "volume", |
---|
65 | "effective radius of hard sphere"], |
---|
66 | ["charge", "e", 19.0, [0, inf], "", |
---|
67 | "charge on sphere (in electrons)"], |
---|
68 | ["volfraction", "", 0.0192, [0, 0.74], "", |
---|
69 | "volume fraction of spheres"], |
---|
70 | ["temperature", "K", 318.16, [0, inf], "", |
---|
71 | "temperature, in Kelvin, for Debye length calculation"], |
---|
72 | ["saltconc", "M", 0.0, [-inf, inf], "", |
---|
73 | "conc of salt, 1:1 electolyte, for Debye length"], |
---|
74 | ["dielectconst", "", 71.08, [-inf, inf], "", |
---|
75 | "dielectric constant of solvent (default water), for Debye length"], |
---|
76 | ] |
---|
77 | category = "structure-factor" |
---|
78 | |
---|
79 | # No volume normalization despite having a volume parameter |
---|
80 | # This should perhaps be volume normalized? |
---|
81 | form_volume = """ |
---|
82 | return 1.0; |
---|
83 | """ |
---|
84 | Iqxy = """ |
---|
85 | // never called since no orientation or magnetic parameters. |
---|
86 | return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS); |
---|
87 | """ |
---|
88 | # ER defaults to 0.0 |
---|
89 | # VR defaults to 1.0 |
---|
90 | |
---|
91 | oldname = 'HayterMSAStructure' |
---|
92 | oldpars = dict() |
---|
93 | # default parameter set, use compare.sh -midQ -linear |
---|
94 | # note the calculation varies in different limiting cases so a wide range of parameters will be required for a thorough test! |
---|
95 | # odd that the default st has saltconc zero |
---|
96 | demo = dict(effect_radius = 20.75,charge=19.0,volfraction = 0.0192,temperature=318.16,saltconc=0.05,dielectconst=71.08,effect_radius_pd = 0.1,effect_radius_pd_n = 40) |
---|
97 | |
---|