Changeset ec2ca99 in sasmodels for sasmodels/models/HayterMSAsq.py
- Timestamp:
- Feb 8, 2016 6:01:18 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- f0fb9fe, 66d119f
- Parents:
- 98f3053
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/HayterMSAsq.py
r13ed84c rec2ca99 52 52 [Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor] 53 53 Interparticle structure factor S(Q)for a charged hard spheres. 54 Routine takes absolute value of charge, use HardSphere if charge goes to zero. 54 Routine takes absolute value of charge, use HardSphere if charge 55 goes to zero. 55 56 In sasview the effective radius will be calculated from the 56 57 parameters used in P(Q). 57 58 """ 58 59 single = False # double precision only for now 60 61 # pylint: disable=bad-whitespace, line-too-long 59 62 # [ "name", "units", default, [lower, upper], "type", "description" ], 60 parameters = [["effect_radius", "Ang", 20.75, [0, inf], "volume", 61 "effective radius of hard sphere"], 62 ["charge", "e", 19.0, [0, inf], "", 63 "charge on sphere (in electrons)"], 64 ["volfraction", "", 0.0192, [0, 0.74], "", 65 "volume fraction of spheres"], 66 ["temperature", "K", 318.16, [0, inf], "", 67 "temperature, in Kelvin, for Debye length calculation"], 68 ["saltconc", "M", 0.0, [-inf, inf], "", 69 "conc of salt, 1:1 electolyte, for Debye length"], 70 ["dielectconst", "", 71.08, [-inf, inf], "", 71 "dielectric constant of solvent (default water), for Debye length"], 72 ] 63 parameters = [ 64 ["effect_radius", "Ang", 20.75, [0, inf], "volume", "effective radius of hard sphere"], 65 ["charge", "e", 19.0, [0, inf], "", "charge on sphere (in electrons)"], 66 ["volfraction", "", 0.0192, [0, 0.74], "", "volume fraction of spheres"], 67 ["temperature", "K", 318.16, [0, inf], "", "temperature, in Kelvin, for Debye length calculation"], 68 ["saltconc", "M", 0.0, [-inf, inf], "", "conc of salt, 1:1 electolyte, for Debye length"], 69 ["dielectconst", "", 71.08, [-inf, inf], "", "dielectric constant of solvent (default water), for Debye length"], 70 ] 71 # pylint: enable=bad-whitespace, line-too-long 73 72 category = "structure-factor" 74 73 … … 88 87 oldpars = dict() 89 88 # default parameter set, use compare.sh -midQ -linear 90 # note the calculation varies in different limiting cases so a wide range of parameters will be required for a thorough test! 89 # note the calculation varies in different limiting cases so a wide range of 90 # parameters will be required for a thorough test! 91 91 # odd that the default st has saltconc zero 92 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) 92 demo = dict(effect_radius=20.75, 93 charge=19.0, 94 volfraction=0.0192, 95 temperature=318.16, 96 saltconc=0.05, 97 dielectconst=71.08, 98 effect_radius_pd=0.1, 99 effect_radius_pd_n=40) 93 100 # 94 101 # attempt to use same values as old sasview unit test 95 102 tests = [ 96 [ {'scale': 1.0, 'background' : 0.0, 'effect_radius' : 20.75, 'charge' : 19.0, 'volfraction' : 0.0192, 'temperature' : 298.0, 97 'saltconc' : 0,'dielectconst' : 78.0, 'effect_radius_pd' : 0}, [0.0010], [0.0712928]] 98 ] 103 [{'scale': 1.0, 104 'background': 0.0, 105 'effect_radius': 20.75, 106 'charge': 19.0, 107 'volfraction': 0.0192, 108 'temperature': 298.0, 109 'saltconc': 0, 110 'dielectconst': 78.0, 111 'effect_radius_pd': 0}, 112 [0.0010], [0.0712928]] 113 ] 99 114
Note: See TracChangeset
for help on using the changeset viewer.