Color atoms by misorientation of grains

@stukowski Dear developers: I try to color atoms using the misorientation of grains between the compressed system and its initial configuration by ovito, as the picture shows. I use the function "PolyhedralTemplateMatchingModifier.calculate_misorientation"https://www.ovito.org/docs/current/python/modules/ovito_modifiers.html#ovito.modifiers.PolyhedralTemplateMatchingModifier.calculate_misorientation),
but I am not sure if it can calculate misorientation between the same grain at different frame.
image

Currently, there is no way to track grains over time. However, there are two alternatives you could use to solve your question:

  1. Use the polyhedral template matching modifier in combination with the freeze property and the compute property modifiers to calculate the change in orientation for each atom.
  2. The atomic strain modifier can compute rotation and stretch tensors for each atom.

In both cases, the color coding modifier can be applied to generate a visual representation similar to the one you posted.

Personally, I would recommend trying the atomic strain modifier first.

thanks a lot @utt , I try rotation compute in the atomic strain modifier and have got what I want