polymer  Polymer models¶
PolymerBrush 
Polymer brushes in a solvent 
PolymerMushroom 
Polymer mushrooms in a solvent (volume profile) 
EndTetheredPolymer 
Polymer endtethered to an interface in a solvent 
VolumeProfile 
Generic volume profile function 
layer_thickness 
Return the thickness of a layer given the microslab z points. 
Layer models for polymer systems.
Analytic Selfconsistent Field (SCF) Brush profile[1][2]
Analytical Selfconsistent Field (SCF) Mushroom Profile[3]
Numerical Selfconsistent Field (SCF) EndTethered Polymer Profile[4][5][6]
[1]  Zhulina, EB; Borisov, OV; Pryamitsyn, VA; Birshtein, TM (1991) “CoilGlobule Type Transitions in Polymers. 1. Collapse of Layers of Grafted Polymer Chains”, Macromolecules 24, 140149. 
[2]  Karim, A; Douglas, JF; Horkay, F; Fetters, LJ; Satija, SK (1996) “Comparative swelling of gels and polymer brush layers”, Physica B 221, 331336. doi:10.1016/09214526(95)009469 
[3]  (1, 2) AdamuţiTrache, M., McMullen, W. E. & Douglas, J. F. Segmental concentration profiles of endtethered polymers with excludedvolume and surface interactions. J. Chem. Phys. 105, 4798 (1996). 
[4]  (1, 2) Cosgrove, T., Heath, T., Van Lent, B., Leermakers, F. A. M., & Scheutjens, J. M. H. M. (1987). Configuration of terminally attached chains at the solid/solvent interface: selfconsistent field theory and a Monte Carlo model. Macromolecules, 20(7), 1692–1696. doi:10.1021/ma00173a041 
[5]  (1, 2) De Vos, W. M., & Leermakers, F. A. M. (2009). Modeling the structure of a polydisperse polymer brush. Polymer, 50(1), 305–316. doi:10.1016/j.polymer.2008.10.025 
[6]  (1, 2) Sheridan, R. J., Orski, S. V., Jones, R. L., Satija, S., & Beers, K. L. (2017). Surface interaction parameter measurement of solvated polymers via model endtethered chains. [Submitted] 
[7]  Vincent, B., Edwards, J., Emmett, S., & Croot, R. (1988). Phase separation in dispersions of weaklyinteracting particles in solutions of nonadsorbing polymer. Colloids and Surfaces, 31, 267–298. doi:10.1016/01666622(88)802002 

class
refl1d.polymer.
PolymerBrush
(thickness=0, interface=0, name='brush', polymer=None, solvent=None, base_vf=None, base=None, length=None, power=None, sigma=None)[source]¶ Bases:
refl1d.model.Layer
Polymer brushes in a solvent
Parameters:  thickness
the thickness of the solvent layer
 interface
the roughness of the solvent surface
 polymer
the polymer material
 solvent
the solvent material or vacuum
 base_vf
volume fraction (%) of the polymer brush at the interface
 base
the thickness of the brush interface (A)
 length
the length of the brush above the interface (A)
 power
the rate of brush thinning
 sigma
