Changeset db1d9d5 in sasmodels for sasmodels/models/hayter_msa.py
- Timestamp:
- Mar 28, 2019 3:16:51 PM (5 years ago)
- Branches:
- master, ticket-1257-vesicle-product, ticket_1156, ticket_822_more_unit_tests
- Children:
- 8795b6f
- Parents:
- a34b811
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hayter_msa.py
r0507e09 rdb1d9d5 1 1 # Note: model title and parameter table are inserted automatically 2 2 r""" 3 This calculates the structure factor (the Fourier transform of the pair 4 correlation function $g(r)$) for a system of charged, spheroidal objects 5 in a dielectric medium. When combined with an appropriate form factor 6 (such as sphere, core+shell, ellipsoid, etc), this allows for inclusion 7 of the interparticle interference effects due to screened coulomb repulsion 8 between charged particles. 3 Calculates the interparticle structure factor for a system of charged, 4 spheroidal, objects in a dielectric medium [1,2]. When combined with an 5 appropriate form factor $P(q)$, this allows for inclusion of the 6 interparticle interference effects due to screened Coulombic 7 repulsion between the charged particles. 9 8 10 **This routine only works for charged particles**. If the charge is set to 11 zero the routine may self-destruct! For non-charged particles use a hard 12 sphere potential. 9 .. note:: 10 11 This routine only works for charged particles! If the charge is set 12 to zero the routine may self-destruct! For uncharged particles use 13 the :ref:`hardsphere` $S(q)$ instead. The upper limit for the charge 14 is limited to 200e to avoid numerical instabilities. 15 16 .. note:: 17 18 Earlier versions of SasView did not incorporate the so-called 19 $\beta(q)$ ("beta") correction [3] for polydispersity and non-sphericity. 20 This is only available in SasView versions 4.2.2 and higher. 13 21 14 22 The salt concentration is used to compute the ionic strength of the solution 15 which in turn is used to compute the Debye screening length. At present16 there is no provision for entering the ionic strength directly nor for use17 of any multivalent salts, though it should be possible to simulate the effect 18 of this by increasing the salt concentration. The counterions are also 19 assumed to be monovalent.23 which in turn is used to compute the Debye screening length. There is no 24 provision for entering the ionic strength directly. **At present the 25 counterions are assumed to be monovalent**, though it should be possible 26 to simulate the effect of multivalent counterions by increasing the salt 27 concentration. 20 28 21 In sasview the effective radius may be calculated from the parameters 29 Over the range 0 - 100 C the dielectric constant $\kappa$ of water may be 30 approximated with a maximum deviation of 0.01 units by the empirical 31 formula [4] 32 33 .. math:: 34 35 \kappa = 87.740 - 0.40008 T + 9.398x10^{-4} T^2 - 1.410x10^{-6} T^3 36 37 where $T$ is the temperature in celsius. 38 39 In SasView the effective radius may be calculated from the parameters 22 40 used in the form factor $P(q)$ that this $S(q)$ is combined with. 23 41 … … 38 56 39 57 .. [#] J B Hayter and J Penfold, *Molecular Physics*, 42 (1981) 109-118 58 40 59 .. [#] J P Hansen and J B Hayter, *Molecular Physics*, 46 (1982) 651-656 60 61 .. [#] M Kotlarchyk and S-H Chen, *J. Chem. Phys.*, 79 (1983) 2461-2469 62 63 .. [#] C G Malmberg and A A Maryott, *J. Res. Nat. Bureau Standards*, 56 (1956) 2641 41 64 42 65 Source … … 50 73 ---------------------------- 51 74 52 * **Author:** 53 * **Last Modified by:** 54 * **Last Reviewed by:** 75 * **Author:** 76 * **Last Modified by:** 77 * **Last Reviewed by:** Steve King **Date:** March 28, 2019 55 78 * **Source added by :** Steve King **Date:** March 25, 2019 56 79 """ … … 74 97 75 98 name = "hayter_msa" 76 title = "Hayter-Penfold rescaled MSA, charged sphere, interparticle S(Q) structure factor"99 title = "Hayter-Penfold Rescaled Mean Spherical Approximation (RMSA) structure factor for charged spheres" 77 100 description = """\ 78 101 [Hayter-Penfold RMSA charged sphere interparticle S(Q) structure factor] 79 Interparticle structure factor S(Q)for a charged hard spheres. 80 Routine takes absolute value of charge, use HardSphere if charge 81 goes to zero. 82 In sasview the effective radius and volume fraction may be calculated 83 from the parameters used in P(Q). 102 Interparticle structure factor S(Q) for charged hard spheres. 103 This routine only works for charged particles! For uncharged particles 104 use the hardsphere S(q) instead. The "beta(q)" correction is available 105 in versions 4.2.2 and higher. 84 106 """ 85 107 … … 87 109 # pylint: disable=bad-whitespace, line-too-long 88 110 # [ "name", "units", default, [lower, upper], "type", "description" ], 111 # 112 # NOTE: SMK, 28Mar19 The upper limit for charge is set to 200 to avoid instabilities noted by PK in 113 # Ticket #1152. Also see the thread in Ticket 859. The docs above also note that charge=0 will 114 # cause problems, yet the default parameters allowed it! After discussions with PK I have 115 # changed it to (an arbitarily) small but non-zero value. But I haven't changed the low limit 116 # in function random() below. 117 # 89 118 parameters = [ 90 119 ["radius_effective", "Ang", 20.75, [0, inf], "volume", "effective radius of charged sphere"], 91 120 ["volfraction", "None", 0.0192, [0, 0.74], "", "volume fraction of spheres"], 92 ["charge", "e", 19.0, [0 , 200], "", "charge on sphere (in electrons)"],121 ["charge", "e", 19.0, [0.000001, 200], "", "charge on sphere (in electrons)"], 93 122 ["temperature", "K", 318.16, [0, 450], "", "temperature, in Kelvin, for Debye length calculation"], 94 123 ["concentration_salt", "M", 0.0, [0, inf], "", "conc of salt, moles/litre, 1:1 electolyte, for Debye length"], 95 ["dielectconst", "None", 71.08, [-inf, inf], "", "dielectric constant (relative permittivity) of solvent, default water, for Debye length"]124 ["dielectconst", "None", 71.08, [-inf, inf], "", "dielectric constant (relative permittivity) of solvent, kappa, default water, for Debye length"] 96 125 ] 97 126 # pylint: enable=bad-whitespace, line-too-long
Note: See TracChangeset
for help on using the changeset viewer.