Skip to content

Commit

Permalink
next round of edits for nematic examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-waltmann committed Feb 1, 2024
1 parent 2cf8758 commit 1852c8c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 36 deletions.
2 changes: 1 addition & 1 deletion examples/Smectic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6090,7 +6090,7 @@
"$$\n",
"P(d) = \\frac{1}{N} \\sum_j^N \\exp( \\frac{2\\pi i}{d} \\mathbf{n} \\cdot \\mathbf{r}_j) (6),\n",
"$$\n",
"where $d$ is the layer distance, $N$ is the number of particles and $\\mathbf{r}$ is the position of particle. Because of the cyclial nature of complex exponentials, $P$ reaches a global maximum at specific values of the layer distance $d$. To find a value of $d$ which gives perfect smectic order, we maximize $P$ as a function of $d$. The code in the block below demonstrates this process. (A good introduction in how to compute smectic order parameters can be found in appendix of [this work](https://pubs.aip.org/aip/jcp/article/138/20/204901/566257/An-atomistic-description-of-the-nematic-and).)"
"where $d$ is the layer distance, $N$ is the number of particles, $\\mathbf{n}$ is the nematic director, and $\\mathbf{r}$ is the position of particle. For more information on computing smectic order parameters, see the appendix of [this work](https://pubs.aip.org/aip/jcp/article/138/20/204901/566257/An-atomistic-description-of-the-nematic-and). Because of the cyclial nature of complex exponentials, $P$ reaches a global maximum at specific values of the layer distance $d$. To find a value of $d$ which gives perfect smectic order, we maximize $P$ as a function of $d$. The code in the block below demonstrates this process."
]
},
{
Expand Down
83 changes: 48 additions & 35 deletions module_intros/order.Nematic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,66 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# freud.order.Nematic: Nematic tensor and nematic order parameters"
"# freud.order.Nematic: Nematic Order Parameter and the Nematic Tensor"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# The nematic order parameter\n",
"# The Nematic Order Parameter\n",
"\n",
"The freud.order.Nematic is designed to identify and analyze order in anisotropic particle systems. These systems are often seen in the realm of soft matter physics, where identifying the degree of order can have substantial implications for the material's properties. But, what does it mean for a system to be ordered?\n",
"The nematic order parameter is designed to identify and analyze orientational order in anisotropic particle systems. These systems are often seen in soft matter physics, where identifying the degree of order can have substantial implications for material properties. But, what does it mean for a system to have orientational order?\n",
"\n",
"If we think of a system of particles, the most disordered state is one where particles are randomly positioned and oriented. On the other end of the spectrum, a perfectly ordered state might be one where all particles align along a common direction. The Nematic order parameter serves as a measure of this order, quantifying how well the particles in the system align with a common direction, termed as the \"nematic director\".\n",
"The most orientationally disordered state of a system of particles is one where particle orientations are completely random. By contrast, a state with perfect orientational order exists when all particles are aligned in a common direction. The Nematic order parameter serves as a measure of this order, quantifying how well the particles in the system align with a common direction, termed the \"nematic director\".\n",
"\n",
"The order parameter varies from 0, representing completely random orientations (isotropic phase), to 1, indicating perfect alignment (nematic phase). This transition from isotropic to nematic phase, and its quantification, is crucial in understanding various physical properties of the system. Typical ranges for values of nematic order parameter for disordered phase are between 0 and 0.3, for nematic phase (such as liquid crystal) 0.3 to 0.8, and everything above is usually highly ordered crystalline phase. Note that these values are just guidelines and by no means are these values strict boundaries (see [Wikipedia](https://en.wikipedia.org/wiki/Liquid_crystal) for more info).\n",
"\n",
"# Introduction to mathematical details of nematic OP\n",
"The nematic order parameter is a scalar value between 0 and 1. A value between 0 and 0.3 describes the disordered phase, where orientations are completely random. A value between 0.3 and 0.8 describes the nematic (liquid crystal) phase, where orientational order begins to emerge. Finally, a value between 0.8 and 1.0 describes the crystalline phase, where orientations are highly ordered. The boundary values described above are guidelines rather than strict boundaries and for more information, please see [Wikipedia](https://en.wikipedia.org/wiki/Liquid_crystal)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calculating the Nematic Order Parameter\n",
"\n",
"The nematic tensor, 𝐐, is used to detect orientational order in anisotropic particle systems. For a given probability distribution, $f(\\mathbf{m})$, of particle orientations in 3D, it can be defined by first considering a weighted integral over the outer product of vectors tangent to the partcicles. The resulting second-order tensor, 𝐌, which is symmetric and semidefinite positive, is defined as\n",
"The nematic order parameter $S$ is defined via the eigenvalues of the nematic tensor 𝐐. The nematic tensor is defined as\n",
"\n",
"$$\n",
"\\mathbf{M} = \\int_{\\mathcal{B}} (\\mathbf{m} \\otimes \\mathbf{m}) f(\\mathbf{m}) d\\sigma(\\mathbf{m}) \\quad (1)\n",
"\\mathbf{Q} = \\mathbf{M} - \\frac{1}{3} \\mathbf{I}\n",
"$$\n",
"\n",
"where $\\mathbf{m}$ is the $\\textit{molecular axis}$ (i.e. the vector tangent to a particle's principal axis) and $\\mathcal{B}$ is the unit hemisphere. 𝐐 is defined by the traceless tensor:\n",
"where $\\mathbf{M}$ is the integral of the outer product of vectors $\\mathbf{m}$ describing particle orientations weighted by the probability distribution $f(\\mathbf{m})$ of particle orientations in 3D, taken over the unit hemisphere $\\mathcal{B}$\n",
"\n",
"$$\n",
"\\mathbf{Q} = \\mathbf{M} - \\frac{1}{3} \\mathbf{I} \\quad (2)\n",
"\\mathbf{M} = \\int_{\\mathcal{B}} (\\mathbf{m} \\otimes \\mathbf{m}) f(\\mathbf{m}) d\\sigma(\\mathbf{m}).\n",
"$$\n",
"\n",
"where 𝐈 is the identity matrix. This shift by negative 𝐈 is to ensure that the value of the scalar parameter, defined below, is 0 for random orientations. For uniaxial systems, 𝐐 may also be written in terms of the $\\textit{nematic director}$ ($\\mathbf{n}$), which is the principal direction of alignment in the system. (For a more detailed account of the nematic tensor, and the extension of this to biaxial systems, see Section I of [Mottram and Newton](https://strathprints.strath.ac.uk/50668/1/1409.3542v2.pdf).)\n",
"In other words, the elements of the $3 \\times 3$ matrix $\\mathbf{M}$ are computed by taking the particle orientation vectors $\\mathbf{m}^{(i)}$, multiplying the components together, and summing over all particles in the system.\n",
"\n",
"$$\n",
"\\mathbf{Q} = S (\\mathbf{n} \\otimes \\mathbf{n} - \\frac{1}{3} \\mathbf{I}) \\quad (3)\n",
"\\mathbf{M}_{\\alpha\\beta} = \\sum_{i=1}^{N} \\mathbf{m}^{(i)}_{\\alpha} \\mathbf{m}^{(i)}_{\\beta}.\n",
"$$\n",
"\n",
"Here, the scalar order parameter, S, is defined as:\n",
"The eigenvalues of $Q$ are $\\frac{2}{3}S, -\\frac{1}{3}S, -\\frac{1}{3}S$ and the eigenvector associated with the largest eignevalue is called the nematic director $\\mathbf{n}$. The nematic director is the principal direction of alignment in the system and defines the direction of orientational order. If known ahead of time, $S$ can be defined via $\\mathbf{n}$ as\n",
"\n",
"$$\n",
"S = \\frac{1}{2} \\int_{\\mathcal{B}} (3\\cos^2 \\beta - 1) \\quad (4)\n",
"S = \\frac{1}{2} \\int_{\\mathcal{B}} (3\\cos^2 \\beta - 1),\n",
"$$\n",
"\n",
"where $\\beta$ is the angle between the molecular axis and nematic director. Whilst the nematic director is used to charaterise the direction of orientational order, S characterises its magnitude and varies from 0 to 1 during the isotropic to nematic phase transition. As noted in [Turzi](https://pubs.aip.org/aip/jmp/article/52/5/053517/232507/On-the-Cartesian-definition-of-orientational-order) the eigenvalues of $Q$ are $\\frac{2}{3}S$ which is associated with the eigenvector which is the nematic director $\\mathbf{n}$, and doubly degenerate eigenvalues $-\\frac{1}{3}S$, provided there is no biaxial phase. The values of interest, the nematic director $\\mathbf{n}$ and $S$, can be identified as the eigenvalue whose sign is different from other eigenvalues, or is the maximum eigenvalue, and it's eigenvector.\n",
"\n"
"where $\\mathcal{B}$ is the angle between the molecular axis $\\mathbf{m}$ and the nematic director. The nematic tensor can further be defined as\n",
"\n",
"$$\n",
"\\mathbf{Q} = S (\\mathbf{n} \\otimes \\mathbf{n} - \\frac{1}{3} \\mathbf{I}).\n",
"$$"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example on a disordered system\n",
"We start by considering a random system of particles with random\n",
"orientations and positions. Naturally, the nematic order parameter\n",
"should be zero for such a particle orientation set. Let's see how to\n",
"calculate this using freud. The compute method takes orientation vectors\n",
"of particles as input."
"# Example 1: A Disordered System\n",
"\n",
"We start by considering a system of particles with random orientations and positions, where the nematic order parameter should be zero. The code snippet below demonstrates how to use freud to compute the nematic order parameter:"
]
},
{
Expand Down Expand Up @@ -5407,11 +5410,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As we can see the calculated nematic order parameter is very close to zero indicating that there is no order in the orientation of the particles. This makes sense given, that orientations were generated randomly. \n",
"\n",
"# Liquid crystal in a nematic phase\n",
"The calculated nematic order parameter is very close to zero indicating that there is no order in the orientation of the particles. This makes sense because the orientations were generated randomly. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" # Example 2: Liquid Crystal in the Nematic Phase\n",
"\n",
"Nematic phase is defined as a phase in which the value of the nematic order parameter in the range between 0.3 and 0.7. The positions are disordered, but the orientations show some order in the preferred direction dictated by the director."
"In the nematic phase, particle orientations show some degree of alignment in the direction of the nematic director. The code block below demonstrates uses freud to compute the nematic order parameter for a system in the nematic phase:"
]
},
{
Expand Down Expand Up @@ -11063,9 +11071,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The nematic order parameter is now around 0.5 meaning that there is a preferred direction of orientations of particles in our system.\n",
"The nematic order parameter is now around 0.5 meaning that there is a preferred direction of particle orientations. The blue arrow in the above plot is the nematic director, which defines this orientation."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 3: Different Degrees of Orientational Order\n",
"\n",
"To establish how the nematic order parameter changes with more or less randomization of the system we construct a series of system snapshots with slowly increasing degrees of randomization of orientations."
"To establish how the nematic order parameter changes with the degree of orientational alignment, we now show a series of systems with increasing degrees of orientational disorder."
]
},
{
Expand Down Expand Up @@ -31518,9 +31533,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As we can see more randomization brings us closer to a disordered state, meaning that the nematic order parameter is dropping towards zero. \n",
"\n",
"And finally we confirm that perfectly ordered system gives the nematic order parameter of 1."
"Finally, we confirm the perfectly ordered system has a nematic order parameter of 1."
]
},
{
Expand Down Expand Up @@ -36922,7 +36935,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 1852c8c

Please sign in to comment.