Documentation for the strees tensor formula (stress/atom)


I have some questions about the formulation for calculating the stress tensor, found under the compute stress/atom command. It is mainly the notation that confuses me. It seems quite different from other kind of notations, e.g. compared to the three paper mentioned in the manual.

For example, in the second term for pairwise interaction:

  • The summation is over “n” which loops over the Np nearest neighbors, but there is no index “n” in the terms?

-The positions of the two atoms in the pairwise interaction are r1 and r2, but the position with respect to what? The origin (0,0,0) of the simulation box or the atom “i”?

  • Is the pairwise interaction between atom “i” and it neighbors? Or is the pairwise interaction only between neighbors of atom “i” (meaning that atom “i” is not part of the sum)?

Is there any literature/papers where this formulation is documented/explained so I can read up about it?

Kind regards,
Anders Vesti

This formulation of per-atom stress is explained in the paper by Thompson cited on the doc page.
All the pair, bond, angle, etc terms are written in the same style. The n loop is simply over
all the pair, bond, angle interactions that atom I is part of. Each of those involved 2,3,4 atoms.
The R1234 are the coords of those atoms. The F1234 are the forces on those atoms.
The coords are with respect to the origin. If one or more of the atoms is a ghost atom, they
are the coords of the ghost atom (not the original atom, which might be on the other size of a periodic box).
So for any interaction the R1234 are “close” to each other. So in the case of a pairwise interaction
it looks like F(R1-R2) since F1 and F2 are equal an opposite.