# [lammps-users] Surface relaxation/Minimize/Non-periodic boundary

Hi,

I want to calculate surface relaxation – change in relative spacing between 1st and 2nd surface layers.

Using spp boundaries with minimize command doesn’t allow the volume to change, and I can also not use box/relax or fix npt or fix deform.

An indirect way would be to vary the x-dimension slightly followed by energy minimization, and then select the configuration with the lowest energy. However, x-dimension being non-periodic can not be changed by any of the commands mentioned above. How can I change a non-periodic dimension (while keeping the other dimensions unchanged)?

Is there another way of calculating the surface relaxation, perhaps a direct way?

Thanks

Rohit

Hi, Rohit.

I don’t know you want to calculate surface relaxation under what circumstances.

x-dimension is free, pressure in this direction should always be zero. I think maybe that’s why box/relax or npt can’t apply pressure on it.

I understand surface relaxation is to reduce surface free energy, I think only minimize could do the job, it’s true box size doesn’t change, but surface atoms do relax towards bulk while minimizing.

If you ‘vary x-dimension slightly followed by energy minimization’, results you got is relaxed state under pressure you exert by varying x size. I think that’s not what literature defined surface relaxation.

Weina

If you use boundary spp (free surface in x, periodic in yz), and
run minimize, then the x spacings near the surface will relax,
but the yz dims will not change.

If you also run fix box/relax on yz, then the x spacings will
relax and yz periodic dims may also change to accomodate
a target pressure.

Is neither of these what you want?

Steve

Hi,

Steve, the 1st of the two options you mentioned, is what I did. I ran
minimize with spp boundary (xyz). The log.lammps file shows:

Created orthogonal box = (0 0 0) to (36.5809 34.4888 29.8682)
Step PotEng Lx Ly Lz
Volume
0 -15948.124 36.581113 34.488816 29.86819
37682.882
10 -15952.66 36.581113 34.488816 29.86819
37682.882
13 -15952.668 36.581113 34.488816 29.86819
37682.882

However, the dump file shows different bounds before and after
minimizations:
Before: -1.78E-15 36.5809 0 33.7703 0 28.6237
After: -0.06109 36.642 -2.E-15 33.7703 6.46E-15 28.6237

That is, according to the dump file minimization changes only the x
dimension as you pointed out. However, the printed values for Lx, Ly and
Lz don't agree (see above).

Using the dump file, I calculated the relaxation for (100), (110) and
(111) planes. The calculated values for (100) and (111) planes are
similar (though not exact, which could be due to different simulation
size) to the values reported for two different potential parameter sets;
for the (110) plane, values are different and opposite in sign.

This, in addition to the seeming contradiction between the dump and the
log file, makes me doubt if I am doing it right.

Could you shed some light into these issues?

Thanks a lot

Rohit

PS: From your response, it seems that the restriction mentioned in
manual for minimize about volume not allowed to change is not always
true. For example, when the boundary is not periodic, it can expand or
contract while minimization. You may consider clarifying this in the
manual.

Can you post your input script and data file so I can
reproduce this?

Steve

I tried reproducing this with the modifined bench/in.lj input script
below. I think everything is working correctly. What might be confusing
is the following:

1) with a "s" boundary (not periodic), then that dimension (box size)
will change during min or dynamics

2) the way LAMMPS computes that box size is to find the min/max
atom and add a small delta on each end to create the box length

3) this only happens on steps where reneighboring occurs

4) reneighboring may not occur on the last step of min, but
it will always occur on the initial step of a subsequent run

5) thus it may look like the box size changes between a min and
a run, but no atoms moved. Rather the shrink-wrapping just
got recomputed. Note that in between reneighborings, atoms
may move outside the shrink wrap (or outside the simulation
box generally), so the only surefire way to compute the
layer spacing you want is to use the atom coordinates in
the dump file. Those are always correct.

Steve

Thanks Steve. This clarifies a lot.

Rohit