How to track grain size of a grain across timesteps

I want to check grain refinement. I can get the grain sizes at each step but OVITO arranges it in the descending order of its size. How do I track one particular grain and see the evolution of its size over a period of time?

Tracking grains over time is a deceptively hard problem, and no generally accepted solution exists yet. I have started developing a modifier that is currently in early beta, but it may work for you.

You can download and install the modifier from github using:

  • OVITO Pro integrated Python interpreter:

    ovitos -m pip install --user git+https://github.com/ovito-org/AtomTimeTracker.git
    

    The --user option, which installs the package in the user’s site directory, is recommended.

  • Other Python interpreters or Conda environments:

    pip install git+https://github.com/ovito-org/AtomTimeTracker.git
    

After installation, you can add the “Atom Time Tracker” modifier to your pipeline. Start by selecting an integer “input property” used for tracking, such as the grain or cluster ID. The modifier will then attempt to cluster atoms based on these IDs throughout the entire trajectory, accounting for relabeling, merging, or splitting of groups. Next, select the group of interest by choosing a “Starting frame” and a “Starting value.” In the example shown in the screenshot:

Grain 2 in frame 6 will be tracked (and selected) throughout the trajectory.

The modifier also installs a viewport overlay, which aids in visualizing its operations. Add the “Atom Time Tracker” viewport overlay to your viewport, and it will display the groupings it has made. Each node label provides an indication of the (time, ID). The starting frame is highlighted in orange, and the current frame is indicated in blue. For instance, in the example, you can see that grain 2 in frame 6 (“6,2”) changes its index in the next step and becomes grain 3 in frame 7 (“7,3”). Additionally, grain 14 in frame 7 has been merged into this grain.

I cannot guarantee that this method will work for your data. Feel free to try it out and let me know any issues you encounter or suggestions you have.

If you have any questions about usage or parameters, please let me know. You can find two examples, one for cluster and one for grain tracking, in the repository.

The modifier requires OVITO 3.11.0 which is currently in development and can be obtained from here.

2 Likes

This is amazing! Thank you.

1 Like