Order Module¶
Overview
freud.order.CubaticOrderParameter |
Compute the cubatic order parameter [HajiAkbari2015] for a system of particles using simulated annealing instead of Newton-Raphson root finding. |
freud.order.NematicOrderParameter |
Compute the nematic order parameter for a system of particles. |
freud.order.HexOrderParameter |
Calculates the \(k\)-atic order parameter for each particle in the system. |
freud.order.TransOrderParameter |
Compute the translational order parameter for each particle. |
freud.order.LocalQl |
Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(Q_l\) [Lechner2008] order parameter for a set of points. |
freud.order.LocalQlNear |
Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(Q_l\) order parameter [Lechner2008] for a set of points. |
freud.order.LocalWl |
Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(W_l\) order parameter [Lechner2008] for a set of points. |
freud.order.LocalWlNear |
Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(W_l\) order parameter [Lechner2008] for a set of points. |
freud.order.SolLiq |
Computes dot products of \(Q_{lm}\) between particles and uses these for clustering. |
freud.order.SolLiqNear |
Computes dot products of \(Q_{lm}\) between particles and uses these for clustering. |
freud.order.BondOrder |
|
freud.order.LocalDescriptors |
|
freud.order.MatchEnv |
|
freud.order.Pairing2D |
|
freud.order.AngularSeparation |
Details
The order module contains functions which compute order parameters for the whole system or individual particles. Order parameters take bond order data and interpret it in some way to quantify the degree of order in a system using a scalar value. This is often done through computing spherical harmonics of the bond order diagram, which are the spherical analogue of Fourier Transforms.
-
class
freud.order.
CubaticOrderParameter
(t_initial, t_final, scale, n_replicates, seed)¶ Compute the cubatic order parameter [HajiAkbari2015] for a system of particles using simulated annealing instead of Newton-Raphson root finding.
Module author: Eric Harper <harperic@umich.edu>
Parameters: -
compute
(self, orientations)¶ Calculates the per-particle and global order parameter.
Parameters: orientations ((\(N_{particles}\), 4) numpy.ndarray
) – Orientations as angles to use in computation.
-
get_cubatic_order_parameter
(self)¶ Get cubatic order parameter.
Returns: Cubatic order parameter. Return type: float
-
get_cubatic_tensor
(self)¶ Get cubatic tensor.
Returns: Rank 4 tensor corresponding to cubatic tensor. Return type: \(\left(3, 3, 3, 3 \right)\) numpy.ndarray
-
get_gen_r4_tensor
(self)¶ Get R4 Tensor.
Returns: Rank 4 tensor corresponding to each individual particle orientation. Return type: \(\left(3, 3, 3, 3 \right)\) numpy.ndarray
-
get_global_tensor
(self)¶ Get global tensor.
Returns: Rank 4 tensor corresponding to global orientation. Return type: \(\left(3, 3, 3, 3 \right)\) numpy.ndarray
-
get_orientation
(self)¶ Get orientations.
Returns: Orientation of global orientation. Return type: \(\left(4 \right)\) numpy.ndarray
-
get_particle_op
(self)¶ Get per-particle order parameter.
Returns: Cubatic order parameter. Return type: np.ndarray
-
get_particle_tensor
(self)¶ Get per-particle cubatic tensor.
Returns: Rank 5 tensor corresponding to each individual particle orientation. Return type: \(\left(N_{particles}, 3, 3, 3, 3 \right)\) numpy.ndarray
-
-
class
freud.order.
NematicOrderParameter
(u)¶ Compute the nematic order parameter for a system of particles.
Module author: Jens Glaser <jsglaser@umich.edu>
New in version 0.7.0.
Parameters: u (\(\left(3 \right)\) numpy.ndarray
) – The nematic director of a single particle in the reference state (without any rotation applied).-
compute
(self, orientations)¶ Calculates the per-particle and global order parameter.
Parameters: orientations (\(\left(N_{particles}, 4 \right)\) numpy.ndarray
) – Orientations to calculate the order parameter.
-
get_director
(self)¶ The director (eigenvector corresponding to the order parameter).
Returns: The average nematic director. Return type: \(\left(3 \right)\) numpy.ndarray
-
get_nematic_order_parameter
(self)¶ The nematic order parameter.
Returns: Nematic order parameter. Return type: float
-
get_nematic_tensor
(self)¶ The nematic Q tensor.
Returns: 3x3 matrix corresponding to the average particle orientation. Return type: \(\left(3, 3 \right)\) numpy.ndarray
-
get_particle_tensor
(self)¶ The full per-particle tensor of orientation information.
Returns: 3x3 matrix corresponding to each individual particle orientation. Return type: \(\left(N_{particles}, 3, 3 \right)\) numpy.ndarray
-
-
class
freud.order.
HexOrderParameter
(rmax, k, n)¶ Calculates the \(k\)-atic order parameter for each particle in the system.
The \(k\)-atic order parameter for a particle \(i\) and its \(n\) neighbors \(j\) is given by:
\(\psi_k \left( i \right) = \frac{1}{n} \sum_j^n e^{k i \phi_{ij}}\)
The parameter \(k\) governs the symmetry of the order parameter while the parameter \(n\) governs the number of neighbors of particle \(i\) to average over. \(\phi_{ij}\) is the angle between the vector \(r_{ij}\) and \(\left( 1,0 \right)\).
Note
2D:
freud.cluster.Cluster
properly handles 2D boxes. The points must be passed in as[x, y, 0]
. Failing to set z=0 will lead to undefined behavior.Module author: Eric Harper <harperic@umich.edu>
Parameters: - rmax (float) – +/- r distance to search for neighbors.
- k (unsigned int) – Symmetry of order parameter (\(k=6\) is hexatic).
- n (unsigned int) – Number of neighbors (\(n=k\) if \(n\) not specified).
Variables: - psi (\(\left(N_{particles} \right)\)
numpy.ndarray
) – Order parameter. - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
- k (unsigned int) – Symmetry of the order parameter.
-
compute
(self, box, points, nlist=None)¶ Calculates the correlation function and adds to the current histogram.
Parameters: - box (
freud.box.Box
) – Simulation box. - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
) – Neighborlist to use to find bonds.
- box (
-
getBox
(self)¶ Get the box used in the calculation.
Returns: freud Box. Return type: freud.box.Box
-
getK
(self)¶ Get the symmetry of the order parameter.
Returns: \(k\). Return type: unsigned int
-
getNP
(self)¶ Get the number of particles.
Returns: \(N_{particles}\). Return type: unsigned int
-
getPsi
(self)¶ Get the order parameter.
Returns: Order parameter. Return type: \(\left(N_{particles} \right)\) numpy.ndarray
-
class
freud.order.
TransOrderParameter
(rmax, k, n)¶ Compute the translational order parameter for each particle.
Module author: Michael Engel <engelmm@umich.edu>
Parameters: Variables: - d_r (\(\left(N_{particles}\right)\)
numpy.ndarray
) – Reference to the last computed translational order array. - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
-
compute
(self, box, points, nlist=None)¶ Calculates the local descriptors.
Parameters: - box (
freud.box.Box
) – Simulation box. - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
) – Neighborlist to use to find bonds.
- box (
-
getBox
(self)¶ Get the box used in the calculation.
Returns: freud Box. Return type: freud.box.Box
-
getDr
(self)¶ Get a reference to the last computed spherical harmonic array.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getNP
(self)¶ Get the number of particles.
Returns: \(N_{particles}\). Return type: unsigned int
- d_r (\(\left(N_{particles}\right)\)
-
class
freud.order.
LocalQl
(box, rmax, l, rmin)¶ Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(Q_l\) [Lechner2008] order parameter for a set of points.
Implements the local rotationally invariant \(Q_l\) order parameter described by Steinhardt. For a particle i, we calculate the average \(Q_l\) by summing the spherical harmonics between particle \(i\) and its neighbors \(j\) in a local region: \(\overline{Q}_{lm}(i) = \frac{1}{N_b} \displaystyle\sum_{j=1}^{N_b} Y_{lm}(\theta(\vec{r}_{ij}), \phi(\vec{r}_{ij}))\).
This is then combined in a rotationally invariant fashion to remove local orientational order as follows: \(Q_l(i)=\sqrt{\frac{4\pi}{2l+1} \displaystyle\sum_{m=-l}^{l} |\overline{Q}_{lm}|^2 }\).
Added first/second shell combined average \(Q_l\) order parameter for a set of points:
- Variation of the Steinhardt \(Q_l\) order parameter
- For a particle i, we calculate the average \(Q_l\) by summing the spherical harmonics between particle i and its neighbors j and the neighbors k of neighbor j in a local region.
Module author: Xiyu Du <xiyudu@umich.edu>
Module author: Vyas Ramasubramani <vramasub@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near the first minimum of the RDF are recommended.
- l (unsigned int) – Spherical harmonic quantum number l. Must be a positive number.
- rmin (float) – Can look at only the second shell or some arbitrary RDF region.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
- Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle (filled with NaN for particles with no neighbors). - norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors).
-
compute
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeAve
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeAveNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
getAveQl
(self)¶ Get a reference to the last computed \(Q_l\) for each particle. Returns NaN instead of \(Q_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getBox
(self)¶ Get the box used in the calculation.
Returns: freud Box. Return type: freud.box.Box
-
getNP
(self)¶ Get the number of particles.
Returns: \(N_{particles}\). Return type: unsigned int
-
getQl
(self)¶ Get a reference to the last computed \(Q_l\) for each particle. Returns NaN instead of \(Q_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getQlAveNorm
(self)¶ Get a reference to the last computed \(Q_l\) for each particle. Returns NaN instead of \(Q_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getQlNorm
(self)¶ Get a reference to the last computed \(Q_l\) for each particle. Returns NaN instead of \(Q_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
setBox
(self, box)¶ Reset the simulation box.
Parameters: box ( freud.box.Box
) – Simulation box.
-
class
freud.order.
LocalQlNear
(box, rmax, l, kn)¶ Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(Q_l\) order parameter [Lechner2008] for a set of points.
Implements the local rotationally invariant \(Q_l\) order parameter described by Steinhardt. For a particle i, we calculate the average \(Q_l\) by summing the spherical harmonics between particle \(i\) and its neighbors \(j\) in a local region: \(\overline{Q}_{lm}(i) = \frac{1}{N_b} \displaystyle\sum_{j=1}^{N_b} Y_{lm}(\theta(\vec{r}_{ij}), \phi(\vec{r}_{ij}))\)
This is then combined in a rotationally invariant fashion to remove local orientational order as follows: \(Q_l(i)=\sqrt{\frac{4\pi}{2l+1} \displaystyle\sum_{m=-l}^{l} |\overline{Q}_{lm}|^2 }\)
Added first/second shell combined average \(Q_l\) order parameter for a set of points:
- Variation of the Steinhardt \(Q_l\) Order parameter.
- For a particle i, we calculate the average \(Q_l\) by summing the spherical harmonics between particle i and its neighbors j and the neighbors k of neighbor j in a local region.
Module author: Xiyu Du <xiyudu@umich.edu>
Module author: Vyas Ramasubramani <vramasub@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near the first minimum of the RDF are recommended.
- l (unsigned int) – Spherical harmonic quantum number l. Must be a positive number.
- kn (unsigned int) – Number of nearest neighbors. must be a positive integer.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
- Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle (filled with NaN for particles with no neighbors). - norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors).
-
computeAve
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeAveNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
class
freud.order.
LocalWl
(box, rmax, l)¶ Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(W_l\) order parameter [Lechner2008] for a set of points.
Implements the local rotationally invariant \(W_l\) order parameter described by Steinhardt that can aid in distinguishing between FCC, HCP, and BCC.
Added first/second shell combined average \(W_l\) order parameter for a set of points:
- Variation of the Steinhardt \(W_l\) order parameter.
- For a particle i, we calculate the average \(W_l\) by summing the spherical harmonics between particle i and its neighbors j and the neighbors k of neighbor j in a local region.
Module author: Xiyu Du <xiyudu@umich.edu>
Module author: Vyas Ramasubramani <vramasub@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near the first minimum of the RDF are recommended.
- l (unsigned int) – Spherical harmonic quantum number l. Must be a positive number
- rmin (float) – Lower bound for computing the local order parameter. Allows looking at, for instance, only the second shell, or some other arbitrary RDF region.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
- Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle (filled with NaN for particles with no neighbors). - norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(W_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{W}_l\) for each particle (filled with NaN for particles with no neighbors). - norm_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(W_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{W}_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors).
-
getAveWl
(self)¶ Get a reference to the last computed \(W_l\) for each particle. Returns NaN instead of \(W_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getWl
(self)¶ Get a reference to the last computed \(W_l\) for each particle. Returns NaN instead of \(W_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getWlAveNorm
(self)¶ Get a reference to the last computed \(W_l\) for each particle. Returns NaN instead of \(W_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getWlNorm
(self)¶ Get a reference to the last computed \(W_l\) for each particle. Returns NaN instead of \(W_l\) for particles with no neighbors.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
class
freud.order.
LocalWlNear
(box, rmax, l, kn)¶ Compute the local Steinhardt [Steinhardt1983] rotationally invariant \(W_l\) order parameter [Lechner2008] for a set of points.
Implements the local rotationally invariant \(W_l\) order parameter described by Steinhardt that can aid in distinguishing between FCC, HCP, and BCC.
Added first/second shell combined average \(W_l\) order parameter for a set of points:
- Variation of the Steinhardt \(W_l\) order parameter.
- For a particle i, we calculate the average \(W_l\) by summing the spherical harmonics between particle i and its neighbors j and the neighbors k of neighbor j in a local region.
Module author: Xiyu Du <xiyudu@umich.edu>
Module author: Vyas Ramasubramani <vramasub@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near the first minimum of the RDF are recommended.
- l (unsigned int) – Spherical harmonic quantum number l. Must be a positive number
- kn (unsigned int) – Number of nearest neighbors. Must be a positive number.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - num_particles (unsigned int) – Number of particles.
- Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle (filled with NaN for particles with no neighbors). - norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Ql (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{Q_l}\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(W_l\) for each particle (filled with NaN for particles with no neighbors). - ave_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{W}_l\) for each particle (filled with NaN for particles with no neighbors). - norm_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(W_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors). - ave_norm_Wl (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(\bar{W}_l\) for each particle normalized by the value over all particles (filled with NaN for particles with no neighbors).
-
computeAve
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeAveNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
class
freud.order.
SolLiq
(box, rmax, Qthreshold, Sthreshold, l)¶ SolLiq(box, rmax, Qthreshold, Sthreshold, l)
Computes dot products of \(Q_{lm}\) between particles and uses these for clustering.
Module author: Richmond Newman <newmanrs@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near first minimum of the RDF are recommended.
- Qthreshold (float) – Value of dot product threshold when evaluating \(Q_{lm}^*(i) Q_{lm}(j)\) to determine if a neighbor pair is a solid-like bond. (For \(l=6\), 0.7 generally good for FCC or BCC structures).
- Sthreshold (unsigned int) – Minimum required number of adjacent solid-link bonds for a particle to be considered solid-like for clustering. (For \(l=6\), 6-8 is generally good for FCC or BCC structures).
- l (unsigned int) – Choose spherical harmonic \(Q_l\). Must be positive and even.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - largest_cluster_size (unsigned int) – The largest cluster size. Must call a compute method first.
- cluster_sizes (unsigned int) – The sizes of all clusters.
- largest_cluster_size – The largest cluster size. Must call a compute method first.
- Ql_mi (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_{lmi}\) for each particle. - clusters (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed set of solid-like cluster indices for each particle. - num_connections (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The number of connections per particle. - Ql_dot_ij (\(\left(N_{particles}\right)\)
numpy.ndarray
) – Reference to the qldot_ij values. - num_particles (unsigned int) – Number of particles.
-
compute
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeSolLiqNoNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
computeSolLiqVariant
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
, optional) – Neighborlist to use to find bonds (Default value = None).
- points ((\(N_{particles}\), 3)
-
getBox
(self)¶ Get the box used in the calculation.
Returns: freud Box. Return type: freud.box.Box
-
getClusterSizes
(self)¶ Return the sizes of all clusters.
Returns: The cluster sizes. Return type: \(\left(N_{clusters}\right)\) numpy.ndarray
-
getClusters
(self)¶ Get a reference to the last computed set of solid-like cluster indices for each particle.
Returns: Clusters. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getLargestClusterSize
(self)¶ Returns the largest cluster size. Must call a compute method first.
Returns: Largest cluster size. Return type: unsigned int
-
getNP
(self)¶ Get the number of particles.
Returns: \(N_p\). Return type: unsigned int
-
getNumberOfConnections
(self)¶ Get a reference to the number of connections per particle.
Returns: Clusters. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
getQldot_ij
(self)¶ Get a reference to the qldot_ij values.
Returns: The qldot values. Return type: \(\left(N_{clusters}\right)\) numpy.ndarray
-
getQlmi
(self)¶ Get a reference to the last computed \(Q_{lmi}\) for each particle.
Returns: Order parameter. Return type: \(\left(N_{particles}\right)\) numpy.ndarray
-
setBox
(self, box)¶ Reset the simulation box.
Parameters: box ( freud.box.Box
) – Simulation box.
- box (
-
class
freud.order.
SolLiqNear
(box, rmax, Qthreshold, Sthreshold, l)¶ SolLiqNear(box, rmax, Qthreshold, Sthreshold, l, kn=12)
Computes dot products of \(Q_{lm}\) between particles and uses these for clustering.
Module author: Richmond Newman <newmanrs@umich.edu>
Parameters: - box (
freud.box.Box
) – Simulation box. - rmax (float) – Cutoff radius for the local order parameter. Values near the first minimum of the RDF are recommended.
- Qthreshold (float) – Value of dot product threshold when evaluating \(Q_{lm}^*(i) Q_{lm}(j)\) to determine if a neighbor pair is a solid-like bond. (For \(l=6\), 0.7 generally good for FCC or BCC structures).
- Sthreshold (unsigned int) – Minimum required number of adjacent solid-link bonds for a particle to be considered solid-like for clustering. (For \(l=6\), 6-8 is generally good for FCC or BCC structures).
- l (unsigned int) – Choose spherical harmonic \(Q_l\). Must be positive and even.
- kn (unsigned int) – Number of nearest neighbors. Must be a positive number.
Variables: - box (
freud.box.Box
) – Box used in the calculation. - largest_cluster_size (unsigned int) – The largest cluster size. Must call a compute method first.
- cluster_sizes (unsigned int) – The sizes of all clusters.
- largest_cluster_size – The largest cluster size. Must call a compute method first.
- Ql_mi (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed \(Q_{lmi}\) for each particle. - clusters (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The last computed set of solid-like cluster indices for each particle. - num_connections (\(\left(N_{particles}\right)\)
numpy.ndarray
) – The number of connections per particle. - Ql_dot_ij (\(\left(N_{particles}\right)\)
numpy.ndarray
) – Reference to the qldot_ij values. - num_particles (unsigned int) – Number of particles.
-
compute
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
) – Neighborlist to use to find bonds.
- points ((\(N_{particles}\), 3)
-
computeSolLiqNoNorm
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
) – Neighborlist to use to find bonds.
- points ((\(N_{particles}\), 3)
-
computeSolLiqVariant
(self, points, nlist=None)¶ Compute the local rotationally invariant \(Q_l\) order parameter.
Parameters: - points ((\(N_{particles}\), 3)
numpy.ndarray
) – Points to calculate the order parameter. - nlist (
freud.locality.NeighborList
) – Neighborlist to use to find bonds.
- points ((\(N_{particles}\), 3)
- box (
Deprecated Classes¶
The below functions have all either been deprecated or moved to the Environment Module module
Bond Order¶
-
class
freud.order.
BondOrder
(rmax, k, n, nBinsT, nBinsP)[source]¶ Note
This class is only retained for backwards compatibility. Please use
freud.environment.BondOrder
instead.Deprecated since version 0.8.2: Use
freud.environment.BondOrder
instead.
Local Descriptors¶
-
class
freud.order.
LocalDescriptors
(box, nNeigh, lmax, rmax)[source]¶ Note
This class is only retained for backwards compatibility. Please use
freud.environment.LocalDescriptors
instead.Deprecated since version 0.8.2: Use
freud.environment.LocalDescriptors
instead.
Environment Matching¶
-
class
freud.order.
MatchEnv
(box, rmax, k)[source]¶ Note
This class is only retained for backwards compatibility. Please use
freud.environment.MatchEnv
instead.Deprecated since version 0.8.2: Use
freud.environment.MatchEnv
instead.
Pairing¶
Note
Pairing2D is deprecated and is replaced with Bond Module.
-
class
freud.order.
Pairing2D
(rmax, k, compDotTol)[source]¶ Note
This class is only retained for backwards compatibility. Please use
freud.bond
instead.Deprecated since version 0.8.2: Use
freud.bond
instead.
Angular Separation¶
-
class
freud.order.
AngularSeparation
(box, rmax, n)[source]¶ Note
This class is only retained for backwards compatibility. Please use
freud.environment.AngularSeparation
instead.Deprecated since version 0.8.2: Use
freud.environment.AngularSeparation
instead.