rms brush roughness (A)
The materials can either use the scattering length density directly, such as PDMS = SLD(0.063, 0.00006) or they can use chemical composition and material density such as PDMS=Material(“C2H6OSi”, density=0.965).
These parameters combine in the following profile formula:
\[\begin{split}V(z) &= \left\{ \begin{array}{ll} V_o & \mbox{if } z <= z_o \\ V_o (1  ((zz_o)/L)^2)^p & \mbox{if } z_o < z < z_o + L \\ 0 & \mbox{if } z >= z_o + L \end{array} \right. \\ V_\sigma(z) &= V(z) \star \frac{e^{\frac{1}{2}(z/\sigma)^2}}{\sqrt{2\pi\sigma^2}} \\ \rho(z) &= \rho_p V_\sigma(z) + \rho_s (1V_\sigma(z))\end{split}\]where \(V_\sigma(z)\) is volume fraction convoluted with brush roughness \(\sigma\) and \(\rho(z)\) is the complex scattering length density of the profile.

constraints
()¶ Constraints

find
(z)¶ Find the layer at depth z.
Returns layer, start, end

interface
= None¶

ismagnetic
¶

layer_parameters
()¶

magnetism
¶

name
= None¶

parameters
()[source]¶ Returns a dictionary of parameters specific to the layer. These will be added to the dictionary containing interface, thickness and magnetism parameters.

penalty
()¶ Return a penalty value associated with the layer. This should be zero if the parameters are valid, and increasing as the parameters become more invalid. For example, if total volume fraction exceeds unity, then the penalty would be the amount by which it exceeds unity, or if z values must be sorted, then penalty would be the amount by which they are unsorted.
Note that penalties are handled separately from any probability of seeing a combination of layer parameters; the final solution to the problem should not include any penalized points.

thickness
= None¶

class
refl1d.polymer.
PolymerMushroom
(thickness=0, interface=0, name='Mushroom', polymer=None, solvent=None, sigma=0, vf=0, delta=0)[source]¶ Bases:
refl1d.model.Layer
Polymer mushrooms in a solvent (volume profile)
Parameters:  delta  real scalar
interaction parameter
 vf  real scalar
not quite volume fraction (dimensionless grafting density)
 sigma  real scalar
convolution roughness (A)
Using analytical SCF methods for gaussian chains, which are scaled by the radius of gyration of the equivalent free polymer as an approximation to results of renormalization group methods.[3]
Solutions are only strictly valid for vf << 1.

constraints
()¶ Constraints

find
(z)¶ Find the layer at depth z.
Returns layer, start, end

interface
= None¶

ismagnetic
¶

layer_parameters
()¶

magnetism
¶

name
= None¶

parameters
()[source]¶ Returns a dictionary of parameters specific to the layer. These will be added to the dictionary containing interface, thickness and magnetism parameters.

penalty
()¶ Return a penalty value associated with the layer. This should be zero if the parameters are valid, and increasing as the parameters become more invalid. For example, if total volume fraction exceeds unity, then the penalty would be the amount by which it exceeds unity, or if z values must be sorted, then penalty would be the amount by which they are unsorted.
Note that penalties are handled separately from any probability of seeing a combination of layer parameters; the final solution to the problem should not include any penalized points.

thickness
= None¶

class
refl1d.polymer.
EndTetheredPolymer
(thickness=0, interface=0, name='EndTetheredPolymer', polymer=None, solvent=None, chi=0, chi_s=0, h_dry=None, l_lat=1, mn=None, m_lat=1, pdi=1, phi_b=0)[source]¶ Bases:
refl1d.model.Layer
Polymer endtethered to an interface in a solvent
Uses a numerical selfconsistent field profile.[4][5][6]
 Parameters
 chi
 solvent interaction parameter
 chi_s
 surface interaction parameter
 h_dry
 thickness of the neat polymer layer
 l_lat
 real length per lattice site
 mn
 Number average molecular weight
 m_lat
 real mass per lattice segment
 pdi
 Dispersity (Polydispersity index)
 phi_b
 volume fraction of free chains in solution. useful for associating grafted films e.g. PSCOOH in Toluene with an SiO2 surface.
 thickness
 Slab thickness should be greater than the contour length of the polymer
 interface
 should be zero
 material
 the polymer material
 solvent
 the solvent material
Previous layer should not have roughness! Use a spline to simulate it.
According to [7], \(l_\text{lat}\) and \(m_\text{lat}\) should be calculated by the formulas:
\[\begin{split}l_\text{lat} &= \frac{a^2 m/l}{p_l} \\ m_\text{lat} &= \frac{(a m/l)^2}{p_l}\end{split}\]where \(l\) is the real polymer’s bond length, \(m\) is the real segment mass, and \(a\) is the ratio between molecular weight and radius of gyration at theta conditions. The lattice persistence, \(p_l\), is:
\[p_l = \frac16 \frac{1+1/Z}{11/Z}\]with coordination number \(Z = 6\) for a cubic lattice, \(p_l = .233\).

constraints
()¶ Constraints

find
(z)¶ Find the layer at depth z.
Returns layer, start, end

interface
= None¶

ismagnetic
¶

layer_parameters
()¶

magnetism
¶

name
= None¶

parameters
()[source]¶ Returns a dictionary of parameters specific to the layer. These will be added to the dictionary containing interface, thickness and magnetism parameters.

penalty
()¶ Return a penalty value associated with the layer. This should be zero if the parameters are valid, and increasing as the parameters become more invalid. For example, if total volume fraction exceeds unity, then the penalty would be the amount by which it exceeds unity, or if z values must be sorted, then penalty would be the amount by which they are unsorted.
Note that penalties are handled separately from any probability of seeing a combination of layer parameters; the final solution to the problem should not include any penalized points.

thickness
= None¶

class
refl1d.polymer.
VolumeProfile
(thickness=0, interface=0, name='VolumeProfile', material=None, solvent=None, profile=None, **kw)[source]¶ Bases:
refl1d.model.Layer
Generic volume profile function
Parameters:  thickness
the thickness of the solvent layer
 interface
the roughness of the solvent surface
 material
the polymer material
 solvent
the solvent material
 profile
the profile function, suitably parameterized
The materials can either use the scattering length density directly, such as PDMS = SLD(0.063, 0.00006) or they can use chemical composition and material density such as PDMS=Material(“C2H6OSi”, density=0.965).
These parameters combine in the following profile formula:
sld = material.sld * profile + solvent.sld * (1  profile)
The profile function takes a depth z and returns a density rho.
For volume profiles, the returned rho should be the volume fraction of the material. For SLD profiles, rho should be complex scattering length density of the material.
Fitting parameters are the available named arguments to the function. The first argument must be z, which is the array of depths at which the profile is to be evaluated. It is guaranteed to be increasing, with step size 2*z[0].
Initial values for the function parameters can be given using name=value. These values can be scalars or fitting parameters. The function will be called with the current parameter values as arguments. The layer thickness can be computed as :func: layer_thickness.

constraints
()¶ Constraints

find
(z)¶ Find the layer at depth z.
Returns layer, start, end

interface
= None¶

ismagnetic
¶

layer_parameters
()¶

magnetism
¶

name
= None¶

parameters
()[source]¶ Returns a dictionary of parameters specific to the layer. These will be added to the dictionary containing interface, thickness and magnetism parameters.

penalty
()¶ Return a penalty value associated with the layer. This should be zero if the parameters are valid, and increasing as the parameters become more invalid. For example, if total volume fraction exceeds unity, then the penalty would be the amount by which it exceeds unity, or if z values must be sorted, then penalty would be the amount by which they are unsorted.
Note that penalties are handled separately from any probability of seeing a combination of layer parameters; the final solution to the problem should not include any penalized points.

thickness
= None¶