Changeset 2d81cfe in sasmodels for sasmodels/models/polymer_micelle.py


Ignore:
Timestamp:
Nov 29, 2017 1:13:23 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
237b800f
Parents:
a839b22
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/polymer_micelle.py

    rca04add r2d81cfe  
    1313the equations given by Pedersen (Pedersen, 2000), summarised briefly here. 
    1414 
    15 The micelle core is imagined as $N\_aggreg$ polymer heads, each of volume $v\_core$, 
    16 which then defines a micelle core of $radius\_core$, which is a separate parameter 
    17 even though it could be directly determined. 
    18 The Gaussian random coil tails, of gyration radius $rg$, are imagined uniformly 
    19 distributed around the spherical core, centred at a distance $radius\_core + d\_penetration.rg$ 
    20 from the micelle centre, where $d\_penetration$ is of order unity. 
    21 A volume $v\_corona$ is defined for each coil. 
    22 The model in detail seems to separately parametrise the terms for the shape of I(Q) and the 
    23 relative intensity of each term, so use with caution and check parameters for consistency. 
    24 The spherical core is monodisperse, so it's intensity and the cross terms may have sharp 
    25 oscillations (use q resolution smearing if needs be to help remove them). 
     15The micelle core is imagined as $N$ = *n_aggreg* polymer heads, each of volume 
     16$V_\text{core}$, which then defines a micelle core of radius $r$ = *r_core*, 
     17which is a separate parameter even though it could be directly determined. 
     18The Gaussian random coil tails, of gyration radius $R_g$, are imagined 
     19uniformly distributed around the spherical core, centred at a distance 
     20$r + d \cdot R_g$ from the micelle centre, where $d$ = *d_penetration* is 
     21of order unity. A volume $V_\text{corona}$ is defined for each coil. The 
     22model in detail seems to separately parametrise the terms for the shape 
     23of $I(Q)$ and the relative intensity of each term, so use with caution 
     24and check parameters for consistency. The spherical core is monodisperse, 
     25so it's intensity and the cross terms may have sharp oscillations (use $q$ 
     26resolution smearing if needs be to help remove them). 
    2627 
    2728.. math:: 
    28     P(q) = N^2\beta^2_s\Phi(qR)^2+N\beta^2_cP_c(q)+2N^2\beta_s\beta_cS_{sc}s_c(q)+N(N-1)\beta_c^2S_{cc}(q) \\ 
    29     \beta_s = v\_core(sld\_core - sld\_solvent) \\ 
    30     \beta_c = v\_corona(sld\_corona - sld\_solvent) 
     29    P(q) &= N^2\beta^2_s\Phi(qr)^2 + N\beta^2_cP_c(q) 
     30            + 2N^2\beta_s\beta_cS_{sc}s_c(q) + N(N-1)\beta_c^2S_{cc}(q) \\ 
     31    \beta_s &= V_\text{core}(\rho_\text{core} - \rho_\text{solvent}) \\ 
     32    \beta_c &= V_\text{corona}(\rho_\text{corona} - \rho_\text{solvent}) 
    3133 
    32 where $N = n\_aggreg$, and for the spherical core of radius $R$ 
     34where $\rho_\text{core}$, $\rho_\text{corona}$ and $\rho_\text{solvent}$ are 
     35the scattering length densities *sld_core*, *sld_corona* and *sld_solvent*. 
     36For the spherical core of radius $r$ 
    3337 
    3438.. math:: 
    35    \Phi(qR)= \frac{\sin(qr) - qr\cos(qr)}{(qr)^3} 
     39   \Phi(qr)= \frac{\sin(qr) - qr\cos(qr)}{(qr)^3} 
    3640 
    3741whilst for the Gaussian coils 
     
    4246   Z &= (q R_g)^2 
    4347 
    44 The sphere to coil ( core to corona) and coil to coil (corona to corona) cross terms are 
    45 approximated by: 
     48The sphere to coil (core to corona) and coil to coil (corona to corona) cross 
     49terms are approximated by: 
    4650 
    4751.. math:: 
    4852 
    49    S_{sc}(q)=\Phi(qR)\psi(Z)\frac{sin(q(R+d.R_g))}{q(R+d.R_g)} \\ 
    50    S_{cc}(q)=\psi(Z)^2\left[\frac{sin(q(R+d.R_g))}{q(R+d.R_g)} \right ]^2 \\ 
    51    \psi(Z)=\frac{[1-exp^{-Z}]}{Z} 
     53   S_{sc}(q) &= \Phi(qr)\psi(Z) 
     54       \frac{\sin(q(r+d \cdot R_g))}{q(r+d \cdot R_g)} \\ 
     55   S_{cc}(q) &= \psi(Z)^2 
     56       \left[\frac{\sin(q(r+d \cdot R_g))}{q(r+d \cdot R_g)} \right]^2 \\ 
     57   \psi(Z) &= \frac{[1-\exp^{-Z}]}{Z} 
    5258 
    5359Validation 
    5460---------- 
    5561 
    56 $P(q)$ above is multiplied by $ndensity$, and a units conversion of 10^{-13}, so $scale$ 
    57 is likely 1.0 if the scattering data is in absolute units. This model has not yet been 
    58 independently validated. 
     62$P(q)$ above is multiplied by *ndensity*, and a units conversion of $10^{-13}$, 
     63so *scale* is likely 1.0 if the scattering data is in absolute units. This 
     64model has not yet been independently validated. 
    5965 
    6066 
     
    6369 
    6470J Pedersen, *J. Appl. Cryst.*, 33 (2000) 637-640 
    65  
    6671""" 
    6772 
     73import numpy as np 
    6874from numpy import inf, pi 
    6975 
     
    102108 
    103109def random(): 
    104     import numpy as np 
    105110    radius_core = 10**np.random.uniform(1, 3) 
    106111    rg = radius_core * 10**np.random.uniform(-2, -0.3) 
Note: See TracChangeset for help on using the changeset viewer.