Questions regarding the legacy pymatgen.analysis.gb module and interface/grain boundary building

Dear pymatgen maintainers,

I recently started working on interface and grain boundary modeling using pymatgen. After learning the basic slab and interface algorithms, I found that the legacy module pymatgen.analysis.gb is no longer available in the current versions.

My goal is to build a series of periodic models, such as LaAlO₃/SrTiO₃ heterojunctions and low-Σ Li–La–Zr–O grain boundaries. In these cases, I want to generate both types of z-direction periodicity:

  1. Vacuum–slabA–slabB–vacuum–slabA… (surface-terminated heterointerface, figure(a))
  2. slabA–slabB–slabA–slabB… (fully periodic double-interface supercell, figure(b))

image

I have a couple of questions:

  1. Was the old pymatgen.analysis.gb module removed because grain boundaries are essentially a special case of heterogeneous interfaces (i.e., A/A interfaces), meaning that their structures can be generated using the same ZSLGenerator algorithm as for general A/B interfaces?
  2. When using ZSLGenerator, what type of periodicity does it actually construct along the z direction? Does it correspond to a slab model with vacuum (vacuum–A–B–vacuum), a fully periodic bicrystal (A–B–A–B), or is it up to the user to define afterward?

I might have misunderstood some of these concepts — any clarification or pointers to examples would be greatly appreciated.

Thank you very much for your time and for maintaining such a powerful toolkit!

Best regards,
Fengyu Xie