Controlling which side of slab the vacuum is on

I am using Pymatgen’s slab generator to create a Co3O4 spinel (110) surface for adsorbate calculations. get_slabs() gives me two stoichiometric but non symmetric surfaces, in which one is more reasonable, shown below. In this structure, there are two types of layers, A and B.


However, since this is the only version structure I am given, I am not sure how to select which layer, A or B terminates the slab on the side with the vacuum, it seems regardless of the number of layers or the vacuum distance I choose, the A layer is always on the side of the vacuum. If anyone knows of a way to choose which layer terminates please let me know! Thank you!

hey @mdhayesNU,

To control which termination appears at the top, instead of get_slabs(), you can use get_slab(shift=0.0) of SlabGenerator where you simply give it the shift in fractional coordinates of the conventional unit cell that reproduces the termination you want at the top. This should be straightforward to determine since you already have the conventional unit cell.