Very Interesting work!
I tried the codes on my own data and got an outstanding result!

I have a simple question:
If I want to use the three structures as filters for my further analysis, how can I get the coordinates of the atoms in "5-sided", "6-sided" and "7-sided" rings in the graphene boundary, respectively?
Any reply and suggestions will be appreciated.