.. _sc-paracrystal:

sc_paracrystal
=======================================================

Simple cubic lattice with paracrystalline distortion

=========== ================================= ============ =============
Parameter   Description                       Units        Default value
=========== ================================= ============ =============
scale       Source intensity                  None                     1
background  Source background                 |cm^-1|              0.001
dnn         Nearest neighbor distance         |Ang|                  220
d_factor    Paracrystal distortion factor     None                  0.06
radius      Radius of sphere                  |Ang|                   40
sld         Sphere scattering length density  |1e-6Ang^-2|             3
sld_solvent Solvent scattering length density |1e-6Ang^-2|           6.3
theta       c axis to beam angle              degree                   0
phi         rotation about beam               degree                   0
psi         rotation about c axis             degree                   0
=========== ================================= ============ =============

The returned value is scaled to units of |cm^-1| |sr^-1|, absolute scale.


Calculates the scattering from a **simple cubic lattice** with
paracrystalline distortion. Thermal vibrations are considered to be
negligible, and the size of the paracrystal is infinitely large.
Paracrystalline distortion is assumed to be isotropic and characterized
by a Gaussian distribution.

**Definition**

The scattering intensity $I(q)$ is calculated as

.. math::

    I(q) = \text{scale}\frac{V_\text{lattice}P(q)Z(q)}{V_p} + \text{background}

where scale is the volume fraction of spheres, $V_p$ is the volume of
the primary particle, $V_\text{lattice}$ is a volume correction for the crystal
structure, $P(q)$ is the form factor of the sphere (normalized), and
$Z(q)$ is the paracrystalline structure factor for a simple cubic structure.

Equation (16) of the 1987 reference is used to calculate $Z(q)$, using
equations (13)-(15) from the 1987 paper for Z1, Z2, and Z3.

The lattice correction (the occupied volume of the lattice) for a simple
cubic structure of particles of radius *R* and nearest neighbor separation *D* is

.. math::

    V_\text{lattice}=\frac{4\pi}{3}\frac{R^3}{D^3}

The distortion factor (one standard deviation) of the paracrystal is included
in the calculation of $Z(q)$

.. math::

    \Delta a = gD

where *g* is a fractional distortion based on the nearest neighbor distance.

The simple cubic lattice is

.. figure:: img/sc_crystal_geometry.jpg

For a crystal, diffraction peaks appear at reduced q-values given by

.. math::

    \frac{qD}{2\pi} = \sqrt{h^2+k^2+l^2}

where for a simple cubic lattice any h, k, l are allowed and none are
forbidden. Thus the peak positions correspond to (just the first 5)

.. math::
    :nowrap:

    \begin{align*}
    q/q_0 \quad & \quad 1
                & \sqrt{2} \quad
                & \quad  \sqrt{3} \quad
                & \sqrt{4} \quad
                & \quad \sqrt{5}\quad \\
    Indices \quad & (100)
                  & \quad (110) \quad
                  & \quad (111)
                  & (200) \quad
                  & \quad (210)
    \end{align*}

.. note::

    The calculation of *Z(q)* is a double numerical integral that must be
    carried out with a high density of points to properly capture the sharp
    peaks of the paracrystalline scattering.
    So be warned that the calculation is SLOW. Go get some coffee.
    Fitting of any experimental data must be resolution smeared for any
    meaningful fit. This makes a triple integral. Very, very slow.
    Go get lunch!

The 2D (Anisotropic model) is based on the reference below where *I(q)* is
approximated for 1d scattering. Thus the scattering pattern for 2D may not
be accurate. Note that we are not responsible for any incorrectness of the 2D
model computation.

.. figure:: img/parallelepiped_angle_definition.png

    Orientation of the crystal with respect to the scattering plane, when
    $\theta = \phi = 0$ the $c$ axis is along the beam direction (the $z$ axis).


.. figure:: img/sc_paracrystal_autogenfig.png

    1D and 2D plots corresponding to the default parameters of the model.

**Reference**
Hideki Matsuoka et. al. *Physical Review B,* 36 (1987) 1754-1765
(Original Paper)

Hideki Matsuoka et. al. *Physical Review B,* 41 (1990) 3854 -3856
(Corrections to FCC and BCC lattice structure calculation)


