Changes in / [310ddcb:a1c91c2] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/mono_gauss_coil.py

    r38d2c97 rbf227cd  
    88This model strictly describes the scattering from *monodisperse* polymer chains in theta solvents or polymer melts, conditions under which the distances between segments follow a Gaussian distribution. Provided the number of segments is large (ie, high molecular weight polymers) the single-chain form factor P(Q) is that described by Debye (1947). 
    99 
    10 To describe the scattering from *polydisperse* polymer chains, see the poly_gauss_coil model. 
     10To describe the scattering from *polydisperse* polymer chains, see the To describe the scattering from *monodisperse* polymer chains, see the :ref:`poly_gauss_coil <poly-gauss-coil>` model. 
    1111 
    1212Definition 
    1313---------- 
    1414 
    15      *I(q)* = *scale* |cdot| *P(q)* + *background* 
     15     *I(q)* = *scale* |cdot| *I* \ :sub:`0` |cdot| *P(q)* + *background* 
    1616          
    1717where 
    1818 
    19      *scale* = |phi|\ :sub:`poly` |cdot| *V* |cdot| (|rho|\ :sub:`poly` - |rho|\ :sub:`solv`)\  :sup:`2` 
     19     *I*\ :sub:`0` = |phi|\ :sub:`poly` |cdot| *V* |cdot| (|rho|\ :sub:`poly` - |rho|\ :sub:`solv`)\  :sup:`2` 
    2020 
    2121     *P(q)* = 2 [exp(-Z) + Z - 1] / Z \ :sup:`2` 
     
    2828          
    2929Here, |phi|\ :sub:`poly` is the volume fraction of polymer, *V* is the volume of a polymer coil, *M* is the molecular weight of the polymer, *N*\ :sub:`A` is Avogadro's Number, |delta| is the bulk density of the polymer, |rho|\ :sub:`poly` is the sld of the polymer, |rho|\ :sub:`solv` is the sld of the solvent, and *R*\ :sub:`g` is the radius of gyration of the polymer coil. 
    30  
    31 .. figure:: img/mono_gauss_coil_1d.jpg 
    32  
    33     1D plot using the default values. 
    3430 
    3531The 2D scattering intensity is calculated in the same way as the 1D, but where the *q* vector is redefined as 
     
    5955 
    6056#             ["name", "units", default, [lower, upper], "type", "description"], 
    61 parameters =  [["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"]] 
     57parameters =  [["i_zero", "1/cm", 1.0, [-inf, inf], "", "Intensity at q=0"], 
     58               ["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"]] 
    6259 
    6360# NB: Scale and Background are implicit parameters on every model 
     
    6865       inten = 1.0 
    6966    else: 
    70        inten = 2.0 * (exp(-z) + z - 1.0 ) / (z * z) 
     67       inten = i_zero * 2.0 * (exp(-z) + z - 1.0 ) / (z * z) 
    7168    return inten 
    7269Iq.vectorized =  True  # Iq accepts an array of q values 
     
    7875 
    7976demo =  dict(scale = 1.0, 
     77            i_zero = 1.0, 
    8078            radius_gyration = 50.0, 
    8179            background = 0.0) 
  • sasmodels/models/poly_gauss_coil.py

    rf64b154 rbf227cd  
    55 
    66  
    7 .._ poly_gauss_coil: 
    87r""" 
    98This empirical model describes the scattering from *polydisperse* polymer chains in theta solvents or polymer melts, assuming a Schulz-Zimm type molecular weight distribution. 
    109 
    11 To describe the scattering from *monodisperse* polymer chains, see the mono_gauss_coil model. 
     10To describe the scattering from *monodisperse* polymer chains, see the :ref:`mono_gauss_coil <mono-gauss-coil>` model. 
    1211 
    1312Definition 
    1413---------- 
    1514 
    16      *I(q)* = *scale* |cdot| *P(q)* + *background* 
     15     *I(q)* = *scale* |cdot| *I* \ :sub:`0` |cdot| *P(q)* + *background* 
    1716          
    1817where 
    1918 
    20      *scale* = |phi|\ :sub:`poly` |cdot| *V* |cdot| (|rho|\ :sub:`poly` - |rho|\ :sub:`solv`)\ :sup:`2` 
     19     *I*\ :sub:`0` = |phi|\ :sub:`poly` |cdot| *V* |cdot| (|rho|\ :sub:`poly` - |rho|\ :sub:`solv`)\ :sup:`2` 
    2120 
    2221     *P(q)* = 2 [(1 + UZ)\ :sup:`-1/U` + Z - 1] / [(1 + U) Z\ :sup:`2`] 
     
    3130          
    3231Here, |phi|\ :sub:`poly`, is the volume fraction of polymer, *V* is the volume of a polymer coil, *M* is the molecular weight of the polymer, *N*\ :sub:`A` is Avogadro's Number, |delta| is the bulk density of the polymer, |rho|\ :sub:`poly` is the sld of the polymer, |rho|\ :sub:`solv` is the sld of the solvent, and *R*\ :sub:`g` is the radius of gyration of the polymer coil. 
    33  
    34 .. figure:: img/poly_gauss_coil_1d.jpg 
    35  
    36     1D plot using the default values. 
    3732 
    3833The 2D scattering intensity is calculated in the same way as the 1D, but where the *q* vector is redefined as 
     
    6560 
    6661#             ["name", "units", default, [lower, upper], "type", "description"], 
    67 parameters =  [["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"], 
     62parameters =  [["i_zero", "1/cm", 1.0, [-inf, inf], "", "Intensity at q=0"], 
     63               ["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"], 
    6864               ["polydispersity", "None", 2.0, [1.0, inf], "", "Polymer Mw/Mn"]] 
    6965 
     
    7773        z = ((x * radius_gyration) * (x * radius_gyration)) / (1.0 + 2.0 * u) 
    7874        if x == 0: 
    79            inten = 1.0 
     75           inten = i_zero * 1.0 
    8076        else: 
    81            inten = 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z)) 
     77           inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z)) 
    8278        return inten 
    8379Iq.vectorized =  True  # Iq accepts an array of q values 
     
    8985 
    9086demo =  dict(scale = 1.0, 
     87            i_zero = 1.0, 
    9188            radius_gyration = 50.0, 
    9289            polydispersity = 2.0, 
Note: See TracChangeset for help on using the changeset viewer.