Fig. 2: Calculation of the number of atoms per plane, \({N}_{{{\rm{plane}}}}^{{{\rm{bulk}}}}\), in hexagonal close-packed (HCP) crystals.
From: Grand canonically optimized grain boundary phases in hexagonal close-packed titanium

The accurate calculation of \({N}_{{{\rm{plane}}}}^{{{\rm{bulk}}}}\) ensures that grain boundary structures with all possible atomic densities are explored. Because HCP crystals have two basis atoms, two different cases are possible when (a) all atoms inside the plane have the same z-position, or (b) they have two distinct z-positions resulting in two structurally different surface terminations. In both cases, \({N}_{{{\rm{plane}}}}^{{{\rm{bulk}}}}\) is calculated as the total number of atoms found inside the boxed region spanned by the hexagonal interplanar spacing, dhkl (calculated using Eq. (3) in Methods). The distinct z-positions of atoms belonging to the same plane are indicated by the dashed magenta lines.