Periodic boundary conditions were applied along the direction perpendicular to the edges, allowing parallel edges of neighboring nanoribbon images to interact in-plane (Figure ). Additionally, we have also constructed a 3D model where the repetition along the direction perpendicular to the basal plane allowed the edges to interact both with the adjacent graphene ribbon images above and below (Figure ). After initial optimization and thermalization, the annealing of the flakes was simulated within the isothermal-isobaric ensemble for 0.4 ns at 300 K, 400, 500, and 600 K, at a pressure of 0 atm, using a Nosé-Hoover thermostat style integration, with an integration timestep of 0.1 fs. The y-direction cell dimension was kept fixed during the calculations, while the periodic x (or x and z) direction(s) were allowed to relax in the 2D (3D) models.