is represented in terms of a set of misfit vectors ⃗ δ$_{i}$ that describe the disregistry of atomic row i relative to their counterparts on the other side of the glide plane, as depicted in Fig.1. Panel a) shows a schematic representation of two sets of atomic rows extending along the y -direction, one set on each side of the glide plane. The rows above the plane are labeled by the index i . Panel b) shows a top view, depicting a disregistry vector ⃗ δ$_{i}$ for row i . In this manner, the total misfit associated with a given dislocation, described by the Burgers vector ⃗ b, is thought of as distributed among the atomic rows along the x -axis, subject to the boundary conditions ⃗ δ$_{−∞}$ = 0 and ⃗ δ$_{∞}$ = ⃗ b . Here, we consider two-dimensional misfit vectors ⃗ δ$_{i}$ = δ e $_{i}$ˆ x + δ s $_{i}$ˆ y , with edge and screw components along the x and y directions, respectively. The equilibrium structure of the dislocation is then represented by that particular misfit distribution ⃗ δ$_{i}$ that minimizes the dislocation energy per unit length, where and C is a constant that can be ignored [13]. In the elastic part of the dislocation energy, Eq. (2), χ$_{ij}$ is a discretized universal kernel [14], and K$_{e}$ = µ/ 4 π $^{(1}$− ν ) and K$_{s}$ = µ/ 4 π are elastic pre-factors with µ the shear modulus and ν the Poisson’s ratio. In addition, ρ e i ≡ ( δ e i − δ e i − 1 ) / Δ x and ρ s i ≡ ( δ s i − δ s i − 1 ) / Δ x , where Δ x is the distance between adjacent rows in the defect-free crystal. Eq.(3) represents the misfit contribution, in which γ ( ⃗ δ ) is known as the generalized stacking-fault (GSF) energy surface [18]. It describes the excess energy per unit area of a crystal that is subjected to the following procedure. It is first cut into two defect-free parts across a given plane. The two parts are then displaced relative to each other by a vector ⃗ δ , after which they are patched together again. An example configuration of the GSF on the basal plane of the hcp structure is the intrinsic stacking fault (ISF), in which the displacement vector ⃗ δ describes the associated shift in the planar stacking. 3 U disl = U elastic + U misfit + U stress + C, (1) U elastic = ∑ i,j χ$_{ij}$ ( K$_{e}$ ρ e i ρ e j + K$_{s}$ ρ s i ρ s j ) , (2) U misfit = ∑ i γ ( ⃗ δ$_{i}$ )Δ x, (3) U stress = 1 2 ∑ i [ τ $^{e}$( δ e i + δ e i − 1 ) + τ $^{s}$( δ s i + δ s i − 1 )] Δ x, (4)