[lammps-users] Identifying grain boundary atoms

Hello,I am using the LAMMPS version 29Oct2020. I am modelling a polycrystalline CoCrNi medium-entropy alloy model, into which I am trying to dope Aluminium atoms using MD simulations. I am trying to replace some of the CoCrNi atoms in the grain boundary regions of my polycrystalline model with the Aluminium atoms. But I am not sure how to identify the IDs or the coordinates of the CoCrNi atoms that are present at the grain boundary regions. How do I figure out which CoCrNi atoms lie along the grain boundary regions in order to identify them and replace them with Al atoms? Also, how do I identify the grain boundary regions (and not just the atoms present there) in general? Thank you.

Regards,
Rajesh

please see https://docs.lammps.org/compute_orientorder_atom.html and the literature cited by it.
also, this sounds like a topic that has been discussed before, so search through the mailing list archives won’t hurt.