Many thanks for reply me.

Strain can be directly and precisely calculated by the lattice constants of the two slabs? Why the need to estimate it with a simulation

→ How can I estimated it? could you give me the formula? there are many simulations to obtain the

The formula for calculating strain is: “strain = (L-L0)/L0”.

stain by simulations,pls see the attachment file.

Obviously you have confused with the terms “stress” and “strain”. The attached paper talked about measuring stress and stress field, not strain.

[…]

Also, how do you verify the boundary condition with stress calculations? Using computed stress commands, putting how exactly you used them aside, does not tell you anything for definite if there is something wrong with the boundary. Contradictory to your expectations, I would think the PBC is not correct if you obtain a huge stress, and the PBC is probably right with non-obvious stress.

→ It is the point I want to make clear. For my understanding if there is no periodic boundary , then the strain will relax, because there is space for atoms to relax in x and y direction (if the normal direction of the mismatched interface is Z), is that right? so I think if you want to obtain

There is periodic boundary if the boundary is set to p p p - simple as that.

Now if the PBC is incorrect, atoms will relax, but only to a certain point. If the PBC is so wrong that the atoms have nowhere else to go, the energy and forces are going to remain high. Worse case, you will see lost atoms.

→ I want to calculate the stress distribution, so if the strain can be calulated, how to obtain the stress distribution?

If you have strain, stress can be evaluated by simple energy-volume (or named energy-lattice constant, force-volume, stress-strain) curves. Also, what distribution? Distribution of stress on the interface along one of the lateral directions? Or distribution across the interface along the plane normal? Use fix ave/spatial or similar commands, or simply post-process the dump file and bin the atomic forces.

Ray