# Maier-Saupe

## Description:

Maier-Saupe dispersion for orientation

$w(\theta) = e^{a{\cos^2 \theta}}$

This provides a close match to the gaussian distribution for low angles, but the tails are limited to $\pm 90^\circ$. For $a \ll 1$ the distribution is approximately uniform. The usual polar coordinate projection applies, with $\theta$ weights scaled by $\cos \theta$ and $\phi$ weights unscaled.

This is equivalent to a cyclic gaussian distribution $w(\theta) = e^{-sin^2(\theta)/(2/a^2)}$.

Note that the incorrect distribution is used for $a=0$. With the distribution parameter labelled as width, the value width=0 is is assumed to be completely oriented and no polydispersity distribution is generated. However a value of $a=0$ should be completely unoriented. Any small value (e.g., 0.01 or lower) should suffice.

The order parameter $P_2$ is defined as

$P(a, \beta) = \frac{e^{a \cos^2 \beta}}{4\pi \int_0^{\pi/2} e^{a \cos^2 \beta} \sin \beta\,d\beta}$

$P_2 = 4\pi \int_0^{\pi/2} \frac{3 \cos^2 \beta - 1)}{2}P(a, \beta) \sin \beta\,d\beta$

where $a$ is the distribution width $\sigma$ handed to the weights function.

There is a somewhat complicated closed form solution

$P_2 = \frac{3e^a}{2\sqrt{\pi a} E_a} - \frac{3}{4a} - \frac{1}{2}$

where $E_a = \mathrm{erfi}(\sqrt{a})$ is the imaginary error function, which can be coded in python as::

----
from numpy import pi, sqrt, exp
from scipy.special import erfi

def P_2(a):
# protect against overflow with a Taylor series at infinity
if a <= 700:
r = exp(a)/sqrt(pi*a)/erfi(sqrt(a))
else:
r = 1/((((6.5525/a + 1.875)/a + 0.75)/a + 0.5)/a + 1)
return 1.5*r - 0.75/a - 0.5
----

Given an order parameter $S = P_2(a)$, one can also solve for the equivalent $a$:

----
from scipy.optimize import fsolve

def P_2_inv(S):
return fsolve(lambda x: P_2(x) - S, 1.0)[0]
----

References
[1] Hardouin, et al., 1995. SANS study of a semiflexible main chain liquid crystalline polyether. Macromolecules 28, 5427-5433.

Distribution coded by P Kienzle.

## Details:

 Created By smk78 Uploaded Nov. 3, 2021, 2:23 p.m. Category Distributions Score 0 Verified This model has not been verified by a member of the SasView team In Library This model is not currently included in the SasView library. You must download the files and install it yourself. Files maier_saupe.py