# [Pw_forum] Slab optimization with -24kbar stress!!!

Nicola Marzari nicola.marzari at epfl.ch
Fri Dec 5 12:01:31 CET 2014

```
Dear David,

I think I was thinking at the problem from a "mathematical" point of view,
but Cyrille's point of view is more appropriate.

I.e., the in plane lattice constant should be the one of the bulk solid -
if you use that, as Cyrille said, you will not have zero stress in the
x-y plane.
But you can relax in the x-y plane, and then get zero stress. These two
approaches
converge to the same thing for a very thick slab; for a thin slab, the
results will
be slightly different, and the question is which one converges faster to
the the
thick slab limit (I don't know).

Re my last comment, it had to do with the fact that constraining atoms
has in itself
an effect on the stress, and so you need to consider that.

Of course, in practive your numbers are very small, so this is more of a
conceptual
discussion.

Before discussing further, try out a few calculations on very simple and
inexpensive systems
that you can study with few atoms, small cutoffs, thin slabs, and
experiment.

nicola

On 05/12/2014 11:11, David Foster wrote:
> Dear Nicola and Cyrille
>
> Thanks for your help. But:
>
> 1- Cyrille, I fixed both in-plane and z-direction lattice constants. I need to fix the 15A vacuum in the z to prevent periodic interactions for studying adsorption.
>      As Nicola said, it is possible to relax in-plane lattice constants, but what do you mean with this sentence:
>                                "you should zero stress in the direction perpendicular to the surface"
>      Do you mean relaxation in z-direction?!! It is vacuum, and if I do it, the vacuum thickness reduces and this is not my purpose.
>
>      I converged smearing, k-point, wave function energy-cutoff and ... in the unit cell with 1mRY of total energy, and then used appropriate k-point
>      for 2*2 surface slab, i.e., for z-direction I used 1 (due to the vacuum in z), and for x and y directions, I used half of the k-points for conventional cell
>      (because of double-sizing "a" and "b" in 2*2 surface slab). Do you mean that I should converge them with stress value, too?
>
> 2- Nicola, Yes, It seems that I need to use z-constrained vc-relax to minimize the in-plane stress. I will do it, and check its stress.
>     But for your second comment, I constructed the slab by using fully optimized conventional cell (with vc-relax command). I don't think their plane
>     are very close. About your final comment, Do you mean I should change the atoms positions in the z-direction and repeat z-constrained vc-relax?
>
>
>     Regards
>
>     David Foster
>
>     Ph.D. Student of Chemistry
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>

--

----------------------------------------------------------------------
Prof Nicola Marzari, Chair of Theory and Simulation of Materials, EPFL

```