Can "compute stress/atom" be used to calculate local stress tensor?

Hi

According to the user documentation of LAMMPS, the computation of stress per atom in this code is based on the paper [Thompson, Plimpton, Mattson, J Chem Phys, 131, 154107 (2009).]

Now, at the end of that paper it is stated that:

“Finally, the group form of the virial naturally leads to a
simple, general scheme for computing the virial tensor for
individual atoms. While these per-atom virials do not have a
direct physical interpretation, they provide a convenient
means for grouping contributions to the virial in space,
allowing the spatial variation of the stress tensor to be esti-
mated in strongly inhomogeneous systems, such as in the
vicinity of a shockwave.”

Does this mean that local stress cannot be computed by using the “compute stress/atom” command?

Thank you in advance.

Best regards,

Arham Amouei

No, the sentence means that the virial is a direct function of the interatomic forces directly, and cannot be easily separated into atomic contributions, like you would do e.g. for the kinetic energy.

So, you can compute the stress per atom and visualize it, but you should keep in mind that variations along length scales comparable with the interatomic forces (e.g. nanometers) are not to be treated the same way as variations along macroscopic length scales (e.g. micrometers).

Giacomo

Thanks. Personally, I think that “compute stress/atom” cannot be used to calculate local pressure. The reason is that using virial equation for the calculation of pressure for a sub-volume depends on the calculation of the internal virial for that sub-volume, and we need to know internal forces to calculate the internal virial. When the virial function for the whole simulation box is being calculated all the forces are internal, but for a sub-volume, forces that pass through the boundaries of that sub-volume are not internal and should not be used in calculation of the internal virial for that sub-volume. As far as I know, LAMMPS does not distinguish between internal and external forces. “compute stress/atom” even does not know the boundaries of the sub-volume the pressure of which we want to know.

Best regards,

Arham Amouei

That’s correct. Computing the atomic virials is possible, but their physical meaning depends on how you use them afterwards.

While computing the local stress of a region is not possible, but there are other applications of stress/atom.

Giacomo