My aim is to generate pristine slabs of a trigonal structure (alpha quartz to be precise), which is described in an hexagonal basis (α=β=90° ≠ γ=120°) and to get those slabs in an orthogonal basis (α=β=γ=90°).
I’ve managed to get a slab structure with the slabgenerator with the code shown below. But I didn’t get the orthogonalization of the basis.
The generated slab structure remain in an hexagonal basis even thought I’ve set “lll_reduce” on True. Yet it is imperative for me to get those slabs in an orthogonal basis for the rest of my work.
Here is my code :
import pymatgen as mg
from pymatgen.core.surface import SlabGenerator, Lattice, Slab, Structure
lattice = Lattice.hexagonal(4.96584859, 5.46805563)
sio2lattice = Structure(lattice, [“Si”, “Si”, “Si”, “O”, “O”, “O”, “O”, “O”, “O”],
[[4.70071457539E-01, -1.66533453694E-16, -9.73500614738E-20],
[1.66533453694E-16, 4.70071457539E-01, -3.33333333333E-01],
[-4.70071457539E-01, -4.70071457539E-01, -4.70071457539E-01],
[4.11209584295E-01, 2.68339766324E-01, 1.16860800877E-01],
[-2.68339766324E-01, 1.42869817970E-01, -2.16472532457E-01],
[-1.42869817970E-01, -4.11209584295E-01, 4.50194134210E-01],
[1.42869817970E-01, -2.68339766324E-01, -1.16860800877E-01],
[-4.11209584295E-01, -1.42869817970E-01, 2.16472532457E-01],
[2.68339766324E-01, 4.11209584295E-01, -4.50194134210E-01] ])
slabgen = SlabGenerator(sio2lattice, (0, 0, 1), 20, 20, lll_reduce=True,
I’m new to PymatGen and I don’t get where my error come from.
I am very grateful for any help. Thank you very much.