dynsight.descriptors.orientational_order_param¶
- dynsight.descriptors.orientational_order_param(universe, neigh_list_per_frame, order=6)[source]¶
Compute the magnitude of the orientational order parameter.
\[| \psi^{(n)}_i | = \frac{1}{N_i} \sum_{j=1}^{N_{i}} e^{i n \theta_{ij}}\]where n is the symmetry order.
Warning
Particles are considered as laying in the (x, y) plane. z-coordinates are ignored.
- Parameters:
universe (Universe) – contains the coordinates at each frame.
neigh_list_per_frame (list[list[AtomGroup]]) – A frame-by-frame list of the neighbors of each atom, output of
listNeighboursAlongTrajectory().order (int) – the order of the symmetry measured by the descriptor. Default is 6, corresponding to the hexatic order parameter.
- Returns:
An array of shape (n_atoms, n_frames), with the values of psi.
- Return type:
NDArray[np.float64]
Example
import numpy as np from dynsight.trajectory import Trj from dynsight.descriptors import orientational_order_param trj = Trj.init_from_xyz(path / "trajectory.xyz", dt=1.0) neig_counts, _ = trj.get_coord_number(r_cut=3.0) psi = orientational_order_param( universe=trj.universe, neigh_list_per_frame=neig_counts, )