# Unable to see the build-> Slab option in Avogadro2

#1

Hi there,
Couldn’t find the slab building option in Avogadro2. I have installed the Avogadro using the instructions at http://wiki.openchemistry.org/Build.

Any help is appreciated.

The default 1.1.1 version on Ubuntu has the option but gives no atoms after building!

Thanks,
Sharma.

#2

At the moment, Avogadro2 doesn’t have slab building - there’s a better solution coming soon.

If you’re having problems with 1.x versions, it would help to know the type of slab you’re trying to build (e.g., what crystal structure, what Miller plane, etc.)

#3

Hi,

At this moment I was trying to get the surface of ZnO (HCP) with the Miller indices (10-10). With older versions, after transformation, all the atoms are being deleted from the cell.

Thanks,

Sharma.

#4

Oh, that’s an interesting bug! It works fine for some Miller planes, but not for that one (or other negative indexes.)

The slab is generated by creating a supercell, then cutting down to size. The lattice vectors are getting set strangely:

I’ll take a look at the bug for v1.3. We’ve found a few subtle bugs in slab creation in my research group - not only in Avogadro but other packages.

I’d suggest as a workaround to use the pymatgen Python tools from the Materials project:

#5

Thanks. The link which you sent is broken. However, I think this is the page you are referring to.

https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2017-04-03-Slab%20generation%20and%20Wulff%20shape.ipynb

If yes, I have tried to follow it yesterday and when I was trying with 4 indices I got the below error (which I am not getting when using 3 indices). It is quite possible that I am doing something wrong (as I am using pymatgen for the first time) but I followed the tutorial to my best!

In [1]: from pymatgen.core.surface import SlabGenerator, generate_all_slabs, Structure, Lattice; import os

In [2]: lattice = Lattice.hexagonal(3.31700,5.31400); zno = Structure(lattice, [“Zn”, “O”],[[0.66667,0.33333,0.0],[0.66667,0.33333,0.345]])

In [3]: slabgen = SlabGenerator(zno,(1,0,-1,0), 10, 10)

#6

I am not a pymatgen developer and I admit that I haven’t used the slab generator with hexagonal lattices.

My suggestion would be to report the bug to pymatgen:

As I said, I’ll look into the Avogadro bug.

#7

Thanks. I posted it there and it seems we need to omit the 3rd (redundant) index.

#8

Can you point me to the discussion? (e.g., does that always work?)

My plan for Avogadro2 is to use pymatgen directly so I’d like to make sure I know how to handle hcp materials correctly.

#9

Hi,

Here is the link to the post.