Closed smheidrich closed 6 years ago
The documentation is correct as is. When you generate a slab, the c vector is out of the a-b plane, which is defined to be parallel to the plane of interest. It does not mean that c is perpendicular to the a-b plane. It will be perpendicular for certain planes, e.g., the (100) plane of the cubic structure or (001) of the hexagonal, tetragonal structures, etc. But it is not true for any general triclinic structure. Pls consult the publication linked to this piece of code for a detailed explanation why c is not always parallel to a and b.
I think @smheidrich has a point here, they're highlighting this statement in the documentation specifically:
Note that all Slabs have the surface normal oriented in the c-direction.
I interpret this as "the surface normal should be parallel to the c-vector in all cases." As you both are pointing out, this is untrue in general. @smheidrich why don't you try making a small edit and submitting a PR?
@montoyjh Thanks, done.
@shyuep I agree with everything in your post (except for the first sentence of course), I just don't see how the statement that @montoyjh cited can be compatible with it. Or do we mean different things by a, b and c perhaps? I thought they were referring to the lattice vectors of the returned slab structure. Very sorry for wasting your time if it turns out I'm wrong.
Thanks. Sorry I misread what you wrote earlier. I have merged the PR.
No problem, thanks for merging! :+1:
System
Summary
In the documentation for the pymatgen.core.surface.Slab class, it says:
Do I have a knot in my brain or does that make no sense? If the surface normal is really oriented in the c-direction, then the c-vector is necessarily perpendicular to the surface, isn't it? So either the first or the second sentence is wrong. From the tests below, it seems to me that (at least in this case with these settings) the first sentence doesn't hold.
Example code
This demonstrates that the slab normal doesn't necessarily point in the direction of the c lattice vector, but it does seem to always point in the direction perpendicular to the a and b lattice vectors:
Output
Suggested solution
From the tests in the example code above, I would say that the first sentence should instead read:
Or, perhaps even simpler:
But maybe that's just down to the specific settings I used, or maybe I made a mistake or misunderstood something?
Files
POSCAR.Al12O18
, which ships with pymatgen (in thetest_files
folder).