Strain calculations in LAMMPS

Dear All
I have layered structure made of Materials “1” and “2” with their corresponding lattice parameters “a1” and “a2”. My aim is to calculate the strain distribution inside the layered system ( color-coded image ) by means of equation (14) and (15) from from this article: Ken-ichi Saitoh, Wing Kam Liu “Molecular dynamics study of surface effect on martensitic cubic-to-tetragonal transformation in Ni–Al alloy”, Computational Materials Science 46 (2009) 531–544. My difficulty is, how to write equations (14) and (15) in LAMMPS script?

Regards,
Sergey

saitoh2009.pdf (3.16 MB)

Those formulas are a sum over pairwise quantities, so there is no

way to encode the formula in the input script, e.g. as a variable formula.
I think you’d have to post-process the formulas from dump files, or
write your own compute to use a neighbor list and calculate the values
on-the-fly. You could look at compute displace/atom and compute stress/atom
to see similar operations.

Steve