Error in surface slab generation


I’m trying to use Avogadro’s slab builder tool to generate a 2x2 Anatase 101 surface with a height of 40 A. When I click “build” the program begins to run, but begins to hang at this point and the OS considers the program as unresponsive. The process eventually returns, but produces a very strange structure: see screenshot. Note that the z-axis of this structure is 320A.

Environment Information

Avogadro version: 1.2.0
Operating system and version: Ubuntu 18.04.2

Expected Behavior

Production of a 2x2 surface slab

Actual Behavior

Eventual production of erroneous structure.

Steps to Reproduce

Import TiO2-anatase.cif structure.
Miller indices: 1 0 1
width: 2 x 2 cell repeats
height: 40.0000A

Yeah, I’m not surprised - when I wrote the slab code, I did it brute force:

  • find the rotation to yield the correct Miller plane
  • generate a big, big supercell
  • slice

I tested on a variety of slabs, but I’m not surprised that there are some bugs.

Considering I’ve tried a wide variety of slab generation codes, my suggestion is to use Pymatgen (e.g.,

For Avo2, I have a set of scripts that call Pymatgen to generate the slabs.