Changes in sasmodels/models/squarewell.py [5111921:d529d93] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/squarewell.py
r5111921 rd529d93 8 8 Positive well depths correspond to an attractive potential well. Negative well depths correspond to a potential 9 9 "shoulder", which may or may not be physically reasonable. The stickyhardsphere model may be a better choice in 10 some circumstances. Computed values may behave badly at extremely small Q.10 some circumstances. Computed values may behave badly at extremely small $qR$. 11 11 12 The well width ( *l*\) is defined as multiples of the particle diameter (2\*\ *R*\ )12 The well width (|lambda| ) is defined as multiples of the particle diameter (2\*\ *R*\ ) 13 13 14 14 The interaction potential is: … … 22 22 U(r) = \begin{cases} 23 23 \infty & r < 2R \\ 24 -\epsilon , 2R \leq < 2R\lambda25 0 & r \geq 2R 24 -\epsilon & 2R \leq r < 2R\lambda \\ 25 0 & r \geq 2R\lambda 26 26 \end{cases} 27 27 28 28 where $r$ is the distance from the center of the sphere of a radius $R$. 29 29 30 In sasview the effective radius may be calculated from the parameters 31 used in the form factor $P(q)$ that this $S(q)$ is combined with. 30 32 31 33 For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as … … 35 37 q = \sqrt{q_x^2 + q_y^2} 36 38 37 .. comment::38 39 .. figure:: img/squarewell_226.jpg40 41 1D plot using the default values (in linear scale).*42 39 43 40 REFERENCE … … 59 56 """ 60 57 category = "structure-factor" 58 structure_factor = True 61 59 62 60 #single = False … … 65 63 # [ "name", "units", default, [lower, upper], "type", 66 64 # "description" ], 67 [" effect_radius", "Ang", 50.0, [0, inf], "volume",65 ["radius_effective", "Ang", 50.0, [0, inf], "volume", 68 66 "effective radius of hard sphere"], 69 67 ["volfraction", "", 0.04, [0, 0.08], "", … … 71 69 ["welldepth", "kT", 1.5, [0.0, 1.5], "", 72 70 "depth of well, epsilon"], 73 ["wellwidth", "diameters", 1.2, [ 0, inf], "",74 "width of well in diameters (=2R) units "],71 ["wellwidth", "diameters", 1.2, [1.0, inf], "", 72 "width of well in diameters (=2R) units, must be > 1"], 75 73 ] 76 74 … … 89 87 x= q; 90 88 91 req = effect_radius;89 req = radius_effective; 92 90 phis = volfraction; 93 91 edibkb = welldepth; … … 134 132 135 133 oldname = 'SquareWellStructure' 136 oldpars = dict( )137 demo = dict( effect_radius=50, volfraction=0.04, welldepth=1.5,138 wellwidth=1.2, effect_radius_pd=0, effect_radius_pd_n=0)134 oldpars = dict(radius_effective="effect_radius",radius_effective_pd="effect_radius_pd",radius_effective_pd_n="effect_radius_pd_n") 135 demo = dict(radius_effective=50, volfraction=0.04, welldepth=1.5, 136 wellwidth=1.2, radius_effective_pd=0, radius_effective_pd_n=0) 139 137 # 140 138 tests = [ 141 [ {'scale': 1.0, 'background' : 0.0, ' effect_radius' : 50.0, 'volfraction' : 0.04,'welldepth' : 1.5, 'wellwidth' : 1.2,142 ' effect_radius_pd' : 0}, [0.001], [0.97665742]]139 [ {'scale': 1.0, 'background' : 0.0, 'radius_effective' : 50.0, 'volfraction' : 0.04,'welldepth' : 1.5, 'wellwidth' : 1.2, 140 'radius_effective_pd' : 0}, [0.001], [0.97665742]] 143 141 ] 144 # ADDED by: converting from sasview RKH ON: 16Mar2016 - in progress142 # ADDED by: converting from sasview RKH ON: 16Mar2016 145 143
Note: See TracChangeset
for help on using the changeset viewer.