Stress per atom contributation for pairwise and bonded interactions

Dear Lammps users,

I am trying to plot the stress peratom distribution along the x direction in a box of polymer chains(100 chains) in which there are both bonded and non-bonded potentials. I used the compute sp all stress/atom NULL virial pair for the pairwise contributions and compute sb all stress/atom NULL virial bond angle dihedral to account for the bonded interactions. surprisingly, the distribution of stress per atom for both are same and equal to total stress per atom (compute sb all stress/atom NULL virial).
Any idea what could be possibly wrong in my commands ?

Best regards

The answer is in the documentation:

If no extra keywords are listed, the kinetic contribution all of the virial contribution terms are included in the per-atom stress tensor. If any extra keywords are listed, only those terms are summed to compute the tensor. The virial keyword means include all terms except the kinetic energy ke.

So both your commands compute indeed the same.

1 Like