Select the atoms at grain boundaries

Hi,
How can I use ovito to select atoms at grain boundaries when the model contains several grains and has intragranular defects.

thanks in advance

Hi,
I would suggest combining the grain segmentation modifier with “adopt orphan atoms” option set to “false” with the polyhedral template matching modifier to extract non-crystalline atoms not belonging to any grain.

Thank you very much. I got it.

Sorry, I encounter a new problem. When I delete atoms on the grain boundary and perform CNA calculations on the remaining atoms, the remaining atoms on the surface of grain boundary will still be considered as Other type. However, I want to know the proportion of other type atoms in the bulk. What should I do?

I think my initial suggestion was not fully what you were looking for. Here’s a slightly longer pipeline that should solve your problem.

Perform grain segmentation

  1. Polyhedral template matching
  2. Grain segmentation (“adopt orphan atoms” turned on)

Carve out the grain you’re interested in

  1. Expression selection e.g.: “Grain == 1”
  2. Invert the selection
  3. Delete selected

Isolate the grain boundary

  1. Construct surface mesh (“Select particles on the surface” turned on)
  2. Expand selection (adjust the range to account for your grain boundary width)

Select all defects inside the grain

  1. Expression selection e.g.: “Selection == 0 && StructureType == 0”

This should select all defects in the initially selected grain for further analysis.

The method perfectly solves my problem. Thank you very much!