Average Misorientation — OVITO Python Modifier
This OVITO Python modifier computes, for each particle, the average crystallographic misorientation (in degrees) to its cutoff neighbors, taking the minimum angle over the 24 proper rotations of the cubic point group. It then writes the result to a per-particle user property named average_misorientation.
What it does?
- Finds neighbors within a user-set cutoff (default 3.5 Å)
- For each neighbor pair (i, j), reads quaternions from the Orientation property
- Computes misorientation by quaternion multiplication and applies all 24 cubic symmetries
- Takes the minimum angle over symmetries (in degrees)
- Averages the per-neighbor minima for each particle
- Stores the average in average_misorientation (special sentinel values optional)